200-other-V-values-for-verbosity.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From: Bogdan Drozdowski <bogdandr AT op.pl>
  2. Date: Sat, 31 Dec 2022 20:17:35 +0100
  3. Subject: [PATCH] Allow other V values for verbosity
  4. ---
  5. m4/silent.m4 | 2 +-
  6. t/silent-gen.sh | 24 ++++++++++++++++++++++++
  7. 2 files changed, 25 insertions(+), 1 deletion(-)
  8. --- a/m4/silent.m4
  9. +++ b/m4/silent.m4
  10. @@ -43,7 +43,7 @@ else
  11. fi])
  12. if test $am_cv_make_support_nested_variables = yes; then
  13. dnl Using '$V' instead of '$(V)' breaks IRIX make.
  14. - AM_V='$(V)'
  15. + 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)'
  16. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  17. else
  18. AM_V=$AM_DEFAULT_VERBOSITY
  19. --- a/t/silent-gen.sh
  20. +++ b/t/silent-gen.sh
  21. @@ -54,6 +54,18 @@ grep 'cp ' stdout
  22. grep 'echo ' stdout
  23. $MAKE clean
  24. +run_make -O V=99
  25. +grep 'GEN ' stdout && exit 1
  26. +grep 'cp ' stdout
  27. +grep 'echo ' stdout
  28. +
  29. +$MAKE clean
  30. +run_make -O V=vvv
  31. +grep 'GEN ' stdout && exit 1
  32. +grep 'cp ' stdout
  33. +grep 'echo ' stdout
  34. +
  35. +$MAKE clean
  36. run_make -O V=0
  37. grep 'GEN .*foo' stdout
  38. grep 'cp ' stdout && exit 1
  39. @@ -78,5 +90,17 @@ run_make -O V=1
  40. grep 'GEN ' stdout && exit 1
  41. grep 'cp ' stdout
  42. grep 'echo ' stdout
  43. +
  44. +$MAKE clean
  45. +run_make -O V=99
  46. +grep 'GEN ' stdout && exit 1
  47. +grep 'cp ' stdout
  48. +grep 'echo ' stdout
  49. +
  50. +$MAKE clean
  51. +run_make -O V=v
  52. +grep 'GEN ' stdout && exit 1
  53. +grep 'cp ' stdout
  54. +grep 'echo ' stdout
  55. :