Ralf Wildenhues wrote: > Hello Jim, all, ... > 2) disable parallel builds if more than one target is listed on the > command line, and at least one of them invokes a recursive target. > This is the gist of the issue, and the patch only avoids this issue > while practically enabling parallelism throughout the build. It makes > use of a couple of undocumented Automake details, but is pretty safe in > the sense that is trivially backward compatible to older Automake; I > intend to define AM_RECURSIVE_TARGETS in a future Automake so that > relying on undocumented won't be needed any more. > > This second patch shaves a quarter off of the time for 'make -j3 all' of > git M4 on a two-way system. It does expose a parallel ordering bug in > the M4 makefile though (more on this on the m4-patches list). > > Of course, if the package author has added targets to Makefile.am which > are recursive, or invoke recursive targets, then they need to be taken > into account now, too: she should add them to ALL_RECURSIVE_TARGETS. > > What do you think? Is this too complicated to be adhered to? > > I really like that it even causes things like > make -j3 clean all check distcheck > > to DTRT now! ... > GNUmakefile: disable parallelism only for multiple, recursive targets > > * top/GNUmakefile (ALL_RECURSIVE_TARGETS): New macro; allow user > additions in the Makefile. > (AM_RECURSIVE_TARGETS): New macro, override only if not provided > by Automake. > (.NOTPARALLEL): Only disable parallel builds if multiple targets > are listed on the command line and at least one of them is > listed in $(ALL_RECURSIVE_TARGETS).
Hi Ralf, Thanks for dealing with that. It's been a thorn in my side for ages, though it's been off my radar until recently. Your second patch is fine with me. It makes "make syntax-check" noticeably faster, too.
