diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-11-13 23:39:50 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-12-09 06:46:04 -0500 |
commit | 3cde41b0d63d0550ac9c8352f1ce0ea516690f46 (patch) | |
tree | c64f86746e0f88b220266046de3b912a0fc86e97 /tools/perf/Makefile | |
parent | b56e53312d445967f6bdb91e5667c56755e47450 (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/Makefile | 28 |
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.. |
154 | SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__ | 154 | SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__ |
155 | 155 | ||
156 | ifneq ($(MAKECMDGOALS),clean) | ||
156 | -include config/feature-tests.mak | 157 | -include config/feature-tests.mak |
157 | 158 | ||
158 | ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y) | 159 | ifeq ($(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. |
208 | endif | 209 | endif |
210 | endif # MAKECMDGOALS != clean | ||
209 | 211 | ||
210 | # Guard against environment variables | 212 | # Guard against environment variables |
211 | BUILTIN_OBJS = | 213 | BUILTIN_OBJS = |
@@ -230,11 +232,19 @@ endif | |||
230 | LIBTRACEEVENT = $(TE_PATH)libtraceevent.a | 232 | LIBTRACEEVENT = $(TE_PATH)libtraceevent.a |
231 | TE_LIB := -L$(TE_PATH) -ltraceevent | 233 | TE_LIB := -L$(TE_PATH) -ltraceevent |
232 | 234 | ||
235 | export LIBTRACEEVENT | ||
236 | |||
237 | # python extension build directories | ||
238 | PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/ | ||
239 | PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/ | ||
240 | PYTHON_EXTBUILD_TMP := $(PYTHON_EXTBUILD)tmp/ | ||
241 | export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP | ||
242 | |||
243 | python-clean := rm -rf $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so | ||
244 | |||
233 | PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) | 245 | PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) |
234 | PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py | 246 | PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py |
235 | 247 | ||
236 | export 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 | # |
527 | ifneq ($(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)) | |||
703 | define disable-python_code | 714 | define 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) |
707 | endef | 718 | endef |
708 | 719 | ||
709 | override PYTHON := \ | 720 | override PYTHON := \ |
@@ -711,19 +722,10 @@ override PYTHON := \ | |||
711 | 722 | ||
712 | ifndef PYTHON | 723 | ifndef PYTHON |
713 | $(call disable-python,python interpreter) | 724 | $(call disable-python,python interpreter) |
714 | python-clean := | ||
715 | else | 725 | else |
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 |
840 | endif | 842 | endif |
841 | 843 | ||
844 | endif # 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 | ||
844 | ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG)) | 848 | ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG)) |