summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-05-13 02:48:04 -0400
committerPaul Smith <psmith@gnu.org>2013-05-13 02:48:18 -0400
commitc7732bd5add31b38fea113c9ab4ad4d97a0870c7 (patch)
treea5a83eb8d54fa5cc32ab8e40ad619ca6d0f45d2f /main.c
parent2627d8322136eac2b499dd12e2769eb01d7c74bc (diff)
downloadgunmake-c7732bd5add31b38fea113c9ab4ad4d97a0870c7.tar.gz
Add a new variable: GNUMAKEFLAGS
This allows you to write portable makefiles that set GNU make-specific command line options in the environment or makefile: add them to GNUMAKEFLAGS instead of MAKEFLAGS and they will be seen by GNU make but ignored by other implementations of make.
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.c b/main.c
index f3c4a3d..8eed56d 100644
--- a/main.c
+++ b/main.c
@@ -1339,7 +1339,9 @@ main (int argc, char **argv, char **envp)
/* Decode the switches. */
+ decode_env_switches (STRING_SIZE_TUPLE ("GNUMAKEFLAGS"));
decode_env_switches (STRING_SIZE_TUPLE ("MAKEFLAGS"));
+
#if 0
/* People write things like:
MFLAGS="CC=gcc -pipe" "CFLAGS=-g"
@@ -1766,6 +1768,7 @@ main (int argc, char **argv, char **envp)
#endif /* __MSDOS__ || __EMX__ */
/* Decode switches again, in case the variables were set by the makefile. */
+ decode_env_switches (STRING_SIZE_TUPLE ("GNUMAKEFLAGS"));
decode_env_switches (STRING_SIZE_TUPLE ("MAKEFLAGS"));
#if 0
decode_env_switches (STRING_SIZE_TUPLE ("MFLAGS"));