diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2010-02-19 12:36:11 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2010-02-19 12:38:51 +0100 |
commit | 9b07c0e3afbabf6819faa0d29f5d5d8cb404425f (patch) | |
tree | 9ad85cbf75e2a0ef19a32dd949cd72bc3754b33b | |
parent | e07b28ed547a4b0af98bb588901a1b75b79e0e02 (diff) | |
download | clutter-gst-9b07c0e3afbabf6819faa0d29f5d5d8cb404425f.tar.gz |
build: Add the AS_AM_REALLY_SILENT macro
Now that we use automake's silent rules, I still want GNU make to behave
as if it were called with the -s switch when we are in silent mode.
AS_AM_REALLY_SILENT does just that, respecting the default verbosity and
the V environment variable.
-rw-r--r-- | build/autotools/.gitignore | 1 | ||||
-rw-r--r-- | build/autotools/Makefile.am | 1 | ||||
-rw-r--r-- | build/autotools/as-am-really-silent.m4 | 46 | ||||
-rw-r--r-- | configure.ac | 1 |
4 files changed, 49 insertions, 0 deletions
diff --git a/build/autotools/.gitignore b/build/autotools/.gitignore index 3b529c0..5e9d5d0 100644 --- a/build/autotools/.gitignore +++ b/build/autotools/.gitignore @@ -2,3 +2,4 @@ !as-compiler-flag.m4 !dolt.m4 !introspection.m4 +!as-am-really-silent.m4 diff --git a/build/autotools/Makefile.am b/build/autotools/Makefile.am index 95d3135..6ad5f63 100644 --- a/build/autotools/Makefile.am +++ b/build/autotools/Makefile.am @@ -4,4 +4,5 @@ EXTRA_DIST = \ as-compiler-flag.m4 \ dolt.m4 \ introspection.m4 \ + as-am-really-silent.m4 \ $(NULL) diff --git a/build/autotools/as-am-really-silent.m4 b/build/autotools/as-am-really-silent.m4 new file mode 100644 index 0000000..53ae595 --- /dev/null +++ b/build/autotools/as-am-really-silent.m4 @@ -0,0 +1,46 @@ +dnl Use GNU make's -s when available +dnl +dnl Copyright (c) 2010, Damien Lespiau <damien.lespiau@gmail.com> +dnl +dnl DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE +dnl TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +dnl +dnl 0. You just DO WHAT THE FUCK YOU WANT TO. +dnl +dnl The above copyright notice and this permission notice shall be +dnl included in all copies or substantial portions of the Software. +dnl +dnl Simply put this file in your m4 macro directory (as everyone should be +dnl using AC_CONFIG_MACRO_DIR by now!) and add AS_AM_REALLY_SILENT somewhere +dnl in your configure.ac + +AC_DEFUN([AS_AM_REALLY_SILENT], +[ + AC_MSG_CHECKING([whether ${MAKE-make} can be made more silent]) + dnl And we even cache that FFS! + AC_CACHE_VAL( + [as_cv_prog_make_can_be_really_silent], + [cat >confstfu.make <<\_WTF +SHELL = /bin/sh +all: + @echo '@@@%%%clutter rocks@@@%%%' +_WTF +as_cv_prog_make_can_be_really_silent=no +case `${MAKE-make} -f confstfu.make -s --no-print-directory 2>/dev/null` in + *'@@@%%%clutter rocks@@@%%%'*) + test $? = 0 && as_cv_prog_make_can_be_really_silent=yes +esac +rm -f confstfu.make]) +if test $as_cv_prog_make_can_be_really_silent = yes; then + AC_MSG_RESULT([yes]) + make_flags='`\ + if test "x$(AM_DEFAULT_VERBOSITY)" = x0; then \ + test -z "$V" -o "x$V" = x0 && echo -s; \ + else \ + test "x$V" = x0 && echo -s; \ + fi`' + AC_SUBST([AM_MAKEFLAGS], [$make_flags]) +else + AC_MSG_RESULT([no]) +fi +]) diff --git a/configure.ac b/configure.ac index b378143..d74630f 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,7 @@ AC_SUBST(CLUTTER_GST_LT_LDFLAGS) dnl ======================================================================== m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) +AS_AM_REALLY_SILENT dnl ======================================================================== |