silent.m4 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. ## -*- Autoconf -*-
  2. # Copyright (C) 2009-2017 Free Software Foundation, Inc.
  3. #
  4. # This file is free software; the Free Software Foundation
  5. # gives unlimited permission to copy and/or distribute it,
  6. # with or without modifications, as long as this notice is preserved.
  7. # AM_SILENT_RULES([DEFAULT])
  8. # --------------------------
  9. # Enable less verbose build rules; with the default set to DEFAULT
  10. # ("yes" being less verbose, "no" or empty being verbose).
  11. AC_DEFUN([AM_SILENT_RULES],
  12. [AC_ARG_ENABLE([silent-rules], [dnl
  13. AS_HELP_STRING(
  14. [--enable-silent-rules],
  15. [less verbose build output (undo: "make V=1")])
  16. AS_HELP_STRING(
  17. [--disable-silent-rules],
  18. [verbose build output (undo: "make V=0")])dnl
  19. ])
  20. case $enable_silent_rules in @%:@ (((
  21. yes) AM_DEFAULT_VERBOSITY=0;;
  22. no) AM_DEFAULT_VERBOSITY=1;;
  23. *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
  24. esac
  25. dnl
  26. dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
  27. dnl do not support nested variable expansions.
  28. dnl See automake bug#9928 and bug#10237.
  29. am_make=${MAKE-make}
  30. AC_CACHE_CHECK([whether $am_make supports nested variables],
  31. [am_cv_make_support_nested_variables],
  32. [if AS_ECHO([['TRUE=$(BAR$(V))
  33. BAR0=false
  34. BAR1=true
  35. V=1
  36. am__doit:
  37. @$(TRUE)
  38. .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
  39. am_cv_make_support_nested_variables=yes
  40. else
  41. am_cv_make_support_nested_variables=no
  42. fi])
  43. if test $am_cv_make_support_nested_variables = yes; then
  44. dnl Using '$V' instead of '$(V)' breaks IRIX make.
  45. AM_V='$(V)'
  46. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  47. else
  48. AM_V=$AM_DEFAULT_VERBOSITY
  49. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  50. fi
  51. AC_SUBST([AM_V])dnl
  52. AM_SUBST_NOTMAKE([AM_V])dnl
  53. AC_SUBST([AM_DEFAULT_V])dnl
  54. AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
  55. AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
  56. AM_BACKSLASH='\'
  57. AC_SUBST([AM_BACKSLASH])dnl
  58. _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
  59. ])