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
Answertopia.com

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

  




 

 

11.8 The Make Macro MAKEFLAGS

Posix requires make to use MAKEFLAGS to affect the current and recursive invocations of make, but allows implementations several formats for the variable. It is tricky to parse $MAKEFLAGS to determine whether -s for silent execution or -k for continued execution are in effect. For example, you cannot assume that the first space-separated word in $MAKEFLAGS contains single-letter options, since in the Cygwin version of GNU make it is either --unix or --win32 with the second word containing single-letter options.

     $ cat Makefile
     all:
             @echo MAKEFLAGS = $(MAKEFLAGS)
     $ make
     MAKEFLAGS = --unix
     $ make -k
     MAKEFLAGS = --unix -k

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