manpagez: man pages & more
info autoconf
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.3 Special Characters in Make Macro Names

Posix limits macro names to nonempty strings containing only ASCII letters and digits, ‘.’, and ‘_’. Many make implementations allow a wider variety of characters, but portable makefiles should avoid them. It is portable to start a name with a special character, e.g., ‘$(.FOO)’.

Some ancient make implementations don’t support leading underscores in macro names. An example is NEWS-OS 4.2R.

$ cat Makefile
_am_include = #
_am_quote =
all:; @echo this is test
$ make
Make: Must be a separator on rules line 2.  Stop.
$ cat Makefile2
am_include = #
am_quote =
all:; @echo this is test
$ make -f Makefile2
this is test

However, this problem is no longer of practical concern.


This document was generated on April 26, 2012 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.