aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-08-25 07:09:58 -0400
committerIngo Molnar <mingo@elte.hu>2010-08-25 07:10:00 -0400
commit7de5d895b2020260190db0021de646f3f22f755e (patch)
tree51d012f0b76a2ec1bd3b4837690faf1087f37056 /tools/perf
parent04fba67163a9e6132614b72b33bb2743bd33ffb3 (diff)
parent502adf5778f4151dcba3f64dd6ed322151f3712c (diff)
Merge branch 'linus' into perf/core
Merge reason: pick up perf fixes Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/Makefile14
-rw-r--r--tools/perf/feature-tests.mak2
2 files changed, 11 insertions, 5 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 7473de00682b..26a3f2ec90c9 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -5,6 +5,12 @@ endif
5# The default target of this Makefile is... 5# The default target of this Makefile is...
6all:: 6all::
7 7
8ifneq ($(OUTPUT),)
9# check that the output directory actually exists
10OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd)
11$(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist))
12endif
13
8# Define V=1 to have a more verbose compile. 14# Define V=1 to have a more verbose compile.
9# Define V=2 to have an even more verbose compile. 15# Define V=2 to have an even more verbose compile.
10# 16#
@@ -940,15 +946,15 @@ $(OUTPUT)common-cmds.h: $(wildcard Documentation/perf-*.txt)
940 $(QUIET_GEN). util/generate-cmdlist.sh > $@+ && mv $@+ $@ 946 $(QUIET_GEN). util/generate-cmdlist.sh > $@+ && mv $@+ $@
941 947
942$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh 948$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
943 $(QUIET_GEN)$(RM) $@ $@+ && \ 949 $(QUIET_GEN)$(RM) $(OUTPUT)$@ $(OUTPUT)$@+ && \
944 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ 950 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
945 -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \ 951 -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
946 -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \ 952 -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
947 -e 's/@@PERF_VERSION@@/$(PERF_VERSION)/g' \ 953 -e 's/@@PERF_VERSION@@/$(PERF_VERSION)/g' \
948 -e 's/@@NO_CURL@@/$(NO_CURL)/g' \ 954 -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
949 $@.sh >$@+ && \ 955 $@.sh > $(OUTPUT)$@+ && \
950 chmod +x $@+ && \ 956 chmod +x $(OUTPUT)$@+ && \
951 mv $@+ $(OUTPUT)$@ 957 mv $(OUTPUT)$@+ $(OUTPUT)$@
952 958
953configure: configure.ac 959configure: configure.ac
954 $(QUIET_GEN)$(RM) $@ $<+ && \ 960 $(QUIET_GEN)$(RM) $@ $<+ && \
diff --git a/tools/perf/feature-tests.mak b/tools/perf/feature-tests.mak
index ef3d0d6a9e23..b253db634f04 100644
--- a/tools/perf/feature-tests.mak
+++ b/tools/perf/feature-tests.mak
@@ -124,7 +124,7 @@ endef
124# try-cc 124# try-cc
125# Usage: option = $(call try-cc, source-to-build, cc-options) 125# Usage: option = $(call try-cc, source-to-build, cc-options)
126try-cc = $(shell sh -c \ 126try-cc = $(shell sh -c \
127 'TMP="$(TMPOUT).$$$$"; \ 127 'TMP="$(OUTPUT)$(TMPOUT).$$$$"; \
128 echo "$(1)" | \ 128 echo "$(1)" | \
129 $(CC) -x c - $(2) -o "$$TMP" > /dev/null 2>&1 && echo y; \ 129 $(CC) -x c - $(2) -o "$$TMP" > /dev/null 2>&1 && echo y; \
130 rm -f "$$TMP"') 130 rm -f "$$TMP"')