the top level Makefile will recurse into the defdir for multiple targets (libbuiltins.a, common.o, bashgetopt.o, builtext.h), and since these do not have any declared interdependencies, parallel makes will recurse into the subdir and build the respective targets.
nothing depends on common.o or bashgetopt.o, so those targets don't get used normally. this leaves libbuiltins.a and builtext.h. at a glance, this shouldn't be a big deal, but when we look closer, there's a subtle failure lurking. most of the objects in the defdir need to be generated which means they need to build+link the local mkbuiltins helper. the builtext.h header also needs to be generated by the mkbuiltins helper. so when the top level launches a child for libbuiltins.a and a child for builtext.h, we can hit a race condition where the two try to generate mkbuiltins, and the build randomly fails. so update libbuiltins.a to depend on builtext.h. this should be fairly simple since it's only a single target. --- a/Makefile.in +++ b/Makefile.in @@ -674,7 +674,7 @@ $(RM) $@ ./mksyntax$(EXEEXT) -o $@ -$(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h version.h +$(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h ${DEFDIR}/builtext.h version.h @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libbuiltins.a ) || exit 1 # these require special rules to circumvent make builtin rules
signature.asc
Description: This is a digitally signed message part.