Commit 9d5f3714e4705a66b6be693f7202192f756f498e
Exists in
master
and in
7 other branches
Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme…
…/linux-2.6 into perf/urgent
Showing 1 changed file Side-by-side Diff
tools/perf/Makefile
... | ... | @@ -157,10 +157,6 @@ |
157 | 157 | # |
158 | 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 | 160 | $(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE |
165 | 161 | @$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT) |
166 | 162 | -include $(OUTPUT)PERF-VERSION-FILE |
... | ... | @@ -186,8 +182,6 @@ |
186 | 182 | ARCH := x86 |
187 | 183 | endif |
188 | 184 | |
189 | -$(shell sh -c 'mkdir -p $(OUTPUT)arch/$(ARCH)/util/' 2> /dev/null) | |
190 | - | |
191 | 185 | # CFLAGS and LDFLAGS are for the users to override from the command line. |
192 | 186 | |
193 | 187 | # |
... | ... | @@ -268,6 +262,7 @@ |
268 | 262 | CC = $(CROSS_COMPILE)gcc |
269 | 263 | AR = $(CROSS_COMPILE)ar |
270 | 264 | RM = rm -f |
265 | +MKDIR = mkdir | |
271 | 266 | TAR = tar |
272 | 267 | FIND = find |
273 | 268 | INSTALL = install |
... | ... | @@ -838,6 +833,7 @@ |
838 | 833 | QUIET_CC = @echo ' ' CC $@; |
839 | 834 | QUIET_AR = @echo ' ' AR $@; |
840 | 835 | QUIET_LINK = @echo ' ' LINK $@; |
836 | + QUIET_MKDIR = @echo ' ' MKDIR $@; | |
841 | 837 | QUIET_BUILT_IN = @echo ' ' BUILTIN $@; |
842 | 838 | QUIET_GEN = @echo ' ' GEN $@; |
843 | 839 | QUIET_SUBDIR0 = +@subdir= |
... | ... | @@ -1011,6 +1007,14 @@ |
1011 | 1007 | $(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H) |
1012 | 1008 | $(patsubst perf-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h) |
1013 | 1009 | builtin-revert.o wt-status.o: wt-status.h |
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 | |
1014 | 1018 | |
1015 | 1019 | $(LIB_FILE): $(LIB_OBJS) |
1016 | 1020 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS) |