summaryrefslogtreecommitdiffstats
path: root/tools/automake
diff options
context:
space:
mode:
authorMichael Pratt <mcpratt@pm.me>2023-03-14 05:03:24 -0400
committerHauke Mehrtens <hauke@hauke-m.de>2023-03-27 00:41:49 +0200
commitb094c6976c161643d5c656b16738a65d28722b18 (patch)
tree30b343ba24728971597b76fdb06386bc7925ef67 /tools/automake
parentceac4ae3b403d52735f371b741f9fd6cbbe08b31 (diff)
downloadopenwrt-b094c6976c161643d5c656b16738a65d28722b18.tar.gz
openwrt-b094c6976c161643d5c656b16738a65d28722b18.tar.bz2
openwrt-b094c6976c161643d5c656b16738a65d28722b18.zip
tools/automake: verbose variable compatibility
An old patch attempted to harmonize the way that both Openwrt and Automake uses the $(V) variable. However, it was reverted because of the side-effects. This method is more simple and just allows Automake to accept any string as part of the verbosity toggle, falling back to the default if null. Ref: e6901bf90 ("tools/automake: Revert "Do not use $(V) - force AM_V=1"") Ref: 43365ca66 ("Do not use $(V) - force AM_V=1") Signed-off-by: Michael Pratt <mcpratt@pm.me>
Diffstat (limited to 'tools/automake')
-rw-r--r--tools/automake/patches/200-other-V-values-for-verbosity.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/tools/automake/patches/200-other-V-values-for-verbosity.patch b/tools/automake/patches/200-other-V-values-for-verbosity.patch
new file mode 100644
index 0000000000..1ea9d38b0e
--- /dev/null
+++ b/tools/automake/patches/200-other-V-values-for-verbosity.patch
@@ -0,0 +1,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
+
+ :