Author: nbd
Date: 2016-01-02 15:47:42 +0100 (Sat, 02 Jan 2016)
New Revision: 48065

Modified:
   trunk/package/devel/perf/Makefile
Log:
perf: build in a copy of the source dir instead of relying on make clean

Signed-off-by: Felix Fietkau <[email protected]>

Modified: trunk/package/devel/perf/Makefile
===================================================================
--- trunk/package/devel/perf/Makefile   2016-01-02 11:44:08 UTC (rev 48064)
+++ trunk/package/devel/perf/Makefile   2016-01-02 14:47:42 UTC (rev 48065)
@@ -14,6 +14,10 @@
 
 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,22 +33,10 @@
   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)
+       $(CP) $(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
-endef
-
 MAKE_FLAGS = \
        ARCH="$(LINUX_KARCH)" \
        NO_LIBPERL=1 \
@@ -62,7 +54,7 @@
 
 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))
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to