Skip to content

Commit

Permalink
build: add default host build recipes for gnulib
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: openwrt/openwrt#15853
Signed-off-by: Robert Marko <[email protected]>
  • Loading branch information
mcprat authored and coolsnowwolf committed Dec 2, 2024
1 parent 70c103f commit 003a084
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions include/host-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)" \
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 003a084

Please sign in to comment.