mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-12-29 08:09:02 +00:00
c7732bd5ad
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.
24 lines
629 B
Perl
24 lines
629 B
Perl
# -*-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;
|