On Mon, 5 Oct 2020 22:48:56 +0200
Danny Milosavljevic <[email protected]> wrote:

> Hi,
> 
> On Mon, 05 Oct 2020 15:41:52 -0400
> Paul Smith <[email protected]> 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