aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2012-11-13 23:39:50 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-12-09 06:46:04 -0500
commit3cde41b0d63d0550ac9c8352f1ce0ea516690f46 (patch)
treec64f86746e0f88b220266046de3b912a0fc86e97 /tools/perf/Makefile
parentb56e53312d445967f6bdb91e5667c56755e47450 (diff)
perf tools: Don't check configuration on make clean
Current perf build process checks various system configuration on invocation to make. But this is not needed just for cleaning. To do that, move some of python related variables out of conditional since 'clean' target needs them. Normal path should not be affected by this. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1352867990-658-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r--tools/perf/Makefile28
1 files changed, 16 insertions, 12 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 8fca560cf78e..08da9fc616c4 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -153,6 +153,7 @@ INSTALL = install
153# explicitly what architecture to check for. Fix this up for yours.. 153# explicitly what architecture to check for. Fix this up for yours..
154SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__ 154SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
155 155
156ifneq ($(MAKECMDGOALS),clean)
156-include config/feature-tests.mak 157-include config/feature-tests.mak
157 158
158ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y) 159ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y)
@@ -206,6 +207,7 @@ ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y)
206 EXTLIBS := $(filter-out -lpthread,$(EXTLIBS)) 207 EXTLIBS := $(filter-out -lpthread,$(EXTLIBS))
207 BASIC_CFLAGS += -I. 208 BASIC_CFLAGS += -I.
208endif 209endif
210endif # MAKECMDGOALS != clean
209 211
210# Guard against environment variables 212# Guard against environment variables
211BUILTIN_OBJS = 213BUILTIN_OBJS =
@@ -230,11 +232,19 @@ endif
230LIBTRACEEVENT = $(TE_PATH)libtraceevent.a 232LIBTRACEEVENT = $(TE_PATH)libtraceevent.a
231TE_LIB := -L$(TE_PATH) -ltraceevent 233TE_LIB := -L$(TE_PATH) -ltraceevent
232 234
235export LIBTRACEEVENT
236
237# python extension build directories
238PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/
239PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/
240PYTHON_EXTBUILD_TMP := $(PYTHON_EXTBUILD)tmp/
241export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP
242
243python-clean := rm -rf $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so
244
233PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) 245PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)
234PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py 246PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py
235 247
236export LIBTRACEEVENT
237
238$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) 248$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS)
239 $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \ 249 $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \
240 --quiet build_ext; \ 250 --quiet build_ext; \
@@ -514,6 +524,7 @@ PERFLIBS = $(LIB_FILE) $(LIBTRACEEVENT)
514# 524#
515# Platform specific tweaks 525# Platform specific tweaks
516# 526#
527ifneq ($(MAKECMDGOALS),clean)
517 528
518# We choose to avoid "if .. else if .. else .. endif endif" 529# We choose to avoid "if .. else if .. else .. endif endif"
519# because maintaining the nesting to match is a pain. If 530# because maintaining the nesting to match is a pain. If
@@ -703,7 +714,7 @@ disable-python = $(eval $(disable-python_code))
703define disable-python_code 714define disable-python_code
704 BASIC_CFLAGS += -DNO_LIBPYTHON 715 BASIC_CFLAGS += -DNO_LIBPYTHON
705 $(if $(1),$(warning No $(1) was found)) 716 $(if $(1),$(warning No $(1) was found))
706 $(warning Python support won't be built) 717 $(warning Python support will not be built)
707endef 718endef
708 719
709override PYTHON := \ 720override PYTHON := \
@@ -711,19 +722,10 @@ override PYTHON := \
711 722
712ifndef PYTHON 723ifndef PYTHON
713 $(call disable-python,python interpreter) 724 $(call disable-python,python interpreter)
714 python-clean :=
715else 725else
716 726
717 PYTHON_WORD := $(call shell-wordify,$(PYTHON)) 727 PYTHON_WORD := $(call shell-wordify,$(PYTHON))
718 728
719 # python extension build directories
720 PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/
721 PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/
722 PYTHON_EXTBUILD_TMP := $(PYTHON_EXTBUILD)tmp/
723 export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP
724
725 python-clean := rm -rf $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so
726
727 ifdef NO_LIBPYTHON 729 ifdef NO_LIBPYTHON
728 $(call disable-python) 730 $(call disable-python)
729 else 731 else
@@ -839,6 +841,8 @@ ifdef ASCIIDOC8
839 export ASCIIDOC8 841 export ASCIIDOC8
840endif 842endif
841 843
844endif # MAKECMDGOALS != clean
845
842# Shell quote (do not use $(call) to accommodate ancient setups); 846# Shell quote (do not use $(call) to accommodate ancient setups);
843 847
844ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG)) 848ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG))