[openwrt/openwrt] tools/libtool: bootstrap to local gnulib source

LEDE Commits lede-commits at lists.infradead.org
Thu May 4 11:07:29 PDT 2023


ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/87e902fcdcce0e3d1287deb901f934aabf7ec183

commit 87e902fcdcce0e3d1287deb901f934aabf7ec183
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Thu Mar 23 03:53:52 2023 -0400

    tools/libtool: bootstrap to local gnulib source
    
    Using the local gnulib source during bootstrap
    allows for fine-grained control over the macros
    and source files for use with libtool
    but part of gnulib instead of libtool,
    without having to wait for a release
    or deal with gnulib as a git submodule.
    
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
---
 tools/Makefile         |  2 +-
 tools/libtool/Makefile | 18 ++++++++++++++++--
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/tools/Makefile b/tools/Makefile
index 3bf94827cf..3f12828a8f 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -104,7 +104,7 @@ $(curdir)/gmp/compile := $(curdir)/libtool/compile
 $(curdir)/isl/compile := $(curdir)/gmp/compile
 $(curdir)/liblzo/compile := $(curdir)/cmake/compile
 $(curdir)/libressl/compile := $(curdir)/pkgconf/compile
-$(curdir)/libtool/compile := $(curdir)/automake/compile $(curdir)/missing-macros/compile
+$(curdir)/libtool/compile := $(curdir)/automake/compile $(curdir)/gnulib/compile $(curdir)/missing-macros/compile
 $(curdir)/lz4/compile := $(curdir)/meson/compile
 $(curdir)/lzma-old/compile := $(curdir)/zlib/compile
 $(curdir)/lzop/compile := $(curdir)/cmake/compile $(curdir)/liblzo/compile
diff --git a/tools/libtool/Makefile b/tools/libtool/Makefile
index b4f3ecc36b..1187191478 100644
--- a/tools/libtool/Makefile
+++ b/tools/libtool/Makefile
@@ -18,17 +18,31 @@ HOST_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/host-build.mk
 
+export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
+
 HOST_CONFIGURE_VARS += \
 	lt_cv_sys_dlsearch_path=""
 
+define Host/Bootstrap
+	( \
+		cd $(HOST_BUILD_DIR); \
+		$(AM_TOOL_PATHS) \
+		./bootstrap \
+			--force \
+			--skip-git \
+			--skip-po \
+			--gnulib-srcdir=$(GNULIB_SRCDIR) \
+	)
+endef
+
 define Host/Prepare
 	$(call Host/Prepare/Default)
 	$(call Host/Uninstall)
-	$(if $(QUILT),,(cd $(HOST_BUILD_DIR); touch README-release; $(AM_TOOL_PATHS) ./bootstrap --skip-git --skip-po --force))
+	$(if $(QUILT),,$(call Host/Bootstrap))
 endef
 
 define Host/Configure
-	$(if $(QUILT),(cd $(HOST_BUILD_DIR); touch README-release; $(AM_TOOL_PATHS) ./bootstrap --skip-git --skip-po --force))
+	$(if $(QUILT),$(call Host/Bootstrap))
 	$(call Host/Configure/Default)
 endef
 




More information about the lede-commits mailing list