From 003a084905e1d50a7053f68228244bbb41f13a3e Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Thu, 20 Jun 2024 00:55:58 -0400 Subject: [PATCH] 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 Link: https://github.com/openwrt/openwrt/pull/15853 Signed-off-by: Robert Marko --- include/host-build.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/host-build.mk b/include/host-build.mk index 8f11388cc..be7285c7e 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -44,6 +44,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)" \ @@ -107,6 +116,10 @@ define Host/Compile $(call Host/Compile/Default) endef +define Host/Gnulib/Compile + $(call Host/Compile/Default,SUBDIRS='$$$$(wildcard $(PKG_GNULIB_BASE))') +endef + define Host/Install/Default $(call Host/Compile/Default,install) endef