[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [regression] make 4.0+ breaks 'export' when '-e' option is given
From: |
Enrico Scholz |
Subject: |
Re: [regression] make 4.0+ breaks 'export' when '-e' option is given |
Date: |
Tue, 09 Feb 2016 20:18:59 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Paul Smith <address@hidden> writes:
>> to pass down *all* environment variables given on cmdline to sub
>> -makes, I used to write
>>
>> | export ${MAKEOVERRIDES}
>
> Why are you doing this? Make always provides all the command-line
> variables you set to all sub-makes.
GNU make 4.0 seems to implement the behavior described in its documentation:
| 5.7.2 Communicating Variables to a Sub-`make'
| ...
| `make' exports a variable only if it is either defined in the environment
| initially or set on the command line, and if its name consists only of
| letters, numbers, and underscores.
E.g. I will *not* pass 'a-b' to its sub makes. GNU make 3.82's
documentation contains this phrase too but implementation seems to
ignore this constraint.
When you run my example without the 'export' line, you get with '-e':
| TEST1 ><
| TEST2 >ok ab bar a_b=XXX<
Unfortunately, I can not enumerate the variables and solutions like
| export a-b
will not work hence.
Enrico