[build] Split out the custom silent rules
authorEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 16 Sep 2009 16:43:58 +0000 (17:43 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 16 Sep 2009 16:47:59 +0000 (17:47 +0100)
The silent rules we use for custom targets should be moved into a
separate Makefile.am that gets included from all the others.

16 files changed:
Makefile.am
build/autotools/Makefile.am
build/autotools/Makefile.am.silent [new file with mode: 0644]
clutter/Makefile.am
clutter/cogl/Makefile.am
clutter/cogl/common/Makefile.am
clutter/cogl/gl/Makefile.am
clutter/cogl/gles/Makefile.am
clutter/glx/Makefile.am
clutter/pango/Makefile.am
clutter/x11/Makefile.am
tests/conform/Makefile.am
tests/data/Makefile.am
tests/interactive/Makefile.am
tests/micro-bench/Makefile.am
tests/tools/Makefile.am

index e794e42..b078d34 100644 (file)
@@ -1,3 +1,5 @@
+include $(top_srcdir)/build/autotools/Makefile.am.silent
+
 NULL =
 
 SUBDIRS = build clutter tests po
index 28c1b7e..96bb55f 100644 (file)
@@ -1,6 +1,7 @@
 NULL =
 
 EXTRA_DIST = \
+       Makefile.am.silent      \
        dolt.m4                 \
        introspection.m4        \
        gtk-doc.m4              \
diff --git a/build/autotools/Makefile.am.silent b/build/autotools/Makefile.am.silent
new file mode 100644 (file)
index 0000000..249f6af
--- /dev/null
@@ -0,0 +1,17 @@
+# custom rules for quiet builds
+
+if USE_SHAVE
+QUIET_GEN = $(Q:@=@echo '  GEN   '$@;)
+QUIET_LN  = $(Q:@=@echo '  LN    '$@;)
+QUIET_RM  = $(Q:@=@echo '  RM    '$@;)
+else
+QUIET_GEN = $(AM_V_GEN)
+
+QUIET_LN   = $(QUIET_LN_$(V))
+QUIET_LN_  = $(QUIET_LN_$(AM_DEFAULT_VERBOSITY))
+QUIET_LN_0 = @echo '  LN     '$@;
+
+QUIET_RM   = $(QUIET_RM_$(V))
+QUIET_RM_  = $(QUIET_RM_$(AM_DEFAULT_VERBOSITY))
+QUIET_RM_0 = @echo '  RM     '$@;
+endif # USE_SHAVE
index fd4dbef..3738aae 100644 (file)
@@ -1,10 +1,6 @@
-NULL      =
+include $(top_srcdir)/build/autotools/Makefile.am.silent
 
-if USE_SHAVE
-QUIET_GEN = $(Q:@=@echo '  GEN   '$@;)
-else
-QUIET_GEN = $(AM_V_GEN)
-endif # USE_SHAVE
+NULL =
 
 SUBDIRS = cogl pango $(backendextra) $(clutterbackend)
 
@@ -257,7 +253,7 @@ endif
 # subdir Makefile.am, so just extract them from cogl.h instead. The doc
 # comments for COGL are in the headers, so we don't need the source files.
 Clutter-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_API_VERSION@.la
-       $(INTROSPECTION_SCANNER) -v \
+       $(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \
                --namespace Clutter --nsversion=@CLUTTER_API_VERSION@ \
                $(INCLUDES) \
                --add-include-path=cogl \
@@ -290,6 +286,7 @@ Clutter-@CLUTTER_API_VERSION@.typelib: $(clutter_json_gir) Cogl-@CLUTTER_API_VER
 # that we compile and install, we transfer the shared-library="" line from
 # Clutter.gir to Cogl.gir
 Cogl-@CLUTTER_API_VERSION@.gir: Clutter-@CLUTTER_API_VERSION@.gir cogl/Cogl-@CLUTTER_API_VERSION@.gir
+       $(QUIET_GEN) \
        shlib=`sed -n 's/.*shared-library="\([^"]*\)".*/\1/p' < Clutter-@CLUTTER_API_VERSION@.gir` ; \
        sed "s/shared-library=\"[^\"]*\"/shared-library=\"$$shlib\"/"< cogl/Cogl-@CLUTTER_API_VERSION@.gir > $@
 
@@ -299,6 +296,7 @@ if LOCAL_JSON_GLIB
 # If we are building it, ClutterJson gets the same handling as described
 # for Cogl above
 ClutterJson-@CLUTTER_API_VERSION@.gir: Clutter-@CLUTTER_API_VERSION@.gir json/ClutterJson-@CLUTTER_API_VERSION@.gir
+       $(QUIET_GEN) \
        shlib=`sed -n 's/.*shared-library="\([^"]*\)".*/\1/p' < Clutter-@CLUTTER_API_VERSION@.gir` ; \
        sed "s/shared-library=\"[^\"]*\"/shared-library=\"$$shlib\"/"< json/ClutterJson-@CLUTTER_API_VERSION@.gir > $@
 
index 7e28f92..58f762f 100644 (file)
@@ -1,10 +1,6 @@
-NULL =
+include $(top_srcdir)/build/autotools/Makefile.am.silent
 
-if USE_SHAVE
-QUIET_GEN = $(Q:@=@echo '  GEN   '$@;)
-else
-QUIET_GEN = $(AM_V_GEN)
-endif # USE_SHAVE
+NULL =
 
 SUBDIRS = common $(CLUTTER_COGL)
 
index 6a91169..a9b9a13 100644 (file)
@@ -1,10 +1,6 @@
-NULL =
+include $(top_srcdir)/build/autotools/Makefile.am.silent
 
-if USE_SHAVE
-QUIET_GEN = $(Q:@=@echo '  GEN   '$@;)
-else
-QUIET_GEN = $(AM_V_GEN)
-endif # USE_SHAVE
+NULL =
 
 INCLUDES = \
        -I$(top_srcdir) \
index 7864a4a..993ccaa 100644 (file)
@@ -1,3 +1,5 @@
+include $(top_srcdir)/build/autotools/Makefile.am.silent
+
 NULL =
 
 cogl_headers = \
index 8c3dde8..3d1ee40 100644 (file)
@@ -1,3 +1,5 @@
+include $(top_srcdir)/build/autotools/Makefile.am.silent
+
 libclutterincludedir = $(includedir)/clutter-@CLUTTER_API_VERSION@/cogl
 libclutterinclude_HEADERS = \
         $(top_builddir)/clutter/cogl/cogl.h \
index e2a8dc9..540d212 100644 (file)
@@ -1,3 +1,5 @@
+include $(top_srcdir)/build/autotools/Makefile.am.silent
+
 libclutter_glx_includedir = $(includedir)/clutter-@CLUTTER_API_VERSION@/clutter/glx
 libclutter_glx_include_HEADERS = clutter-glx.h clutter-glx-texture-pixmap.h
 
index 7828fd9..d098e3b 100644 (file)
@@ -1,3 +1,5 @@
+include $(top_srcdir)/build/autotools/Makefile.am.silent
+
 source_c = \
        cogl-pango-display-list.c \
        cogl-pango-fontmap.c    \
index 07d2ddc..814780a 100644 (file)
@@ -1,3 +1,5 @@
+include $(top_srcdir)/build/autotools/Makefile.am.silent
+
 INCLUDES = \
        -DG_LOG_DOMAIN=\"ClutterX11\"           \
         -DCLUTTER_COMPILATION                   \
index d8f0b69..164bc90 100644 (file)
@@ -1,3 +1,5 @@
+include $(top_srcdir)/build/autotools/Makefile.am.silent
+
 NULL =
 
 noinst_PROGRAMS = test-conformance
@@ -46,7 +48,7 @@ stamp-test-conformance: test-conformance$(EXEEXT)
        @for i in $(UNIT_TESTS); \
        do \
                unit=`basename $$i | sed -e s/_/-/g`; \
-               echo "  GEN   $$unit"; \
+               echo "  GEN    $$unit"; \
                ( echo "#!/bin/sh" ; echo "$(top_srcdir)/tests/conform/test-launcher.sh '$$i'" ) > $$unit$(EXEEXT) ; \
                chmod +x $$unit$(EXEEXT); \
        done \
@@ -56,7 +58,7 @@ clean-wrappers:
        @for i in $(UNIT_TESTS); \
        do \
                unit=`basename $$i | sed -e s/_/-/g`; \
-               echo "RM $$unit"; \
+               echo "  RM     $$unit"; \
                rm -f $$unit$(EXEEXT) ; \
        done \
        && rm -f stamp-test-conformance
@@ -139,4 +141,4 @@ EXTRA_DIST = ADDING_NEW_TESTS test-launcher.sh
 # we override the clean-generic target to clean up the wrappers so
 # we cannot use CLEANFILES
 clean-generic: clean-wrappers
-       rm -f $(XML_REPORTS) $(HTML_REPORTS)
+       $(QUIET_RM)rm -f $(XML_REPORTS) $(HTML_REPORTS)
index 58efa73..a367ed8 100644 (file)
@@ -1,4 +1,3 @@
-
 EXTRA_DIST = \
        redhand.png \
        redhand_alpha.png \
index 58b67cd..9187b1e 100644 (file)
@@ -1,3 +1,4 @@
+include $(top_srcdir)/build/autotools/Makefile.am.silent
 
 UNIT_TESTS = \
        test-textures.c \
@@ -51,18 +52,18 @@ endif
 
 #FIXME - this is is a bit of a yukky way of ensuring the tests find our data:
 test-script.json:
-       ln -sf $(top_srcdir)/tests/data/test-script.json
+       $(QUIET_LN)ln -sf $(top_srcdir)/tests/data/test-script.json
 redhand.png:
-       ln -sf $(top_srcdir)/tests/data/redhand.png
+       $(QUIET_LN)ln -sf $(top_srcdir)/tests/data/redhand.png
 redhand_alpha.png:
-       ln -sf $(top_srcdir)/tests/data/redhand_alpha.png
+       $(QUIET_LN)ln -sf $(top_srcdir)/tests/data/redhand_alpha.png
 light0.png:
-       ln -sf $(top_srcdir)/tests/data/light0.png
+       $(QUIET_LN)ln -sf $(top_srcdir)/tests/data/light0.png
 
 # For convenience, this provides a way to easily run individual unit tests:
 .PHONY: wrappers
 wrappers: test-interactive$(EXEEXT)
-       for i in $(UNIT_TESTS); \
+       $(QUIET_GEN)for i in $(UNIT_TESTS); \
        do \
                ln -sf $(top_srcdir)/tests/interactive/wrapper.sh $${i%*.c}; \
        done
index 7388e66..180b92c 100644 (file)
@@ -1,3 +1,5 @@
+include $(top_srcdir)/build/autotools/Makefile.am.silent
+
 noinst_PROGRAMS = \
        test-text \
        test-picking \
index bf68460..535a7f5 100644 (file)
@@ -1,3 +1,5 @@
+include $(top_srcdir)/build/autotools/Makefile.am.silent
+
 noinst_LTLIBRARIES =
 
 build_shared_libs =
@@ -23,11 +25,12 @@ INCLUDES = \
 all-local : disable-npots.sh $(build_shared_libs)
 
 clean-local :
-       rm -f disable-npots.sh libdisable-npots.la
+       $(QUIET_RM)rm -f disable-npots.sh libdisable-npots.la
 
 disable-npots.sh : $(top_builddir)/tests/tools/disable-npots.sh.in
-       sed 's|--builddir--|'`cd '$(top_builddir)' && pwd`'|' < $< > $@ && \
-       chmod 755 disable-npots.sh
+       $(QUIET_GEN) \
+       sed 's|--builddir--|'`cd '$(top_builddir)' && pwd`'|' < $< > $@ \
+       && chmod 755 disable-npots.sh
 
 # Also put the static library into a shared library. We need to do
 # this without the automake magic because we don't want it to get