Skip to contentSkip to conversation

perf tools: Suppress 'rm dlfilter' build message

PATCH Applied Adrian Hunter 3 participants 3 messages Sep 30, 2021 – Oct 20, 2021 perf events

lore
Share & tools
lore

Adrian Hunter

author reviewer
#0 lore raw

PATCH 1/1 perf tools: Suppress 'rm dlfilter' build message

The following build message:

rm dlfilters/dlfilter-test-api-v0.o

is unwanted.

The object fle is being treated as an intermediate file and being automatically removed. Mark the object file as .SECONDARY to prevent removal and hence the message.

---
 tools/perf/Makefile.perf | 2 ++
 1 file changed, 2 insertions(+)
tools/perf/Makefile.perf +2 -0
index e04313c4d840..ab8cb17d9ec5 100644
@@ -787,6 +787,8 @@ $(OUTPUT)dlfilters/%.o: dlfilters/%.c include/perf/perf_dlfilter.h
 	$(Q)$(MKDIR) -p $(OUTPUT)dlfilters
 	$(QUIET_CC)$(CC) -c -Iinclude $(EXTRA_CFLAGS) -o $@ -fpic $<
 
+.SECONDARY: $(DLFILTERS:.so=.o)
+
 $(OUTPUT)dlfilters/%.so: $(OUTPUT)dlfilters/%.o
 	$(QUIET_LINK)$(CC) $(EXTRA_CFLAGS) -shared -o $@ $<
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 6 lines · Adrian Hunter

The following build message:

rm dlfilters/dlfilter-test-api-v0.o

is unwanted.

Hi Adrian,

Quoted 1 line

The object fle is being treated as an intermediate file and being

Just minor nit, it should be object file not object fle

Thanks,
Kajol Jain

Quoted 22 lines

automatically removed. Mark the object file as .SECONDARY to prevent removal and hence the message.

---
 tools/perf/Makefile.perf | 2 ++
 1 file changed, 2 insertions(+)
tools/perf/Makefile.perf +2 -0
index e04313c4d840..ab8cb17d9ec5 100644
@@ -787,6 +787,8 @@ $(OUTPUT)dlfilters/%.o: dlfilters/%.c include/perf/perf_dlfilter.h
 	$(Q)$(MKDIR) -p $(OUTPUT)dlfilters
 	$(QUIET_CC)$(CC) -c -Iinclude $(EXTRA_CFLAGS) -o $@ -fpic $<
 
+.SECONDARY: $(DLFILTERS:.so=.o)
+
 $(OUTPUT)dlfilters/%.so: $(OUTPUT)dlfilters/%.o
 	$(QUIET_LINK)$(CC) $(EXTRA_CFLAGS) -shared -o $@ $<
 
maintainer Applied
#2 lore raw
In reply to Adrian Hunter

Em Thu, Sep 30, 2021 at 09:28:49AM +0300, Adrian Hunter escreveu:

Quoted 9 lines

The following build message:

rm dlfilters/dlfilter-test-api-v0.o

is unwanted.

The object fle is being treated as an intermediate file and being automatically removed. Mark the object file as .SECONDARY to prevent removal and hence the message.

Thanks, applied. Sorry for the delay, fell thru the cracks :-\ Also I adjusted the fle typo reported by Kajol.

- Arnaldo

Quoted 20 lines
---
 tools/perf/Makefile.perf | 2 ++
 1 file changed, 2 insertions(+)
tools/perf/Makefile.perf +2 -0
index e04313c4d840..ab8cb17d9ec5 100644
@@ -787,6 +787,8 @@ $(OUTPUT)dlfilters/%.o: dlfilters/%.c include/perf/perf_dlfilter.h
 	$(Q)$(MKDIR) -p $(OUTPUT)dlfilters
 	$(QUIET_CC)$(CC) -c -Iinclude $(EXTRA_CFLAGS) -o $@ -fpic $<
 
+.SECONDARY: $(DLFILTERS:.so=.o)
+
 $(OUTPUT)dlfilters/%.so: $(OUTPUT)dlfilters/%.o
 	$(QUIET_LINK)$(CC) $(EXTRA_CFLAGS) -shared -o $@ $<
 
Signature · 1 line
2.25.1
Signature · 1 line
- Arnaldo