Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349878
b: refs/heads/master
c: 3cde41b
h: refs/heads/master
v: v3
  • Loading branch information
Namhyung Kim authored and Arnaldo Carvalho de Melo committed Dec 9, 2012
1 parent 4a0db5f commit 6545ed3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b56e53312d445967f6bdb91e5667c56755e47450
refs/heads/master: 3cde41b0d63d0550ac9c8352f1ce0ea516690f46
2 changes: 2 additions & 0 deletions trunk/tools/perf/Documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,12 @@ install-pdf: pdf
#install-html: html
# '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir)

ifneq ($(MAKECMDGOALS),clean)
$(OUTPUT)PERF-VERSION-FILE: .FORCE-PERF-VERSION-FILE
$(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) $(OUTPUT)PERF-VERSION-FILE

-include $(OUTPUT)PERF-VERSION-FILE
endif

#
# Determine "include::" file references in asciidoc files.
Expand Down
28 changes: 16 additions & 12 deletions trunk/tools/perf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ INSTALL = install
# explicitly what architecture to check for. Fix this up for yours..
SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__

ifneq ($(MAKECMDGOALS),clean)
-include config/feature-tests.mak

ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y)
Expand Down Expand Up @@ -206,6 +207,7 @@ ifeq ($(call try-cc,$(SOURCE_BIONIC),$(CFLAGS),bionic),y)
EXTLIBS := $(filter-out -lpthread,$(EXTLIBS))
BASIC_CFLAGS += -I.
endif
endif # MAKECMDGOALS != clean

# Guard against environment variables
BUILTIN_OBJS =
Expand All @@ -230,11 +232,19 @@ endif
LIBTRACEEVENT = $(TE_PATH)libtraceevent.a
TE_LIB := -L$(TE_PATH) -ltraceevent

export LIBTRACEEVENT

# python extension build directories
PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/
PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/
PYTHON_EXTBUILD_TMP := $(PYTHON_EXTBUILD)tmp/
export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP

python-clean := rm -rf $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so

PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)
PYTHON_EXT_DEPS := util/python-ext-sources util/setup.py

export LIBTRACEEVENT

$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS)
$(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \
--quiet build_ext; \
Expand Down Expand Up @@ -514,6 +524,7 @@ PERFLIBS = $(LIB_FILE) $(LIBTRACEEVENT)
#
# Platform specific tweaks
#
ifneq ($(MAKECMDGOALS),clean)

# We choose to avoid "if .. else if .. else .. endif endif"
# because maintaining the nesting to match is a pain. If
Expand Down Expand Up @@ -703,27 +714,18 @@ disable-python = $(eval $(disable-python_code))
define disable-python_code
BASIC_CFLAGS += -DNO_LIBPYTHON
$(if $(1),$(warning No $(1) was found))
$(warning Python support won't be built)
$(warning Python support will not be built)
endef

override PYTHON := \
$(call get-executable-or-default,PYTHON,python)

ifndef PYTHON
$(call disable-python,python interpreter)
python-clean :=
else

PYTHON_WORD := $(call shell-wordify,$(PYTHON))

# python extension build directories
PYTHON_EXTBUILD := $(OUTPUT)python_ext_build/
PYTHON_EXTBUILD_LIB := $(PYTHON_EXTBUILD)lib/
PYTHON_EXTBUILD_TMP := $(PYTHON_EXTBUILD)tmp/
export PYTHON_EXTBUILD_LIB PYTHON_EXTBUILD_TMP

python-clean := rm -rf $(PYTHON_EXTBUILD) $(OUTPUT)python/perf.so

ifdef NO_LIBPYTHON
$(call disable-python)
else
Expand Down Expand Up @@ -839,6 +841,8 @@ ifdef ASCIIDOC8
export ASCIIDOC8
endif

endif # MAKECMDGOALS != clean

# Shell quote (do not use $(call) to accommodate ancient setups);

ETC_PERFCONFIG_SQ = $(subst ','\'',$(ETC_PERFCONFIG))
Expand Down

0 comments on commit 6545ed3

Please sign in to comment.