aboutsummaryrefslogtreecommitdiffstats
path: root/tools/automake/patches/200-other-V-values-for-verbosity.patch
blob: 1ea9d38b0ed1013a9ecaa4559d97132b30b29404 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From: Bogdan Drozdowski <bogdandr AT op.pl>
Date: Sat, 31 Dec 2022 20:17:35 +0100
Subject: [PATCH] Allow other V values for verbosity

---
 m4/silent.m4    |  2 +-
 t/silent-gen.sh | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

--- a/m4/silent.m4
+++ b/m4/silent.m4
@@ -43,7 +43,7 @@ else
 fi])
 if test $am_cv_make_support_nested_variables = yes; then
   dnl Using '$V' instead of '$(V)' breaks IRIX make.
-  AM_V='$(V)'
+  AM_V='$(shell if ( test "x$(V)" = "x0" ); then echo 0; elif ( test "x$(V)" = "x" ); then echo $(AM_DEFAULT_VERBOSITY); else echo 1; fi)'
   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
 else
   AM_V=$AM_DEFAULT_VERBOSITY
--- a/t/silent-gen.sh
+++ b/t/silent-gen.sh
@@ -54,6 +54,18 @@ grep 'cp ' stdout
 grep 'echo ' stdout
 
 $MAKE clean
+run_make -O V=99
+grep 'GEN ' stdout && exit 1
+grep 'cp ' stdout
+grep 'echo ' stdout
+
+$MAKE clean
+run_make -O V=vvv
+grep 'GEN ' stdout && exit 1
+grep 'cp ' stdout
+grep 'echo ' stdout
+
+$MAKE clean
 run_make -O V=0
 grep 'GEN .*foo' stdout
 grep 'cp ' stdout && exit 1
@@ -78,5 +90,17 @@ run_make -O V=1
 grep 'GEN ' stdout && exit 1
 grep 'cp ' stdout
 grep 'echo ' stdout
+
+$MAKE clean
+run_make -O V=99
+grep 'GEN ' stdout && exit 1
+grep 'cp ' stdout
+grep 'echo ' stdout
+
+$MAKE clean
+run_make -O V=v
+grep 'GEN ' stdout && exit 1
+grep 'cp ' stdout
+grep 'echo ' stdout
 
 :