Skip to content

Commit f203688

Browse files
author
Ingo Molnar
committed
Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/urgent
2 parents 351af07 + ecafda6 commit f203688

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

‎tools/perf/Makefile‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ endif
55
# The default target of this Makefile is...
66
all::
77

8+
ifneq ($(OUTPUT),)
9+
# check that the output directory actually exists
10+
OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd)
11+
$(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist))
12+
endif
13+
814
# Define V=1 to have a more verbose compile.
915
# Define V=2 to have an even more verbose compile.
1016
#
@@ -931,15 +937,15 @@ $(OUTPUT)common-cmds.h: $(wildcard Documentation/perf-*.txt)
931937
$(QUIET_GEN). util/generate-cmdlist.sh > $@+ && mv $@+ $@
932938

933939
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
934-
$(QUIET_GEN)$(RM) $@ $@+ && \
940+
$(QUIET_GEN)$(RM) $(OUTPUT)$@ $(OUTPUT)$@+ && \
935941
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
936942
-e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
937943
-e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
938944
-e 's/@@PERF_VERSION@@/$(PERF_VERSION)/g' \
939945
-e 's/@@NO_CURL@@/$(NO_CURL)/g' \
940-
$@.sh >$@+ && \
941-
chmod +x $@+ && \
942-
mv $@+ $(OUTPUT)$@
946+
$@.sh > $(OUTPUT)$@+ && \
947+
chmod +x $(OUTPUT)$@+ && \
948+
mv $(OUTPUT)$@+ $(OUTPUT)$@
943949

944950
configure: configure.ac
945951
$(QUIET_GEN)$(RM) $@ $<+ && \

‎tools/perf/feature-tests.mak‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ endef
113113
# try-cc
114114
# Usage: option = $(call try-cc, source-to-build, cc-options)
115115
try-cc = $(shell sh -c \
116-
'TMP="$(TMPOUT).$$$$"; \
116+
'TMP="$(OUTPUT)$(TMPOUT).$$$$"; \
117117
echo "$(1)" | \
118118
$(CC) -x c - $(2) -o "$$TMP" > /dev/null 2>&1 && echo y; \
119119
rm -f "$$TMP"')

0 commit comments

Comments
 (0)