bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU Make 4.3: Makefile rule spooky action at a distance


From: Henrik Carlqvist
Subject: Re: GNU Make 4.3: Makefile rule spooky action at a distance
Date: Tue, 6 Oct 2020 07:19:21 +0200

On Mon, 5 Oct 2020 22:48:56 +0200
Danny Milosavljevic <dannym@scratchpost.org> wrote:

> Hi,
> 
> On Mon, 05 Oct 2020 15:41:52 -0400
> Paul Smith <psmith@gnu.org> wrote:
> 
> > It would be interesting to know if adding an explicit export solves the
> > problem.  
> 
> I tried adding an explicit export at the toplevel makefile right before the
> invocation of the submake--it does not solve the problem.  Behavior is
> exactly the same.
 
I have also tried to export the variable in the shell, it does not solve the
problem:

bash-4.3$ export CFLAGS=ok      
bash-4.3$ echo $CFLAGS
ok
bash-4.3$ make
make -C foo all
make[1]: Entering directory '/tmp/mk_test/foo'
echo internal
internal
make[1]: Leaving directory '/tmp/mk_test/foo'
bash-4.3$ 

However, setting the variable among the make options seems to work as
expected:

bash-4.3$ make CFLAGS=ok
make -C foo all
make[1]: Entering directory '/tmp/mk_test/foo'
echo ok
ok
make[1]: Leaving directory '/tmp/mk_test/foo'
bash-4.3$ 

The above tests were done with make version 4.1 on a Slackware 14.2 system.

regards Henrik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]