diff options
author | Bernd Petrovitsch <bernd@sysprog.at> | 2010-08-17 11:22:08 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-08-17 11:22:08 -0400 |
commit | 033a273f9836b592dd568abd0f655be469d66704 (patch) | |
tree | 27094c24520a244d223db93d9e3369aee01735cb /tools | |
parent | e91846213241e3c46da8cbe992bceb1697de8d78 (diff) |
perf tools: Fix build on POSIX shells
POSIX sh does not specify the brace expansion, so fix it by replacing the
global $(shell ...) lines quite at the top creating the output directories with
real rules.
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Kusanagi Kouichi <slash@ac.auone-net.jp>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1282046280.5822.4.camel@thorin>
Signed-off-by: Bernd Petrovitsch <bernd@sysprog.at>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/Makefile | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 41abb90df50d..dcb9700b88d2 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -157,10 +157,6 @@ all:: | |||
157 | # | 157 | # |
158 | # Define NO_DWARF if you do not want debug-info analysis feature at all. | 158 | # Define NO_DWARF if you do not want debug-info analysis feature at all. |
159 | 159 | ||
160 | $(shell sh -c 'mkdir -p $(OUTPUT)scripts/{perl,python}/Perf-Trace-Util/' 2> /dev/null) | ||
161 | $(shell sh -c 'mkdir -p $(OUTPUT)util/{ui/browsers,scripting-engines}/' 2> /dev/null) | ||
162 | $(shell sh -c 'mkdir $(OUTPUT)bench' 2> /dev/null) | ||
163 | |||
164 | $(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE | 160 | $(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE |
165 | @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) | 161 | @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) |
166 | -include $(OUTPUT)PERF-VERSION-FILE | 162 | -include $(OUTPUT)PERF-VERSION-FILE |
@@ -186,8 +182,6 @@ ifeq ($(ARCH),x86_64) | |||
186 | ARCH := x86 | 182 | ARCH := x86 |
187 | endif | 183 | endif |
188 | 184 | ||
189 | $(shell sh -c 'mkdir -p $(OUTPUT)arch/$(ARCH)/util/' 2> /dev/null) | ||
190 | |||
191 | # CFLAGS and LDFLAGS are for the users to override from the command line. | 185 | # CFLAGS and LDFLAGS are for the users to override from the command line. |
192 | 186 | ||
193 | # | 187 | # |
@@ -268,6 +262,7 @@ export prefix bindir sharedir sysconfdir | |||
268 | CC = $(CROSS_COMPILE)gcc | 262 | CC = $(CROSS_COMPILE)gcc |
269 | AR = $(CROSS_COMPILE)ar | 263 | AR = $(CROSS_COMPILE)ar |
270 | RM = rm -f | 264 | RM = rm -f |
265 | MKDIR = mkdir | ||
271 | TAR = tar | 266 | TAR = tar |
272 | FIND = find | 267 | FIND = find |
273 | INSTALL = install | 268 | INSTALL = install |
@@ -838,6 +833,7 @@ ifndef V | |||
838 | QUIET_CC = @echo ' ' CC $@; | 833 | QUIET_CC = @echo ' ' CC $@; |
839 | QUIET_AR = @echo ' ' AR $@; | 834 | QUIET_AR = @echo ' ' AR $@; |
840 | QUIET_LINK = @echo ' ' LINK $@; | 835 | QUIET_LINK = @echo ' ' LINK $@; |
836 | QUIET_MKDIR = @echo ' ' MKDIR $@; | ||
841 | QUIET_BUILT_IN = @echo ' ' BUILTIN $@; | 837 | QUIET_BUILT_IN = @echo ' ' BUILTIN $@; |
842 | QUIET_GEN = @echo ' ' GEN $@; | 838 | QUIET_GEN = @echo ' ' GEN $@; |
843 | QUIET_SUBDIR0 = +@subdir= | 839 | QUIET_SUBDIR0 = +@subdir= |
@@ -1012,6 +1008,14 @@ $(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H) | |||
1012 | $(patsubst perf-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h) | 1008 | $(patsubst perf-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h) |
1013 | builtin-revert.o wt-status.o: wt-status.h | 1009 | builtin-revert.o wt-status.o: wt-status.h |
1014 | 1010 | ||
1011 | # we compile into subdirectories. if the target directory is not the source directory, they might not exists. So | ||
1012 | # we depend the various files onto their directories. | ||
1013 | DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h | ||
1014 | $(DIRECTORY_DEPS): $(sort $(dir $(DIRECTORY_DEPS))) | ||
1015 | # In the second step, we make a rule to actually create these directories | ||
1016 | $(sort $(dir $(DIRECTORY_DEPS))): | ||
1017 | $(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null | ||
1018 | |||
1015 | $(LIB_FILE): $(LIB_OBJS) | 1019 | $(LIB_FILE): $(LIB_OBJS) |
1016 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS) | 1020 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS) |
1017 | 1021 | ||