mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-12-28 15:57:48 +00:00
b5de783f77
Create a new variable run_silent to hold the current instance's global silence setting, allowing silent_flag to represent only whether the -s option was provided on the command line. * src/makeint.h: Change silent_flag variable to run_silent. * src/job.c: Ditto. * src/remake.c: Ditto. * src/file.c: Ditto. * src/main.c: Add a new global variable run_silent. (decode_switches): After switches are decoded, initialize run_silent. * tests/scripts/targets/SILENT: Add a test for recursive behavior.
33 lines
572 B
Perl
33 lines
572 B
Perl
# -*-perl-*-
|
|
|
|
$description = "Test the special target .SILENT.";
|
|
|
|
run_make_test(q!
|
|
.PHONY: M a b
|
|
M: a b
|
|
.SILENT : b
|
|
a b: ; echo $@
|
|
!,
|
|
'', "echo a\na\nb");
|
|
|
|
run_make_test(q!
|
|
.PHONY: M a b
|
|
M: a b
|
|
.SILENT:
|
|
a b: ; echo $@
|
|
!,
|
|
'', "a\nb");
|
|
|
|
# SV 54740 : don't inherit .SILENT settings in sub-makes
|
|
run_make_test(q!
|
|
.PHONY: M r a b
|
|
r: a b ; @$(MAKE) -f #MAKEFILE# M V=x
|
|
a b: ; echo $@
|
|
|
|
V =
|
|
$V.SILENT:
|
|
M: a b
|
|
!,
|
|
'--no-print-directory', "a\nb\necho a\na\necho b\nb");
|
|
|
|
1;
|