diff options
| author | Christian Marangi | 2025-12-04 15:32:03 +0000 |
|---|---|---|
| committer | Christian Marangi | 2025-12-04 15:35:40 +0000 |
| commit | 78a8cfb57772138ff5b925b9d69928e5878931bf (patch) | |
| tree | 7ec71d408e704058077d7ab7dfe27a60750c00d5 | |
| parent | 9c6dbb0e3d6c165c4924dd4ab10b27778a8c520c (diff) | |
| download | openwrt-78a8cfb57772138ff5b925b9d69928e5878931bf.tar.gz | |
tools: gnulib: fix broken install of .m4 files
Makefile foreach works only on parsing the Makefile and in this specific
case only works if the package is already extracted and file actually
exist.
On scenario where the package still has to be built, foreach doesn't
find any file causing Host/Install to not install any .m4 file.
To handle this, use a shell for loop that scan files in the
Host/install.
Fixes: c820f097e0be ("tools: gnulib: install .m4 file with gl_ prefix")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
| -rw-r--r-- | tools/gnulib/Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/gnulib/Makefile b/tools/gnulib/Makefile index 018ff5db14..0b28d73d13 100644 --- a/tools/gnulib/Makefile +++ b/tools/gnulib/Makefile @@ -20,8 +20,10 @@ endef define Host/Install $(call Host/Uninstall) $(INSTALL_DIR) $(1)/share/aclocal - $(foreach m4,$(notdir $(wildcard $(HOST_BUILD_DIR)/m4/*.m4)), - $(INSTALL_DATA) $(HOST_BUILD_DIR)/m4/$(m4) $(1)/share/aclocal/gl_$(m4)) + for m4 in $(HOST_BUILD_DIR)/m4/*.m4; do \ + $(INSTALL_DATA) $(HOST_BUILD_DIR)/m4/$$$$(basename $$$$m4) \ + $(1)/share/aclocal/gl_$$$$(basename $$$$m4); \ + done $(CP) $(HOST_BUILD_DIR)/ $(1)/share/gnulib/ ln -sf ../share/gnulib/gnulib-tool $(STAGING_DIR_HOST)/bin/gnulib-tool endef |