summaryrefslogtreecommitdiffstats
path: root/tools/elfutils/Makefile
diff options
context:
space:
mode:
authorMichael Pratt <mcpratt@pm.me>2024-04-07 15:28:03 -0400
committerRobert Marko <robimarko@gmail.com>2024-04-25 21:33:51 +0200
commit7a4df7825eae83650c42ef9839f985f6fdc87b09 (patch)
tree6d39e780b5225e9869aff26115206adf7e37380c /tools/elfutils/Makefile
parentb6f025b42429ec809afeb0956b35535c248b6c1b (diff)
downloadopenwrt-7a4df7825eae83650c42ef9839f985f6fdc87b09.tar.gz
openwrt-7a4df7825eae83650c42ef9839f985f6fdc87b09.tar.bz2
openwrt-7a4df7825eae83650c42ef9839f985f6fdc87b09.zip
tools/elfutils: override SUBDIRS variable of Makefile
Instead of editing the SUBDIRS variable with a patch, it can be overriden at the end of the command line when invoking Make. This tool has a series of recursive Makefiles in each subdirectory, therefore SUBDIRS is set to a pattern of Make functions so that the result is variable depending on the current subdirectory that Make is being invoked in. It's not necessary to have gnulib-cache.m4 in EXTRA_DIST since we don't need to re-import after packaging this in the SDK, so get rid of the entire patch hunk for ./Makefile.am Tested-by: Georgi Valkov <gvalkov@gmail.com> # MacOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Diffstat (limited to 'tools/elfutils/Makefile')
-rw-r--r--tools/elfutils/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile
index adf8770783..f13bd8c944 100644
--- a/tools/elfutils/Makefile
+++ b/tools/elfutils/Makefile
@@ -17,6 +17,18 @@ PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
+PKG_SUBDIRS := \
+ libgnu \
+ config \
+ lib \
+ libelf \
+ libcpu \
+ backends \
+ libebl \
+ libdwelf \
+ libdwfl \
+ libdw
+
include $(INCLUDE_DIR)/host-build.mk
ifeq ($(HOST_OS),Darwin)
@@ -47,6 +59,14 @@ define Host/Gnulib
ln -sf ../lib/eu-config.h $(HOST_BUILD_DIR)/libgnu/;
endef
+define Host/Compile
+ $(call Host/Compile/Default,SUBDIRS='$$$$(wildcard $(PKG_SUBDIRS))')
+endef
+
+define Host/Install
+ $(call Host/Compile/Default,install SUBDIRS='$$$$(wildcard $(PKG_SUBDIRS))')
+endef
+
define Host/Uninstall
-$(call Host/Compile/Default,uninstall)
endef