Skip to content

Commit 78a8cfb

Browse files
committed
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: c820f09 ("tools: gnulib: install .m4 file with gl_ prefix") Signed-off-by: Christian Marangi <[email protected]>
1 parent 9c6dbb0 commit 78a8cfb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/gnulib/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ endef
2020
define Host/Install
2121
$(call Host/Uninstall)
2222
$(INSTALL_DIR) $(1)/share/aclocal
23-
$(foreach m4,$(notdir $(wildcard $(HOST_BUILD_DIR)/m4/*.m4)),
24-
$(INSTALL_DATA) $(HOST_BUILD_DIR)/m4/$(m4) $(1)/share/aclocal/gl_$(m4))
23+
for m4 in $(HOST_BUILD_DIR)/m4/*.m4; do \
24+
$(INSTALL_DATA) $(HOST_BUILD_DIR)/m4/$$$$(basename $$$$m4) \
25+
$(1)/share/aclocal/gl_$$$$(basename $$$$m4); \
26+
done
2527
$(CP) $(HOST_BUILD_DIR)/ $(1)/share/gnulib/
2628
ln -sf ../share/gnulib/gnulib-tool $(STAGING_DIR_HOST)/bin/gnulib-tool
2729
endef

0 commit comments

Comments
 (0)