Dan Jacobson (20 November 2017 23:50) > (info "(make) Environment") should mention how equivalent > $ a=b make #and > $ make a=b > are to each other. > See also http://debbugs.gnu.org/29270
They're not quite equivalent, although an example like the one you give may be a good one for the documentation to explore in explaining what the difference is. Assignments as command-line arguments over-ride assignments in the make-files which, in turn, over-ride assignments in the environment. Thus if a make-file says: CPPFLAGS = -DNDEBUG -Iapi then invoking CPPFLAGS=-DCUSTOM_DEBUG make will ignore the environment setting and use -DNDEBUG -Iapi; while make CPPFLAGS=-DCUSTOM_DEBUG will use -DCUSTOM_DEBUG and ignore the make-file's setting (so no -Iapi option will be passed to your compiler). IIRC, there is an "override" command you can use in the make-file to make its setting override even the command-line. I can't remember what happens if you use += in the make-file: I'm fairly sure it extends whatever you had in the environment, but I can't remember whether it extends a value set on the command-line. Eddy. _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make