Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux...
authorIngo Molnar <mingo@elte.hu>
Tue, 9 Aug 2011 14:44:27 +0000 (16:44 +0200)
committerIngo Molnar <mingo@elte.hu>
Tue, 9 Aug 2011 14:44:27 +0000 (16:44 +0200)
1  2 
tools/perf/Makefile

diff --combined tools/perf/Makefile
@@@ -52,10 -52,7 +52,10 @@@ ifeq ($(ARCH),i386
  endif
  ifeq ($(ARCH),x86_64)
        ARCH := x86
 -      IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -xc - | tail -n 1)
 +      IS_X86_64 := 0
 +      ifeq (, $(findstring m32,$(EXTRA_CFLAGS)))
 +              IS_X86_64 := $(shell echo __x86_64__ | ${CC} -E -xc - | tail -n 1)
 +      endif
        ifeq (${IS_X86_64}, 1)
                RAW_ARCH := x86_64
                ARCH_CFLAGS := -DARCH_X86_64
@@@ -181,9 -178,9 +181,9 @@@ strip-libs = $(filter-out -l%,$(1)
  
  $(OUTPUT)python/perf.so: $(PYRF_OBJS)
        $(QUIET_GEN)CFLAGS='$(BASIC_CFLAGS)' $(PYTHON_WORD) util/setup.py \
-         --quiet build_ext \
-         --build-lib='$(OUTPUT)python' \
-         --build-temp='$(OUTPUT)python/temp'
+         --quiet build_ext; \
+       mkdir -p $(OUTPUT)python && \
+       cp $(PYTHON_EXTBUILD_LIB)perf.so $(OUTPUT)python/
  #
  # No Perl scripts right now:
  #
@@@ -509,9 -506,13 +509,13 @@@ els
  
    PYTHON_WORD := $(call shell-wordify,$(PYTHON))
  
-   python-clean := $(PYTHON_WORD) util/setup.py clean \
-     --build-lib='$(OUTPUT)python' \
-     --build-temp='$(OUTPUT)python/temp'
+   # 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)
@@@ -868,6 -869,9 +872,9 @@@ install: al
        $(INSTALL) scripts/python/*.py -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python'
        $(INSTALL) scripts/python/bin/* -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/python/bin'
  
+ install-python_ext:
+       $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)'
  install-doc:
        $(MAKE) -C Documentation install
  
@@@ -895,7 -899,7 +902,7 @@@ quick-install-html
  ### Cleaning rules
  
  clean:
-       $(RM) $(OUTPUT){*.o,*/*.o,*/*/*.o,*/*/*/*.o,$(LIB_FILE),perf-archive}
+       $(RM) $(LIB_OBJS) $(BUILTIN_OBJS) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf.o $(LANG_BINDINGS)
        $(RM) $(ALL_PROGRAMS) perf
        $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope*
        $(MAKE) -C Documentation/ clean