Commit 033a273f authored by Bernd Petrovitsch's avatar Bernd Petrovitsch Committed by Arnaldo Carvalho de Melo

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: default avatarBernd Petrovitsch <bernd@sysprog.at>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent e9184621
...@@ -157,10 +157,6 @@ all:: ...@@ -157,10 +157,6 @@ all::
# #
# Define NO_DWARF if you do not want debug-info analysis feature at all. # Define NO_DWARF if you do not want debug-info analysis feature at all.
$(shell sh -c 'mkdir -p $(OUTPUT)scripts/{perl,python}/Perf-Trace-Util/' 2> /dev/null)
$(shell sh -c 'mkdir -p $(OUTPUT)util/{ui/browsers,scripting-engines}/' 2> /dev/null)
$(shell sh -c 'mkdir $(OUTPUT)bench' 2> /dev/null)
$(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE $(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
@$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT)
-include $(OUTPUT)PERF-VERSION-FILE -include $(OUTPUT)PERF-VERSION-FILE
...@@ -186,8 +182,6 @@ ifeq ($(ARCH),x86_64) ...@@ -186,8 +182,6 @@ ifeq ($(ARCH),x86_64)
ARCH := x86 ARCH := x86
endif endif
$(shell sh -c 'mkdir -p $(OUTPUT)arch/$(ARCH)/util/' 2> /dev/null)
# CFLAGS and LDFLAGS are for the users to override from the command line. # CFLAGS and LDFLAGS are for the users to override from the command line.
# #
...@@ -268,6 +262,7 @@ export prefix bindir sharedir sysconfdir ...@@ -268,6 +262,7 @@ export prefix bindir sharedir sysconfdir
CC = $(CROSS_COMPILE)gcc CC = $(CROSS_COMPILE)gcc
AR = $(CROSS_COMPILE)ar AR = $(CROSS_COMPILE)ar
RM = rm -f RM = rm -f
MKDIR = mkdir
TAR = tar TAR = tar
FIND = find FIND = find
INSTALL = install INSTALL = install
...@@ -838,6 +833,7 @@ ifndef V ...@@ -838,6 +833,7 @@ ifndef V
QUIET_CC = @echo ' ' CC $@; QUIET_CC = @echo ' ' CC $@;
QUIET_AR = @echo ' ' AR $@; QUIET_AR = @echo ' ' AR $@;
QUIET_LINK = @echo ' ' LINK $@; QUIET_LINK = @echo ' ' LINK $@;
QUIET_MKDIR = @echo ' ' MKDIR $@;
QUIET_BUILT_IN = @echo ' ' BUILTIN $@; QUIET_BUILT_IN = @echo ' ' BUILTIN $@;
QUIET_GEN = @echo ' ' GEN $@; QUIET_GEN = @echo ' ' GEN $@;
QUIET_SUBDIR0 = +@subdir= QUIET_SUBDIR0 = +@subdir=
...@@ -1012,6 +1008,14 @@ $(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H) ...@@ -1012,6 +1008,14 @@ $(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
$(patsubst perf-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h) $(patsubst perf-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h)
builtin-revert.o wt-status.o: wt-status.h builtin-revert.o wt-status.o: wt-status.h
# we compile into subdirectories. if the target directory is not the source directory, they might not exists. So
# we depend the various files onto their directories.
DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h
$(DIRECTORY_DEPS): $(sort $(dir $(DIRECTORY_DEPS)))
# In the second step, we make a rule to actually create these directories
$(sort $(dir $(DIRECTORY_DEPS))):
$(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null
$(LIB_FILE): $(LIB_OBJS) $(LIB_FILE): $(LIB_OBJS)
$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS) $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment