aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r--tools/perf/Makefile14
1 files changed, 10 insertions, 4 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) $@ $<+ && \