On jessie 8.6, /usr/share/doc/bash/examples/loadables/Makefile sets and
further uses a variable called BUILD_DIR, which points to
/build/bash-XesZLf/bash-4.3/build-bash, which doesn't exist.
I'm not on sid, but I see on there in bash-4.4, there's also a
/usr/lib/bash/Makefile.inc, which has the same problem.
I'm not sure if the fault is with the upstream or the debian packaging.
The reason I found out about it was because it breaks reproducibility
in reproducible builds, a diffoscope report is here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=806945;filename=bash_4.4-1.0~reproducible1.diffoscope;msg=57
However, it also appears that the Makefile supplied doesn't work if someone
actually wanted to use it to compile a builtin (although I may be doing
something wrong):
goblin@deb:/usr/share/doc/bash/examples/loadables$ make
gcc -fPIC -DHAVE_CONFIG_H -DSHELL -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -I. -I.. -I../../../. -I../../.././lib -I../../.././builtins -I../../.././include -I/build/bash-XesZLf/bash-4.3/build-bash -I/build/bash-XesZLf/bash-4.3/build-bash/lib -I/build/bash-XesZLf/bash-4.3/build-bash/builtins -c -o print.o print.c
print.c:24:22: fatal error: config.h: No such file or directory
# include <config.h>
^
compilation terminated.
Makefile:83: recipe for target 'print.o' failed
make: *** [print.o] Error 1
goblin@deb:/usr/share/doc/bash/examples/loadables$
I'm not quite sure how to use the Makefile.inc on sid to test, but there's
strong indication that it also won't quite work as expected (or at least
will add the weird -I lines to non-existing directories; these will be
silently ignored by gcc, but are still causing reproducibility problems).
I don't know what the best way to fix this is because I don't know how
those Makefiles are intended to be used, but perhaps you can advise?
Many thanks
Goblin