On Sat, 2021-03-06 at 12:57 -0500, Glenn Morris wrote: > texi_misc = $(shell ${MAKE} --no-print-directory -s -C doc/misc > echo-sources) > > It seems that texi_misc can end up containing parallel make output, > eg https://lists.gnu.org/r/emacs-devel/2021-03/msg00305.html > I found it surprising that $(shell ) could get polluted in this way.
It's unusual for a $(shell ...) function to invoke another make process; this is what's causing your problem. If you want to do this you need to make sure that the make being invoked that way is not inheriting the settings of the parent make process, particularly the -j setting. Make passes configuration through the environment, in the MAKEFLAGS argument. So even though you are not setting -j directly in your $(shell ...) invocation, the make you invoke is still inheriting this information via MAKEFLAGS. So, change your assignment to remove these settings: texi_misc = $(shell MAKEFLAGS= ${MAKE} --no-print-directory -s -C doc/misc > echo-sources)