On Wed, Nov 13, 2024 at 3:45 PM Chet Ramey <chet.ra...@case.edu> wrote: > > On 11/12/24 8:17 PM, Grisha Levit wrote: > > I'm not sure if this is the most idiomatic way to write the rule, but > > if a libintl.h is generated, it needs to make it into the installed > > headers directory to allow loadables to build. > > I assume you mean third-party loadables, right? None of the examples use > any of the gettext or locale functions in libintl.
The test I did was like the below (after applying the -DHAVE_CONFIG_H fix): mkdir -p /tmp/load-build cd ~/src/bash/examples/loadables for src in *.c; do clang $(pkg-config --cflags bash) \ "$src" -c -o "/tmp/load-build/${src%.c}.o" done This had the following errors: In file included from getconf.c:24: …/include/bash/include/gettext.h:27:11: fatal error: 'libintl.h' file not found 27 | # include <libintl.h> | ^~~~~~~~~~~ 1 error generated. In file included from seq.c:32: In file included from …/include/bash/bashintl.h:30: /include/bash/include/gettext.h:27:11: fatal error: 'libintl.h' file not found 27 | # include <libintl.h> | ^~~~~~~~~~~ 1 error generated. > > > + $(INSTALL_DATA) $(LIBINT_H) $(DESTDIR)$(headersdir)/ || exit > > 1; \ > > I figure that's a typo. Yes, sorry about that. I'll try to switch to using make with --warn-undefined-variables by default.