Paul Smith writes:

> I can't explain this nor reproduce it.  On my system no matter what
> version of GNU make I test with, all the way back to 3.77, I get the
> same, expected behavior: the variable is not exported.

Paul,

Thank you very much for your reply.  As you told, cause of the problem
was - chars in names of exported variables.  Once I replaced them with 
chars, my Makefiles started working again in Debian Stretch with
make 4.1.

> It should never be the case that the variable is exported, because
> "INSTALL-TOUCH" is not a valid shell variable (which consist of "_" and
> alphanumeric characters only and cannot start with a number).  GNU make
> does not export variables that are not valid shell variables.
> 
> I can't explain why it seems to work for you in Jessie.  It doesn't work
> for me in GNU make 4.0 (built on my system from original source).

I re-tested on pure Debian Jessie and variable names with - chars are
exported.  Below is the complete.

-- Juha

-----------------------------------------------------------------------

test$ more Makefile core/Makefile 
::::::::::::::
Makefile
::::::::::::::
export INSTALL-TOUCH=touch

all: core

.PHONY: core
core:
        @echo "INSTALL-TOUCH is $(INSTALL-TOUCH)"
        $(MAKE) -C core all;
::::::::::::::
core/Makefile
::::::::::::::
all: core

.PHONY: core
core:
        @echo "INSTALL-TOUCH in core is $(INSTALL-TOUCH)"
test$ make all
INSTALL-TOUCH is touch
make -C core all;
make[1]: Entering directory 'test/core'
INSTALL-TOUCH in core is touch
make[1]: Leaving directory 'test/core'
test$ 

_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to