|
@@ -181,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 +509,13 @@ else
|
|
|
|
|
|
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 +872,9 @@ install: all
|
|
|
$(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 +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
|