diff options
| author | Jiri Olsa <[email protected]> | 2015-04-18 22:34:39 +0200 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2015-04-29 10:37:46 -0300 |
| commit | 16671c1e1cac2dbb995feb4bc55082fd939b5c2c (patch) | |
| tree | 63496e804951a9aff61c897dd41d576c546b21d5 /tools/Makefile | |
| parent | 379a9a28a1b4364ab08fec35c84d39cf4995c509 (diff) | |
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 <[email protected]>
Signed-off-by: Jiri Olsa <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Norris <[email protected]>
Cc: David Ahern <[email protected]>
Cc: David Howells <[email protected]>
Cc: Michal Marek <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/Makefile')
| -rw-r--r-- | tools/Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
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/$@) |