diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-02 14:47:42 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-02 14:47:42 +0000 |
commit | 0a3f396665a65b5518a6740f8d5f2ee7213bb009 (patch) | |
tree | b7a57436074fa3709b7a701d80df7aa0d7d3ab1c | |
parent | 2de07da5b0421fb2b784900d0c79ec0ccf4043b4 (diff) | |
download | master-187ad058-0a3f396665a65b5518a6740f8d5f2ee7213bb009.tar.gz master-187ad058-0a3f396665a65b5518a6740f8d5f2ee7213bb009.tar.bz2 master-187ad058-0a3f396665a65b5518a6740f8d5f2ee7213bb009.zip |
perf: build in a copy of the source dir instead of relying on make clean
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48065 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/devel/perf/Makefile | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile index 5e3d63f68c..c03b9330f4 100644 --- a/package/devel/perf/Makefile +++ b/package/devel/perf/Makefile @@ -14,6 +14,10 @@ PKG_RELEASE:=2 PKG_USE_MIPS16:=0 +# Perf's makefile and headers are not relocatable and must be built from the +# Linux sources directory +PKG_BUILD_DIR:=$(LINUX_DIR)/tools/perf-$(TARGET_DIR_NAME) + include $(INCLUDE_DIR)/package.mk define Package/perf @@ -29,20 +33,8 @@ define Package/perf/description perf is the Linux performance monitoring tool endef -# Perf's makefile and headers are not relocatable and must be built from the -# Linux sources directory define Build/Prepare - $(RM) -r $(PKG_BUILD_DIR) - $(LN) $(LINUX_DIR)/tools/perf $(PKG_BUILD_DIR) -endef - -# MAKE_FLAGS should be passed again upon cleaning because Perf's makefile -# always performs checks before processing any rule -define Build/Clean - -$(MAKE) -C $(PKG_BUILD_DIR) \ - NO_DWARF=1 \ - $(MAKE_FLAGS) \ - clean + $(CP) $(LINUX_DIR)/tools/perf/* $(PKG_BUILD_DIR)/ endef MAKE_FLAGS = \ @@ -62,7 +54,7 @@ MAKE_FLAGS = \ define Package/perf/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(LINUX_DIR)/tools/perf/perf $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/perf $(1)/usr/bin/ endef $(eval $(call BuildPackage,perf)) |