summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Pratt2024-06-20 04:55:58 +0000
committerRobert Marko2024-07-08 06:49:43 +0000
commit9c833bc1c42cefc6294571d22c2f2e0ba344884c (patch)
tree2f472ff77f13f372f316ef441e5c662b1d9eb1ed
parent3de19697fdd5baee3df9c67fdec48fe48e673894 (diff)
downloadopenwrt-9c833bc1c42cefc6294571d22c2f2e0ba344884c.tar.gz
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@pm.me> Link: https://github.com/openwrt/openwrt/pull/15853 Signed-off-by: Robert Marko <robimarko@gmail.com>
-rw-r--r--include/host-build.mk13
1 files changed, 13 insertions, 0 deletions
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