[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Parallel make output in $(shell ${MAKE} ...)
From: |
Paul Smith |
Subject: |
Re: Parallel make output in $(shell ${MAKE} ...) |
Date: |
Sat, 06 Mar 2021 13:59:57 -0500 |
User-agent: |
Evolution 3.36.4-0ubuntu1 |
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)