mirror of
https://github.com/mirror/make.git
synced 2025-01-07 19:00:09 +08:00
7d8756a4a3
* doc/make.texi (Options/Recursion): Clarify that MAKEFLAGS values from the environment have precedence over those set in the makefile. * tests/scripts/variables/MAKEFLAGS: Check boolean switches -k/-S, -w/--no-print-directory and -s/--no-silent as follows: 1. A switch can be enabled or disabled on the command line. 2. A switch can be enabled or disabled in env. 3. A switch can be enabled or disabled in makefile. 4. Command line beats env and makefile. 5. Env beats makefile. 6. MAKEFLAGS contains each specified switch at parse and build time. 7. If switches are specified in multiple origins, MAKEFLAGS contains the winning switch at parse and build time. 8. MAKEFLAGS does not contain the losing switch. Also test that --debug settings from different origins are combined together into one option.
27 lines
966 B
Perl
27 lines
966 B
Perl
# -*-perl-*-
|
|
|
|
$description = "Test the -s (silent) and --no-silent options.\n";
|
|
|
|
run_make_test(q!
|
|
all: one two
|
|
one: ; @echo MAKEFLAGS=$$MAKEFLAGS
|
|
two: ; echo two
|
|
!,
|
|
'', "MAKEFLAGS=\necho two\ntwo");
|
|
|
|
run_make_test(undef, '-s', "MAKEFLAGS=s\ntwo");
|
|
run_make_test(undef, '--silent', "MAKEFLAGS=s\ntwo");
|
|
run_make_test(undef, '--quiet', "MAKEFLAGS=s\ntwo");
|
|
|
|
run_make_test(undef, '--no-silent', "MAKEFLAGS= --no-silent\necho two\ntwo");
|
|
|
|
run_make_test(undef, '-s --no-silent', "MAKEFLAGS= --no-silent\necho two\ntwo");
|
|
run_make_test(undef, '--silent --no-silent', "MAKEFLAGS= --no-silent\necho two\ntwo");
|
|
run_make_test(undef, '--quiet --no-silent', "MAKEFLAGS= --no-silent\necho two\ntwo");
|
|
|
|
run_make_test(undef, '--no-silent -s', "MAKEFLAGS=s\ntwo");
|
|
run_make_test(undef, '--no-silent --silent', "MAKEFLAGS=s\ntwo");
|
|
run_make_test(undef, '--no-silent --quiet', "MAKEFLAGS=s\ntwo");
|
|
|
|
1;
|