[telepathy-qt4/master] Enable Automake 1.11 silent building
Will Thompson
will.thompson at collabora.co.uk
Wed Dec 2 10:10:30 PST 2009
This includes an extra macro to silence moc invocations, in
tools/telepathy-qt4.mk
Reviewed-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
---
TelepathyQt4/Makefile.am | 22 ++++++++++++----------
autogen.sh | 13 +++++++------
configure.ac | 2 ++
examples/accounts/Makefile.am | 6 ++++--
examples/call/Makefile.am | 6 ++++--
examples/extensions/Makefile.am | 21 +++++++++++++--------
examples/file-transfer/Makefile.am | 6 ++++--
examples/roster/Makefile.am | 6 ++++--
tests/Makefile.am | 6 ++++--
tests/dbus/Makefile.am | 6 ++++--
tests/lib/Makefile.am | 6 ++++--
tests/lib/callable/Makefile.am | 4 ++--
tests/lib/contactlist/Makefile.am | 4 ++--
tools/telepathy-qt4.mk | 4 ++++
14 files changed, 70 insertions(+), 42 deletions(-)
create mode 100644 tools/telepathy-qt4.mk
diff --git a/TelepathyQt4/Makefile.am b/TelepathyQt4/Makefile.am
index 91770cb..631b7bb 100644
--- a/TelepathyQt4/Makefile.am
+++ b/TelepathyQt4/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/tools/telepathy-qt4.mk
+
DIST_SUBDIRS = Farsight
# We need to build this directory before the Farsight subdirectory
SUBDIRS = .
@@ -390,16 +392,16 @@ ALL_LIBS = \
# Bootstrapping
_gen/spec-stamp: $(wildcard $(top_srcdir)/spec/*.xml)
- $(mkdir_p) _gen
- touch $@
+ $(AM_V_at)$(mkdir_p) _gen
+ $(AM_V_GEN)touch $@
_gen/stable-stamp: $(wildcard *.xml) _gen/spec-stamp
- touch $@
+ $(AM_V_GEN)touch $@
_gen/stable-spec.xml: $(srcdir)/stable-interfaces.xml _gen/stable-stamp \
$(top_srcdir)/tools/xincludator.py \
Makefile.am
- $(PYTHON) $(top_srcdir)/tools/xincludator.py \
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xincludator.py \
$< > $@
# Things generated from the whole spec at once
@@ -407,7 +409,7 @@ _gen/stable-spec.xml: $(srcdir)/stable-interfaces.xml _gen/stable-stamp \
_gen/constants.h: _gen/stable-spec.xml \
$(top_srcdir)/tools/qt4-constants-gen.py \
Makefile.am
- $(PYTHON) $(top_srcdir)/tools/qt4-constants-gen.py \
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/qt4-constants-gen.py \
--namespace='Tp' \
--str-constant-prefix='TELEPATHY_' \
--must-define='IN_TELEPATHY_QT4_HEADER' \
@@ -417,7 +419,7 @@ _gen/constants.h: _gen/stable-spec.xml \
_gen/types.h _gen/types-body.hpp: _gen/stable-spec.xml \
$(top_srcdir)/tools/qt4-types-gen.py \
Makefile.am
- $(PYTHON) $(top_srcdir)/tools/qt4-types-gen.py \
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/qt4-types-gen.py \
--namespace='Tp' \
--declfile='_gen/types.h' \
--implfile='_gen/types-body.hpp' \
@@ -429,14 +431,14 @@ _gen/types.h _gen/types-body.hpp: _gen/stable-spec.xml \
# Things generated per interface group
_gen/spec-%.xml: %.xml $(top_srcdir)/tools/xincludator.py _gen/spec-stamp
- $(PYTHON) $(top_srcdir)/tools/xincludator.py \
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xincludator.py \
$< > $@
_gen/cli-%.h _gen/cli-%-body.hpp: _gen/spec-%.xml \
_gen/stable-spec.xml \
$(top_srcdir)/tools/qt4-client-gen.py \
Makefile.am
- set -e; \
+ $(AM_V_GEN)set -e; \
namespace='Tp::Client'; \
group= ; \
prettyinclude= ; \
@@ -509,7 +511,7 @@ _gen/cli-%.h _gen/cli-%-body.hpp: _gen/spec-%.xml \
$$mainiface
_gen/%.moc.hpp: %.h _gen/constants.h _gen/types.h
- $(MOC) $(AM_CPPFLAGS) -i $< -o $@
+ $(TPQT4_V_MOC)$(MOC) $(AM_CPPFLAGS) -i $< -o $@
_gen/cli-%.moc.hpp: _gen/cli-%.h _gen/constants.h _gen/types.h
- $(MOC) $(AM_CPPFLAGS) -i $< -o $@
+ $(TPQT4_V_MOC)$(MOC) $(AM_CPPFLAGS) -i $< -o $@
diff --git a/autogen.sh b/autogen.sh
index 7f08e9b..5b32d48 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -3,13 +3,14 @@ set -e
if test -n "$AUTOMAKE"; then
: # don't override an explicit user request
-elif automake-1.9 --version >/dev/null 2>/dev/null && \
- aclocal-1.9 --version >/dev/null 2>/dev/null; then
- # If we have automake-1.9, use it. This helps to ensure that our build
- # system doesn't accidentally grow automake-1.10 dependencies.
- AUTOMAKE=automake-1.9
+elif automake-1.11 --version >/dev/null 2>/dev/null && \
+ aclocal-1.11 --version >/dev/null 2>/dev/null; then
+ # If we have automake-1.11, use it. This is the oldest version (=> least
+ # likely to introduce undeclared dependencies) that will give us
+ # --enable-silent-rules support.
+ AUTOMAKE=automake-1.11
export AUTOMAKE
- ACLOCAL=aclocal-1.9
+ ACLOCAL=aclocal-1.11
export ACLOCAL
fi
diff --git a/configure.ac b/configure.ac
index 7abac93..311d39b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,8 @@ AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.9 -Wno-portability tar-ustar])
AM_CONFIG_HEADER(config.h)
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
+
dnl check for tools
AC_PROG_CXX
AC_PROG_INSTALL
diff --git a/examples/accounts/Makefile.am b/examples/accounts/Makefile.am
index 5e0fb46..f086cff 100644
--- a/examples/accounts/Makefile.am
+++ b/examples/accounts/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/tools/telepathy-qt4.mk
+
AM_CPPFLAGS = \
-I$(top_srcdir) -I$(top_builddir) \
$(QTCORE_CFLAGS) \
@@ -34,5 +36,5 @@ CLEANFILES = \
$(BUILT_SOURCES)
_gen/%.moc.hpp: %.h
- $(mkdir_p) _gen
- $(MOC) $(AM_CPPFLAGS) -i $< -o $@
+ $(AM_V_at)$(mkdir_p) _gen
+ $(TPQT4_V_MOC)$(MOC) $(AM_CPPFLAGS) -i $< -o $@
diff --git a/examples/call/Makefile.am b/examples/call/Makefile.am
index 11c946c..8c60203 100644
--- a/examples/call/Makefile.am
+++ b/examples/call/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/tools/telepathy-qt4.mk
+
AM_CPPFLAGS = \
-I$(top_srcdir) -I$(top_builddir) \
$(QTCORE_CFLAGS) \
@@ -52,5 +54,5 @@ CLEANFILES = \
$(BUILT_SOURCES)
_gen/%.moc.hpp: %.h
- $(mkdir_p) _gen
- $(MOC) $(AM_CPPFLAGS) -i $< -o $@
+ $(AM_V_at)$(mkdir_p) _gen
+ $(TPQT4_V_MOC)$(MOC) $(AM_CPPFLAGS) -i $< -o $@
diff --git a/examples/extensions/Makefile.am b/examples/extensions/Makefile.am
index bfc460b..4fca600 100644
--- a/examples/extensions/Makefile.am
+++ b/examples/extensions/Makefile.am
@@ -16,6 +16,11 @@
tools_dir = $(top_srcdir)/tools
+# for the $(TPQT4_V_MOC) variable, used for "silent" invocation of moc. See
+# also the "silent-rules" section in
+# <http://www.gnu.org/software/hello/manual/automake/Options.html.
+include $(tools_dir)/telepathy-qt4.mk
+
AM_CXXFLAGS = \
$(ERROR_CXXFLAGS)
@@ -63,13 +68,13 @@ CLEANFILES = $(BUILT_SOURCES)
# Generated files which can be generated for all categories simultaneously
_gen/all.xml: all.xml $(wildcard *.xml)
- $(mkdir_p) _gen
- $(PYTHON) $(top_srcdir)/tools/xincludator.py \
+ $(AM_V_at)$(mkdir_p) _gen
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xincludator.py \
$< > $@
_gen/constants.h: _gen/all.xml \
$(top_srcdir)/tools/qt4-constants-gen.py
- $(PYTHON) $(top_srcdir)/tools/qt4-constants-gen.py \
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/qt4-constants-gen.py \
--namespace='Example' \
--str-constant-prefix='EXAMPLE_' \
--specxml=$< \
@@ -77,7 +82,7 @@ _gen/constants.h: _gen/all.xml \
_gen/types.h _gen/types-body.hpp: _gen/all.xml \
$(top_srcdir)/tools/qt4-types-gen.py
- $(PYTHON) $(top_srcdir)/tools/qt4-types-gen.py \
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/qt4-types-gen.py \
--namespace='Example' \
--declfile='_gen/types.h' \
--implfile='_gen/types-body.hpp' \
@@ -88,13 +93,13 @@ _gen/types.h _gen/types-body.hpp: _gen/all.xml \
# Things generated per interface group
_gen/connection.xml: connection.xml $(wildcard *.xml)
- $(mkdir_p) _gen
- $(PYTHON) $(top_srcdir)/tools/xincludator.py \
+ $(AM_V_at)$(mkdir_p) _gen
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xincludator.py \
$< > $@
_gen/cli-connection-body.hpp _gen/cli-connection.h: _gen/connection.xml \
_gen/all.xml $(tools_dir)/qt4-client-gen.py
- $(PYTHON) $(tools_dir)/qt4-client-gen.py \
+ $(AM_V_GEN)$(PYTHON) $(tools_dir)/qt4-client-gen.py \
--namespace='Example::Client' \
--typesnamespace='Example' \
--headerfile=_gen/cli-connection.h \
@@ -106,4 +111,4 @@ _gen/cli-connection-body.hpp _gen/cli-connection.h: _gen/connection.xml \
--mainiface='Tp::Client::ConnectionInterface'
%.moc.hpp: %.h _gen/constants.h _gen/types.h
- $(MOC) $(AM_CPPFLAGS) -i $< -o $@
+ $(TPQT4_V_MOC)$(MOC) $(AM_CPPFLAGS) -i $< -o $@
diff --git a/examples/file-transfer/Makefile.am b/examples/file-transfer/Makefile.am
index 5eefb06..bc86744 100644
--- a/examples/file-transfer/Makefile.am
+++ b/examples/file-transfer/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/tools/telepathy-qt4.mk
+
AM_CPPFLAGS = \
-I$(top_srcdir) -I$(top_builddir) \
$(QTCORE_CFLAGS) \
@@ -47,5 +49,5 @@ CLEANFILES = \
$(BUILT_SOURCES)
_gen/%.moc.hpp: %.h
- $(mkdir_p) _gen
- $(MOC) $(AM_CPPFLAGS) -i $< -o $@
+ $(AM_V_at)$(mkdir_p) _gen
+ $(TPQT4_V_MOC)$(MOC) $(AM_CPPFLAGS) -i $< -o $@
diff --git a/examples/roster/Makefile.am b/examples/roster/Makefile.am
index 116c97c..7f3494a 100644
--- a/examples/roster/Makefile.am
+++ b/examples/roster/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/tools/telepathy-qt4.mk
+
AM_CPPFLAGS = \
-I$(top_srcdir) -I$(top_builddir) \
$(QTCORE_CFLAGS) \
@@ -51,5 +53,5 @@ CLEANFILES = \
$(BUILT_SOURCES)
_gen/%.moc.hpp: %.h
- $(mkdir_p) _gen
- $(MOC) $(AM_CPPFLAGS) -i $< -o $@
+ $(AM_V_at)$(mkdir_p) _gen
+ $(TPQT4_V_MOC)$(MOC) $(AM_CPPFLAGS) -i $< -o $@
diff --git a/tests/Makefile.am b/tests/Makefile.am
index fcffed8..7d3b396 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/tools/telepathy-qt4.mk
+
# compile lib/ first, so it can be used by tests in the other directories
SUBDIRS = \
lib \
@@ -59,8 +61,8 @@ EXTRA_DIST = \
test-key-file-format-error.ini
_gen/%.moc.hpp: %
- $(mkdir_p) _gen
- $(MOC) $(AM_CPPFLAGS) -i $< -o $@
+ $(AM_V_at)$(mkdir_p) _gen
+ $(TPQT4_V_MOC)$(MOC) $(AM_CPPFLAGS) -i $< -o $@
distclean-local:
rm -rf _gen
diff --git a/tests/dbus/Makefile.am b/tests/dbus/Makefile.am
index 1b91bbb..7b67c75 100644
--- a/tests/dbus/Makefile.am
+++ b/tests/dbus/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/tools/telepathy-qt4.mk
+
# Tests each run under their own temporary dbus-daemon.
TESTS = \
@@ -7,8 +9,8 @@ BUILT_SOURCES = \
_gen/do-nothing.cpp.moc.hpp
_gen/%.moc.hpp: %
- $(mkdir_p) _gen
- $(MOC) $(AM_CPPFLAGS) -i $< -o $@
+ $(AM_V_at)$(mkdir_p) _gen
+ $(TPQT4_V_MOC)$(MOC) $(AM_CPPFLAGS) -i $< -o $@
noinst_PROGRAMS = $(TESTS)
diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am
index a1d9c69..0aab326 100644
--- a/tests/lib/Makefile.am
+++ b/tests/lib/Makefile.am
@@ -1,3 +1,5 @@
+include $(top_srcdir)/tools/telepathy-qt4.mk
+
SUBDIRS =
AM_CPPFLAGS = \
@@ -54,5 +56,5 @@ SUBDIRS += . csh echo2
endif
_gen/%.moc.hpp: %
- $(mkdir_p) _gen
- $(MOC) $(AM_CPPFLAGS) -i $< -o $@
+ $(AM_V_at)$(mkdir_p) _gen
+ $(TPQT4_V_MOC)$(MOC) $(AM_CPPFLAGS) -i $< -o $@
diff --git a/tests/lib/callable/Makefile.am b/tests/lib/callable/Makefile.am
index 63be08a..0fa550d 100644
--- a/tests/lib/callable/Makefile.am
+++ b/tests/lib/callable/Makefile.am
@@ -36,8 +36,8 @@ EXTRA_DIST = manager-file.py
_gen/example_callable.manager _gen/param-spec-struct.h: \
manager-file.py $(top_srcdir)/tools/manager-file.py
- $(mkdir_p) _gen
- $(PYTHON) $(top_srcdir)/tools/manager-file.py $(srcdir)/manager-file.py _gen
+ $(AM_V_at)$(mkdir_p) _gen
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/manager-file.py $(srcdir)/manager-file.py _gen
BUILT_SOURCES = _gen/example_callable.manager _gen/param-spec-struct.h
CLEANFILES = $(BUILT_SOURCES)
diff --git a/tests/lib/contactlist/Makefile.am b/tests/lib/contactlist/Makefile.am
index 5768c21..d650dc6 100644
--- a/tests/lib/contactlist/Makefile.am
+++ b/tests/lib/contactlist/Makefile.am
@@ -28,8 +28,8 @@ EXTRA_DIST = manager-file.py
_gen/example_contact_list.manager _gen/param-spec-struct.h: \
manager-file.py $(top_srcdir)/tools/manager-file.py
- $(mkdir_p) _gen
- $(PYTHON) $(top_srcdir)/tools/manager-file.py $(srcdir)/manager-file.py _gen
+ $(AM_V_at)$(mkdir_p) _gen
+ $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/manager-file.py $(srcdir)/manager-file.py _gen
BUILT_SOURCES = _gen/param-spec-struct.h _gen/example_contact_list.manager
CLEANFILES = $(BUILT_SOURCES)
diff --git a/tools/telepathy-qt4.mk b/tools/telepathy-qt4.mk
new file mode 100644
index 0000000..58c13e0
--- /dev/null
+++ b/tools/telepathy-qt4.mk
@@ -0,0 +1,4 @@
+TPQT4_V_MOC = $(TPQT4_V_MOC_$(V))
+TPQT4_V_MOC_ = $(TPQT4_V_MOC_$(AM_DEFAULT_VERBOSITY))
+TPQT4_V_MOC_0 = @echo ' MOC ' $@;
+
--
1.5.6.5
More information about the telepathy-commits
mailing list