* [PATCH 0/3] tools build: Fix tools Makefile
@ 2015-04-18 20:34 Jiri Olsa
2015-04-18 20:34 ` [PATCH 1/3] tools build: No need to make libapi for perf explicitly Jiri Olsa
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Jiri Olsa @ 2015-04-18 20:34 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Borislav Petkov, Brian Norris, David Ahern, David Howells,
Ingo Molnar, Michal Marek, Namhyung Kim, Paul Mackerras,
Peter Zijlstra, Sam Ravnborg, linux-kbuild, lkml
hi,
sending tools/Makefile fixes discussed in here:
http://marc.info/?t=142250693600001&r=1&w=2
thanks,
jirka
---
Jiri Olsa (3):
tools build: No need to make libapi for perf explicitly
tools build: Fix Makefile(s) to properly invoke tools build
perf tests: Add build tests for building perf from kernel source root and tools
Makefile | 5 ++---
tools/Makefile | 20 +++++++++++++++-----
tools/perf/tests/make | 14 +++++++++++++-
3 files changed, 30 insertions(+), 9 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/3] tools build: No need to make libapi for perf explicitly 2015-04-18 20:34 [PATCH 0/3] tools build: Fix tools Makefile Jiri Olsa @ 2015-04-18 20:34 ` Jiri Olsa 2015-04-20 20:12 ` Arnaldo Carvalho de Melo 2015-05-06 2:56 ` [tip:perf/core] " tip-bot for Jiri Olsa 2015-04-18 20:34 ` [PATCH 2/3] tools build: Fix Makefile(s) to properly invoke tools build Jiri Olsa 2015-04-18 20:34 ` [PATCH 3/3] perf tests: Add build tests for building perf from kernel source root and tools Jiri Olsa 2 siblings, 2 replies; 8+ messages in thread From: Jiri Olsa @ 2015-04-18 20:34 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: Borislav Petkov, Brian Norris, David Ahern, David Howells, Ingo Molnar, Michal Marek, Namhyung Kim, Paul Mackerras, Peter Zijlstra, Sam Ravnborg, linux-kbuild, lkml The perf build handles its dependencies by itself. Also renaming libapi libapikfs to libapi as it got changed just recently. Link: http://lkml.kernel.org/n/tip-f31hq9rl838ovbyj0w1bhgzo@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 9a617adc6675..01995cc8ac44 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -47,10 +47,10 @@ cgroup firewire hv guest usb virtio vm net: FORCE liblockdep: FORCE $(call descend,lib/lockdep) -libapikfs: FORCE +libapi: FORCE $(call descend,lib/api) -perf: libapikfs FORCE +perf: FORCE $(call descend,$@) selftests: FORCE @@ -97,10 +97,10 @@ cgroup_clean hv_clean firewire_clean lguest_clean usb_clean virtio_clean vm_clea liblockdep_clean: $(call descend,lib/lockdep,clean) -libapikfs_clean: +libapi_clean: $(call descend,lib/api,clean) -perf_clean: libapikfs_clean +perf_clean: $(call descend,$(@:_clean=),clean) selftests_clean: -- 1.9.3 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] tools build: No need to make libapi for perf explicitly 2015-04-18 20:34 ` [PATCH 1/3] tools build: No need to make libapi for perf explicitly Jiri Olsa @ 2015-04-20 20:12 ` Arnaldo Carvalho de Melo 2015-05-06 2:56 ` [tip:perf/core] " tip-bot for Jiri Olsa 1 sibling, 0 replies; 8+ messages in thread From: Arnaldo Carvalho de Melo @ 2015-04-20 20:12 UTC (permalink / raw) To: Jiri Olsa Cc: Borislav Petkov, Brian Norris, David Ahern, David Howells, Ingo Molnar, Michal Marek, Namhyung Kim, Paul Mackerras, Peter Zijlstra, Sam Ravnborg, linux-kbuild, lkml Em Sat, Apr 18, 2015 at 10:34:38PM +0200, Jiri Olsa escreveu: > The perf build handles its dependencies by itself. > > Also renaming libapi libapikfs to libapi as it got > changed just recently. Thanks, applied. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [tip:perf/core] tools build: No need to make libapi for perf explicitly 2015-04-18 20:34 ` [PATCH 1/3] tools build: No need to make libapi for perf explicitly Jiri Olsa 2015-04-20 20:12 ` Arnaldo Carvalho de Melo @ 2015-05-06 2:56 ` tip-bot for Jiri Olsa 1 sibling, 0 replies; 8+ messages in thread From: tip-bot for Jiri Olsa @ 2015-05-06 2:56 UTC (permalink / raw) To: linux-tip-commits Cc: bp, paulus, namhyung, computersforpeace, mingo, acme, tglx, dhowells, mmarek, dsahern, sam, linux-kernel, a.p.zijlstra, jolsa, hpa Commit-ID: 379a9a28a1b4364ab08fec35c84d39cf4995c509 Gitweb: http://git.kernel.org/tip/379a9a28a1b4364ab08fec35c84d39cf4995c509 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Sat, 18 Apr 2015 22:34:38 +0200 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Wed, 29 Apr 2015 10:37:46 -0300 tools build: No need to make libapi for perf explicitly The perf build handles its dependencies by itself. Also renaming libapi libapikfs to libapi as it got changed just recently. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Borislav Petkov <bp@suse.de> Cc: Brian Norris <computersforpeace@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: David Howells <dhowells@redhat.com> Cc: Michal Marek <mmarek@suse.cz> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: linux-kbuild@vger.kernel.org Link: http://lkml.kernel.org/r/1429389280-18720-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 9a617ad..01995cc 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -47,10 +47,10 @@ cgroup firewire hv guest usb virtio vm net: FORCE liblockdep: FORCE $(call descend,lib/lockdep) -libapikfs: FORCE +libapi: FORCE $(call descend,lib/api) -perf: libapikfs FORCE +perf: FORCE $(call descend,$@) selftests: FORCE @@ -97,10 +97,10 @@ cgroup_clean hv_clean firewire_clean lguest_clean usb_clean virtio_clean vm_clea liblockdep_clean: $(call descend,lib/lockdep,clean) -libapikfs_clean: +libapi_clean: $(call descend,lib/api,clean) -perf_clean: libapikfs_clean +perf_clean: $(call descend,$(@:_clean=),clean) selftests_clean: ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] tools build: Fix Makefile(s) to properly invoke tools build 2015-04-18 20:34 [PATCH 0/3] tools build: Fix tools Makefile Jiri Olsa 2015-04-18 20:34 ` [PATCH 1/3] tools build: No need to make libapi for perf explicitly Jiri Olsa @ 2015-04-18 20:34 ` Jiri Olsa 2015-05-06 2:56 ` [tip:perf/core] " tip-bot for Jiri Olsa 2015-04-18 20:34 ` [PATCH 3/3] perf tests: Add build tests for building perf from kernel source root and tools Jiri Olsa 2 siblings, 1 reply; 8+ messages in thread From: Jiri Olsa @ 2015-04-18 20:34 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: Borislav Petkov, Brian Norris, David Ahern, David Howells, Ingo Molnar, Michal Marek, Namhyung Kim, Paul Mackerras, Peter Zijlstra, Sam Ravnborg, linux-kbuild, lkml Several fixes were needed to allow following builds: $ make tools/tmon $ make -C <kernelsrc> tools/perf $ make -C <kernelsrc>/tools perf - some of the tools (perf) use same make variables as in kernel build, unsetting srctree and objtree - using original $(O) for O variable - perf build does not follow the descend function setup invoking it via it's own make rule I tried the rest of the tools/Makefile targets and they seem to work now. Reported-by: Brian Norris <computersforpeace@gmail.com> Link: http://lkml.kernel.org/n/tip-pvncmskx7tw8vpolkfqmcgrf@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- Makefile | 5 ++--- tools/Makefile | 12 +++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index da36a3be7969..b1ca0607ed2e 100644 --- a/Makefile +++ b/Makefile @@ -214,7 +214,6 @@ VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) export srctree objtree VPATH - # SUBARCH tells the usermode build what the underlying arch is. That is set # first, and if a usermode build is happening, the "ARCH=um" on the command # line overrides the setting of ARCH below. If a native build is happening, @@ -1504,11 +1503,11 @@ image_name: # Clear a bunch of variables before executing the submake tools/: FORCE $(Q)mkdir -p $(objtree)/tools - $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(objtree) subdir=tools -C $(src)/tools/ + $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(O) subdir=tools -C $(src)/tools/ tools/%: FORCE $(Q)mkdir -p $(objtree)/tools - $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(objtree) subdir=tools -C $(src)/tools/ $* + $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(O) subdir=tools -C $(src)/tools/ $* # Single targets # --------------------------------------------------------------------------- diff --git a/tools/Makefile b/tools/Makefile index 01995cc8ac44..b35102721cbb 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,3 +1,8 @@ +# Some of the tools (perf) use same make variables +# as in kernel build. +export srctree= +export objtree= + include scripts/Makefile.include help: @@ -50,8 +55,13 @@ liblockdep: FORCE libapi: FORCE $(call descend,lib/api) +# The perf build does not follow the descend function setup, +# invoking it via it's own make rule. +PERF_O = $(if $(O),$(O)/tools/perf,) + perf: FORCE - $(call descend,$@) + $(Q)mkdir -p $(PERF_O) . + $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= selftests: FORCE $(call descend,testing/$@) -- 1.9.3 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [tip:perf/core] tools build: Fix Makefile(s) to properly invoke tools build 2015-04-18 20:34 ` [PATCH 2/3] tools build: Fix Makefile(s) to properly invoke tools build Jiri Olsa @ 2015-05-06 2:56 ` tip-bot for Jiri Olsa 0 siblings, 0 replies; 8+ messages in thread From: tip-bot for Jiri Olsa @ 2015-05-06 2:56 UTC (permalink / raw) To: linux-tip-commits Cc: dsahern, a.p.zijlstra, tglx, bp, computersforpeace, linux-kernel, namhyung, paulus, jolsa, hpa, mmarek, sam, mingo, acme, dhowells Commit-ID: 16671c1e1cac2dbb995feb4bc55082fd939b5c2c Gitweb: http://git.kernel.org/tip/16671c1e1cac2dbb995feb4bc55082fd939b5c2c Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Sat, 18 Apr 2015 22:34:39 +0200 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Wed, 29 Apr 2015 10:37:46 -0300 tools build: Fix Makefile(s) to properly invoke tools build Several fixes were needed to allow following builds: $ make tools/tmon $ make -C <kernelsrc> tools/perf $ make -C <kernelsrc>/tools perf - some of the tools (perf) use same make variables as in kernel build, unsetting srctree and objtree - using original $(O) for O variable - perf build does not follow the descend function setup invoking it via it's own make rule I tried the rest of the tools/Makefile targets and they seem to work now. Reported-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Borislav Petkov <bp@suse.de> Cc: Brian Norris <computersforpeace@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: David Howells <dhowells@redhat.com> Cc: Michal Marek <mmarek@suse.cz> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: linux-kbuild@vger.kernel.org Link: http://lkml.kernel.org/r/1429389280-18720-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- Makefile | 5 ++--- tools/Makefile | 12 +++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index da36a3b..b1ca060 100644 --- a/Makefile +++ b/Makefile @@ -214,7 +214,6 @@ VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) export srctree objtree VPATH - # SUBARCH tells the usermode build what the underlying arch is. That is set # first, and if a usermode build is happening, the "ARCH=um" on the command # line overrides the setting of ARCH below. If a native build is happening, @@ -1504,11 +1503,11 @@ image_name: # Clear a bunch of variables before executing the submake tools/: FORCE $(Q)mkdir -p $(objtree)/tools - $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(objtree) subdir=tools -C $(src)/tools/ + $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(O) subdir=tools -C $(src)/tools/ tools/%: FORCE $(Q)mkdir -p $(objtree)/tools - $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(objtree) subdir=tools -C $(src)/tools/ $* + $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(O) subdir=tools -C $(src)/tools/ $* # Single targets # --------------------------------------------------------------------------- diff --git a/tools/Makefile b/tools/Makefile index 01995cc..b351027 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,3 +1,8 @@ +# Some of the tools (perf) use same make variables +# as in kernel build. +export srctree= +export objtree= + include scripts/Makefile.include help: @@ -50,8 +55,13 @@ liblockdep: FORCE libapi: FORCE $(call descend,lib/api) +# The perf build does not follow the descend function setup, +# invoking it via it's own make rule. +PERF_O = $(if $(O),$(O)/tools/perf,) + perf: FORCE - $(call descend,$@) + $(Q)mkdir -p $(PERF_O) . + $(Q)$(MAKE) --no-print-directory -C perf O=$(PERF_O) subdir= selftests: FORCE $(call descend,testing/$@) ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] perf tests: Add build tests for building perf from kernel source root and tools 2015-04-18 20:34 [PATCH 0/3] tools build: Fix tools Makefile Jiri Olsa 2015-04-18 20:34 ` [PATCH 1/3] tools build: No need to make libapi for perf explicitly Jiri Olsa 2015-04-18 20:34 ` [PATCH 2/3] tools build: Fix Makefile(s) to properly invoke tools build Jiri Olsa @ 2015-04-18 20:34 ` Jiri Olsa 2015-05-06 2:56 ` [tip:perf/core] " tip-bot for Jiri Olsa 2 siblings, 1 reply; 8+ messages in thread From: Jiri Olsa @ 2015-04-18 20:34 UTC (permalink / raw) To: Arnaldo Carvalho de Melo Cc: Borislav Petkov, Brian Norris, David Ahern, David Howells, Ingo Molnar, Michal Marek, Namhyung Kim, Paul Mackerras, Peter Zijlstra, Sam Ravnborg, linux-kbuild, lkml Adding build tests for following make commands: $ make -C <kernelsrc> tools/perf $ make -C <kernelsrc>/tools perf Link: http://lkml.kernel.org/n/tip-8mz4fits682bac4shmejjhw0@git.kernel.org Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- tools/perf/tests/make | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/perf/tests/make b/tools/perf/tests/make index bff85324f799..901ec9191359 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -223,7 +223,19 @@ tarpkg: echo "- $@: $$cmd" && echo $$cmd > $@ && \ ( eval $$cmd ) >> $@ 2>&1 -all: $(run) $(run_O) tarpkg +make_kernelsrc: + @echo " - make -C <kernelsrc> tools/perf" + $(call clean); \ + (make -C ../.. tools/perf) > $@ 2>&1 && \ + test -x perf && rm -f $@ || (cat $@ ; false) + +make_kernelsrc_tools: + @echo " - make -C <kernelsrc>/tools perf" + $(call clean); \ + (make -C ../../tools perf) > $@ 2>&1 && \ + test -x perf && rm -f $@ || (cat $@ ; false) + +all: $(run) $(run_O) tarpkg make_kernelsrc make_kernelsrc_tools @echo OK out: $(run_O) -- 1.9.3 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [tip:perf/core] perf tests: Add build tests for building perf from kernel source root and tools 2015-04-18 20:34 ` [PATCH 3/3] perf tests: Add build tests for building perf from kernel source root and tools Jiri Olsa @ 2015-05-06 2:56 ` tip-bot for Jiri Olsa 0 siblings, 0 replies; 8+ messages in thread From: tip-bot for Jiri Olsa @ 2015-05-06 2:56 UTC (permalink / raw) To: linux-tip-commits Cc: dsahern, jolsa, hpa, computersforpeace, sam, dhowells, paulus, bp, mingo, namhyung, mmarek, linux-kernel, tglx, acme, a.p.zijlstra Commit-ID: c41c6647e515c4eb6f754e83e15c1660692c6ce9 Gitweb: http://git.kernel.org/tip/c41c6647e515c4eb6f754e83e15c1660692c6ce9 Author: Jiri Olsa <jolsa@kernel.org> AuthorDate: Sat, 18 Apr 2015 22:34:40 +0200 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Wed, 29 Apr 2015 10:37:47 -0300 perf tests: Add build tests for building perf from kernel source root and tools Adding build tests for following make commands: $ make -C <kernelsrc> tools/perf $ make -C <kernelsrc>/tools perf Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Borislav Petkov <bp@suse.de> Cc: Brian Norris <computersforpeace@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: David Howells <dhowells@redhat.com> Cc: Michal Marek <mmarek@suse.cz> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: linux-kbuild@vger.kernel.org Link: http://lkml.kernel.org/r/1429389280-18720-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> --- tools/perf/tests/make | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/perf/tests/make b/tools/perf/tests/make index bff8532..901ec91 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -223,7 +223,19 @@ tarpkg: echo "- $@: $$cmd" && echo $$cmd > $@ && \ ( eval $$cmd ) >> $@ 2>&1 -all: $(run) $(run_O) tarpkg +make_kernelsrc: + @echo " - make -C <kernelsrc> tools/perf" + $(call clean); \ + (make -C ../.. tools/perf) > $@ 2>&1 && \ + test -x perf && rm -f $@ || (cat $@ ; false) + +make_kernelsrc_tools: + @echo " - make -C <kernelsrc>/tools perf" + $(call clean); \ + (make -C ../../tools perf) > $@ 2>&1 && \ + test -x perf && rm -f $@ || (cat $@ ; false) + +all: $(run) $(run_O) tarpkg make_kernelsrc make_kernelsrc_tools @echo OK out: $(run_O) ^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-05-06 2:57 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-04-18 20:34 [PATCH 0/3] tools build: Fix tools Makefile Jiri Olsa 2015-04-18 20:34 ` [PATCH 1/3] tools build: No need to make libapi for perf explicitly Jiri Olsa 2015-04-20 20:12 ` Arnaldo Carvalho de Melo 2015-05-06 2:56 ` [tip:perf/core] " tip-bot for Jiri Olsa 2015-04-18 20:34 ` [PATCH 2/3] tools build: Fix Makefile(s) to properly invoke tools build Jiri Olsa 2015-05-06 2:56 ` [tip:perf/core] " tip-bot for Jiri Olsa 2015-04-18 20:34 ` [PATCH 3/3] perf tests: Add build tests for building perf from kernel source root and tools Jiri Olsa 2015-05-06 2:56 ` [tip:perf/core] " tip-bot for Jiri Olsa
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.