[openwrt/openwrt] build: add default host build recipes for gnulib
LEDE Commits
lede-commits at lists.infradead.org
Sun Jul 7 23:49:49 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9c833bc1c42cefc6294571d22c2f2e0ba344884c
commit 9c833bc1c42cefc6294571d22c2f2e0ba344884c
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Thu Jun 20 00:55:58 2024 -0400
build: add default host build recipes for gnulib
Add generic recipes for incorporating gnulib into a build
for simplification and readability of the individual build Makefile.
Recipes for configuring and installing are purposefully missing
since "configuring" gnulib is done with standard autoreconf
and gnulib is not a final build target meant for installing.
Signed-off-by: Michael Pratt <mcpratt at pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
include/host-build.mk | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/include/host-build.mk b/include/host-build.mk
index 7e64fc16fe..8313dbfbb3 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -45,6 +45,15 @@ define Host/Prepare
$(call Host/Prepare/Default)
endef
+define Host/Gnulib/Prepare
+ $(STAGING_DIR_HOST)/bin/gnulib-tool \
+ --local-dir=$(STAGING_DIR_HOST)/share/gnulib \
+ --source-base=$(PKG_GNULIB_BASE) \
+ $(PKG_GNULIB_ARGS) \
+ $(PKG_GNULIB_MODS) \
+ ;
+endef
+
HOST_CONFIGURE_VARS = \
CC="$(HOSTCC)" \
CFLAGS="$(HOST_CFLAGS)" \
@@ -113,6 +122,10 @@ define Host/Compile
$(call Host/Compile/Default,$(if $(PKG_SUBDIRS),SUBDIRS='$$$$(wildcard $(PKG_SUBDIRS))'))
endef
+define Host/Gnulib/Compile
+ $(call Host/Compile/Default,SUBDIRS='$$$$(wildcard $(PKG_GNULIB_BASE))')
+endef
+
define Host/Install/Default
$(call Host/Compile/Default,$(if $(PKG_SUBDIRS),SUBDIRS='$$$$(wildcard $(PKG_SUBDIRS))') install)
endef
More information about the lede-commits
mailing list