summaryrefslogtreecommitdiffstats
path: root/tools/gengetopt/Makefile
diff options
context:
space:
mode:
authorMichael Pratt <mcpratt@pm.me>2023-03-26 04:11:13 -0400
committerChristian Marangi <ansuelsmth@gmail.com>2023-05-04 06:07:28 +0200
commit4437434b8a4c8c4f9000caeb773c1aa248a6d29a (patch)
tree499d4f6da2731b92f0a077f1a13f36c04c8dd8b8 /tools/gengetopt/Makefile
parente764a909e3d468a5597373cac087ecc008540e2d (diff)
downloadopenwrt-4437434b8a4c8c4f9000caeb773c1aa248a6d29a.tar.gz
openwrt-4437434b8a4c8c4f9000caeb773c1aa248a6d29a.tar.bz2
openwrt-4437434b8a4c8c4f9000caeb773c1aa248a6d29a.zip
tools/gengetopt: override SUBDIRS variable with 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. By eliminating the patch, autoreconf is no longer required. Signed-off-by: Michael Pratt <mcpratt@pm.me>
Diffstat (limited to 'tools/gengetopt/Makefile')
-rw-r--r--tools/gengetopt/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/gengetopt/Makefile b/tools/gengetopt/Makefile
index 563ecccf9d..5a5b5eb7cb 100644
--- a/tools/gengetopt/Makefile
+++ b/tools/gengetopt/Makefile
@@ -13,12 +13,16 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
PKG_HASH:=b941aec9011864978dd7fdeb052b1943535824169d2aa2b0e7eae9ab807584ac
-HOST_FIXUP:=autoreconf
+PKG_SUBDIRS:=$$$$(foreach dir,gl src skels,$$$$(wildcard $$$$(dir)) )
HOST_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/host-build.mk
+define Host/Compile
+ $(call Host/Compile/Default,SUBDIRS='$(PKG_SUBDIRS)')
+endef
+
define Host/Install
$(INSTALL_BIN) $(HOST_BUILD_DIR)/src/gengetopt $(STAGING_DIR_HOST)/bin/
endef