Skip to contentSkip to conversation

Build output clean up

PATCH In review Ian Rogers 3 participants 10 messages Nov 17, 2022

Subsystems (3)
lore
Share & tools
lore

Ian Rogers

author reviewer
#0 lore raw

cover Build output clean up

Reduce build spam from commands not prefixed with @. Make install_headers targets distinguishable by adding in the library name so:
INSTALL headers
becomes:
INSTALL libapi_headers

Ian Rogers (6):
tools lib api: clean up install_headers tools lib bpf: Avoid install_headers make warning tools lib symbol: clean up build output tools lib perf: Make install_headers clearer tools lib subcmd: Make install_headers clearer tools lib traceevent: Make install_headers clearer

 tools/lib/api/Makefile        | 4 ++--
 tools/lib/bpf/Makefile        | 1 +
 tools/lib/perf/Makefile       | 2 +-
 tools/lib/subcmd/Makefile     | 2 +-
 tools/lib/symbol/Makefile     | 4 ++--
 tools/lib/traceevent/Makefile | 4 ++--
 6 files changed, 9 insertions(+), 8 deletions(-)
Signature · 1 line
2.38.1.431.g37b22c650d-goog
author reviewer
#1 lore raw

PATCH 1/6 tools lib api: clean up install_headers

Add missing backslash that caused an install command to always appear in build output. Make the install headers more specific.

---
 tools/lib/api/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/api/Makefile +2 -2
index 3e5ef1e0e890..3649c7f7ea65 100644
@@ -100,12 +100,12 @@ install_lib: $(LIBFILE)
 		cp -fpR $(LIBFILE) $(DESTDIR)$(libdir_SQ)
 
 install_headers:
-	$(call QUIET_INSTALL, headers) \
+	$(call QUIET_INSTALL, libapi_headers) \
 		$(call do_install,cpu.h,$(prefix)/include/api,644); \
 		$(call do_install,debug.h,$(prefix)/include/api,644); \
 		$(call do_install,io.h,$(prefix)/include/api,644); \
 		$(call do_install,fd/array.h,$(prefix)/include/api/fd,644); \
-		$(call do_install,fs/fs.h,$(prefix)/include/api/fs,644);
+		$(call do_install,fs/fs.h,$(prefix)/include/api/fs,644); \
 		$(call do_install,fs/tracing_path.h,$(prefix)/include/api/fs,644);
 
 install: install_lib install_headers
Signature · 1 line
2.38.1.431.g37b22c650d-goog
author reviewer
#2 lore raw

PATCH 2/6 tools lib bpf: Avoid install_headers make warning

In reply to Ian Rogers

The perf build makes the install_headers target, however, as there is no action for this target a warning is always produced of:

make[3]: Nothing to be done for 'install_headers'.

Solve this by adding a display of 'INSTALL libbpf_headers'.

---
 tools/lib/bpf/Makefile | 1 +
 1 file changed, 1 insertion(+)
tools/lib/bpf/Makefile +1 -0
index 4c904ef0b47e..7f5f7d2ebe1f 100644
@@ -255,6 +255,7 @@ $(INSTALL_GEN_HDRS): $(INSTALL_PFX)/%.h: $(OUTPUT)%.h
 		$(call do_install,$<,$(prefix)/include/bpf,644)
 
 install_headers: $(BPF_GENERATED) $(INSTALL_SRC_HDRS) $(INSTALL_GEN_HDRS)
+	$(call QUIET_INSTALL, libbpf_headers)
 
 install_pkgconfig: $(PC_FILE)
 	$(call QUIET_INSTALL, $(PC_FILE)) \
Signature · 1 line
2.38.1.431.g37b22c650d-goog
author reviewer
#3 lore raw

PATCH 3/6 tools lib symbol: clean up build output

In reply to Ian Rogers

Missing @ when building libsymbol. Make the install echo specific to installing the libsymbol headers.

---
 tools/lib/symbol/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/symbol/Makefile +2 -2
index 4c1d6b53032d..ea8707b3442a 100644
@@ -77,7 +77,7 @@ include $(srctree)/tools/scripts/Makefile.include
 all: fixdep $(LIBFILE)
 
 $(SYMBOL_IN): FORCE
-	$(MAKE) $(build)=libsymbol V=1
+	@$(MAKE) $(build)=libsymbol
 
 $(LIBFILE): $(SYMBOL_IN)
 	$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(SYMBOL_IN)
@@ -101,7 +101,7 @@ install_lib: $(LIBFILE)
 		cp -fpR $(LIBFILE) $(DESTDIR)$(libdir_SQ)
 
 install_headers:
-	$(call QUIET_INSTALL, headers) \
+	$(call QUIET_INSTALL, libsymbol_headers) \
 		$(call do_install,kallsyms.h,$(prefix)/include/symbol,644);
 
 install: install_lib install_headers
Signature · 1 line
2.38.1.431.g37b22c650d-goog
author reviewer
#4 lore raw

PATCH 4/6 tools lib perf: Make install_headers clearer

In reply to Ian Rogers

Add libperf to the name so that this install_headers build appears different to similar targets in different libraries.

---
 tools/lib/perf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/perf/Makefile +1 -1
index 1badc0a04676..a90fb8c6bed4 100644
@@ -188,7 +188,7 @@ install_lib: libs
 		cp -fpR $(LIBPERF_ALL) $(DESTDIR)$(libdir_SQ)
 
 install_headers:
-	$(call QUIET_INSTALL, headers) \
+	$(call QUIET_INSTALL, libperf_headers) \
 		$(call do_install,include/perf/bpf_perf.h,$(prefix)/include/perf,644); \
 		$(call do_install,include/perf/core.h,$(prefix)/include/perf,644); \
 		$(call do_install,include/perf/cpumap.h,$(prefix)/include/perf,644); \
Signature · 1 line
2.38.1.431.g37b22c650d-goog
author reviewer
#5 lore raw

PATCH 5/6 tools lib subcmd: Make install_headers clearer

In reply to Ian Rogers

Add libsubcmd to the name so that this install_headers build appears different to similar targets in different libraries.

---
 tools/lib/subcmd/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/subcmd/Makefile +1 -1
index e96566f8991c..9a316d8b89df 100644
@@ -101,7 +101,7 @@ install_lib: $(LIBFILE)
 		cp -fpR $(LIBFILE) $(DESTDIR)$(libdir_SQ)
 
 install_headers:
-	$(call QUIET_INSTALL, headers) \
+	$(call QUIET_INSTALL, libsubcmd_headers) \
 		$(call do_install,exec-cmd.h,$(prefix)/include/subcmd,644); \
 		$(call do_install,help.h,$(prefix)/include/subcmd,644); \
 		$(call do_install,pager.h,$(prefix)/include/subcmd,644); \
Signature · 1 line
2.38.1.431.g37b22c650d-goog
author reviewer
#6 lore raw

PATCH 6/6 tools lib traceevent: Make install_headers clearer

In reply to Ian Rogers

Add libtraceevent to the name so that this install_headers build appears different to similar targets in different libraries. Add ; after kbuffer.h install target for consistency.

---
 tools/lib/traceevent/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/lib/traceevent/Makefile +2 -2
index c874c017c636..98dfd4badea3 100644
@@ -234,11 +234,11 @@ install_pkgconfig:
 		$(call do_install_pkgconfig_file,$(prefix))
 
 install_headers:
-	$(call QUIET_INSTALL, headers) \
+	$(call QUIET_INSTALL, traceevent_headers) \
 		$(call do_install,event-parse.h,$(includedir_SQ),644); \
 		$(call do_install,event-utils.h,$(includedir_SQ),644); \
 		$(call do_install,trace-seq.h,$(includedir_SQ),644); \
-		$(call do_install,kbuffer.h,$(includedir_SQ),644)
+		$(call do_install,kbuffer.h,$(includedir_SQ),644);
 
 install: install_lib
 
Signature · 1 line
2.38.1.431.g37b22c650d-goog
#7 lore raw
In reply to Ian Rogers

Em Wed, Nov 16, 2022 at 04:43:50PM -0800, Ian Rogers escreveu:

Quoted 7 lines

Reduce build spam from commands not prefixed with @. Make install_headers targets distinguishable by adding in the library name so:
INSTALL headers
becomes:
INSTALL libapi_headers

Quoted 7 lines

Ian Rogers (6):
tools lib api: clean up install_headers tools lib bpf: Avoid install_headers make warning tools lib symbol: clean up build output tools lib perf: Make install_headers clearer tools lib subcmd: Make install_headers clearer tools lib traceevent: Make install_headers clearer

Andrii, are you ok with that? Can I carry this on my next (perf/core) branch?

Testing it now.

- Arnaldo

Quoted 10 lines
 tools/lib/api/Makefile        | 4 ++--
 tools/lib/bpf/Makefile        | 1 +
 tools/lib/perf/Makefile       | 2 +-
 tools/lib/subcmd/Makefile     | 2 +-
 tools/lib/symbol/Makefile     | 4 ++--
 tools/lib/traceevent/Makefile | 4 ++--
 6 files changed, 9 insertions(+), 8 deletions(-)
Signature · 1 line
2.38.1.431.g37b22c650d-goog
Signature · 1 line
- Arnaldo
#8 lore raw
Quoted 17 lines · Arnaldo Carvalho de Melo

Em Wed, Nov 16, 2022 at 04:43:50PM -0800, Ian Rogers escreveu:

Quoted 7 lines

Reduce build spam from commands not prefixed with @. Make install_headers targets distinguishable by adding in the library name so:
INSTALL headers
becomes:
INSTALL libapi_headers

Quoted 7 lines

Ian Rogers (6):
tools lib api: clean up install_headers tools lib bpf: Avoid install_headers make warning tools lib symbol: clean up build output tools lib perf: Make install_headers clearer tools lib subcmd: Make install_headers clearer tools lib traceevent: Make install_headers clearer

Quoted 2 lines

Andrii, are you ok with that? Can I carry this on my next (perf/core) branch?

yep, lgtm. Please take it through your tree, in-kernel Makefile is not even synced into Github, so there is no downsides in terms of libbpf sync.

Quoted 19 lines

Testing it now.

- Arnaldo

Quoted 10 lines
 tools/lib/api/Makefile        | 4 ++--
 tools/lib/bpf/Makefile        | 1 +
 tools/lib/perf/Makefile       | 2 +-
 tools/lib/subcmd/Makefile     | 2 +-
 tools/lib/symbol/Makefile     | 4 ++--
 tools/lib/traceevent/Makefile | 4 ++--
 6 files changed, 9 insertions(+), 8 deletions(-)

--
2.38.1.431.g37b22c650d-goog

--

- Arnaldo

#9 lore raw

Em Thu, Nov 17, 2022 at 11:32:10AM -0800, Andrii Nakryiko escreveu:

Quoted 19 lines
Quoted 17 lines · Arnaldo Carvalho de Melo

Em Wed, Nov 16, 2022 at 04:43:50PM -0800, Ian Rogers escreveu:

Quoted 14 lines

Reduce build spam from commands not prefixed with @. Make install_headers targets distinguishable by adding in the library name so:
INSTALL headers
becomes:
INSTALL libapi_headers

Ian Rogers (6):
tools lib api: clean up install_headers tools lib bpf: Avoid install_headers make warning tools lib symbol: clean up build output tools lib perf: Make install_headers clearer tools lib subcmd: Make install_headers clearer tools lib traceevent: Make install_headers clearer

Quoted 8 lines
Quoted 2 lines

Andrii, are you ok with that? Can I carry this on my next (perf/core) branch?

yep, lgtm. Please take it through your tree, in-kernel Makefile is not even synced into Github, so there is no downsides in terms of libbpf sync.

Thanks, done.

- Arnaldo