diff options
author | Paul Smith <psmith@gnu.org> | 2013-05-13 02:48:04 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2013-05-13 02:48:18 -0400 |
commit | c7732bd5add31b38fea113c9ab4ad4d97a0870c7 (patch) | |
tree | a5a83eb8d54fa5cc32ab8e40ad619ca6d0f45d2f /tests/scripts | |
parent | 2627d8322136eac2b499dd12e2769eb01d7c74bc (diff) | |
download | gunmake-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 'tests/scripts')
-rw-r--r-- | tests/scripts/variables/GNUMAKEFLAGS | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/scripts/variables/GNUMAKEFLAGS b/tests/scripts/variables/GNUMAKEFLAGS new file mode 100644 index 0000000..7bfd822 --- /dev/null +++ b/tests/scripts/variables/GNUMAKEFLAGS @@ -0,0 +1,24 @@ +# -*-perl-*- + +$description = "Test proper behavior of GNUMAKEFLAGS"; + +# Accept flags from GNUMAKEFLAGS as well as MAKEFLAGS +# Results always go in MAKEFLAGS + +$extraENV{'GNUMAKEFLAGS'} = '-e -r -R'; + +run_make_test(q! +all: ; @echo $(MAKEFLAGS) +!, + '', 'Rre'); + +# Long arguments mean everything is prefixed with "-" + +$extraENV{'GNUMAKEFLAGS'} = '--no-print-directory -e -r -R --trace=none --trace=dir'; + +run_make_test(q! +all: ; @echo $(MAKEFLAGS) +!, + '', '--no-print-directory --trace=none --trace=dir --trace=none --trace=dir -Rre'); + +1; |