Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

11.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.


 
 
  Published under the terms of the GNU General Public License Design by Interspire