Next: , Previous: , Up: Portable Make   [Contents][Index]


12.15 Command-line Macros and whitespace

Some make implementations may strip trailing whitespace off of macros set on the command line in addition to leading whitespace. Further, some may strip leading whitespace off of macros set from environment variables:

$ echo 'print: ; @echo "x$(foo)x$(bar)x"' |
  foo=' f f ' make -f - bar=' b b '
x f f xb b x  # AIX, BSD, GNU make
xf f xb b x   # HP-UX, IRIX, Tru64/OSF make
x f f xb bx   # Solaris make