Paul Smith <psm...@gnu.org> 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 _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make