[openwrt/openwrt] tools/gengetopt: override SUBDIRS variable with Makefile
LEDE Commits
lede-commits at lists.infradead.org
Thu May 4 11:07:23 PDT 2023
ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/4437434b8a4c8c4f9000caeb773c1aa248a6d29a
commit 4437434b8a4c8c4f9000caeb773c1aa248a6d29a
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Sun Mar 26 04:11:13 2023 -0400
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 at pm.me>
---
tools/gengetopt/Makefile | 6 ++++-
tools/gengetopt/patches/100-no-tests-docs.patch | 33 -------------------------
2 files changed, 5 insertions(+), 34 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
diff --git a/tools/gengetopt/patches/100-no-tests-docs.patch b/tools/gengetopt/patches/100-no-tests-docs.patch
deleted file mode 100644
index d8c53af4fb..0000000000
--- a/tools/gengetopt/patches/100-no-tests-docs.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -18,7 +18,7 @@
- ACLOCAL_AMFLAGS = -I m4 -I gl/m4
-
- EXTRA_DIST = configure TODO LICENSE gl/m4/gnulib-cache.m4
--SUBDIRS = gl src doc tests
-+SUBDIRS = gl src
-
- gengetoptdoc_DATA = ChangeLog COPYING NEWS THANKS INSTALL README LICENSE
-
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -593,7 +593,7 @@ top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- ACLOCAL_AMFLAGS = -I m4 -I gl/m4
- EXTRA_DIST = configure TODO LICENSE gl/m4/gnulib-cache.m4
--SUBDIRS = gl src doc tests
-+SUBDIRS = gl src
- gengetoptdoc_DATA = ChangeLog COPYING NEWS THANKS INSTALL README LICENSE
- TARBALL = $(top_builddir)/gengetopt-$(PACKAGE_VERSION).tar.xz
- all: config.h
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -16,7 +16,7 @@
- # with gengetopt; see the file COPYING. If not, write to the Free Software
- # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
--SUBDIRS = skels tests
-+SUBDIRS = skels
-
- bin_PROGRAMS = gengetopt
-
More information about the lede-commits
mailing list