diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-03-09 14:06:49 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-03-09 15:27:42 +0000 |
commit | beb2d9712e271af88a10edd5565c9d0991adbbed (patch) | |
tree | a5c154af59e4a984dfe3ecef1b4ed1726f1a6c85 /tools | |
parent | 36c2a545c9c1d1cc6db205bfc33d980d29b0a0f6 (diff) | |
download | telepathy-glib-beb2d9712e271af88a10edd5565c9d0991adbbed.tar.gz |
improve the mtime-transferring hack in tools/
The point of this stuff is to rebuild generated code when, for instance,
libtpcodegen.py has changed, without every rule that uses
glib-something-gen.py having to know to depend on libtpcodegen.py as well.
To do that, we propagate newer mtime from Python library code to Python
executables, using touch(1).
If building out-of-tree, we need to touch the file in srcdir,
rather than creating an empty file in the builddir. The rules that
depend on glib-something-gen.py specifically depend on the version in
the $(srcdir), so in an out-of-tree build, if we aren't careful to act
on the version in the srcdir, editing libtpcodegen.py won't actually
cause a rebuild.
Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile.am | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index 02ea02caf..761ee03c3 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -52,21 +52,21 @@ CLEANFILES = libtpcodegen.pyc libtpcodegen.pyo libglibcodegen.pyc libglibcodegen all: $(EXTRA_DIST) libglibcodegen.py: libtpcodegen.py - $(AM_V_GEN)touch $@ + $(AM_V_GEN)test -e ${srcdir}/$@ && touch ${srcdir}/$@ c-constants-gen.py: libglibcodegen.py - $(AM_V_GEN)touch $@ + $(AM_V_GEN)test -e ${srcdir}/$@ && touch ${srcdir}/$@ glib-client-marshaller-gen.py: libglibcodegen.py - $(AM_V_GEN)touch $@ + $(AM_V_GEN)test -e ${srcdir}/$@ && touch ${srcdir}/$@ glib-errors-enum-body-gen.py: libglibcodegen.py - $(AM_V_GEN)touch $@ + $(AM_V_GEN)test -e ${srcdir}/$@ && touch ${srcdir}/$@ glib-errors-enum-header-gen.py: libglibcodegen.py - $(AM_V_GEN)touch $@ + $(AM_V_GEN)test -e ${srcdir}/$@ && touch ${srcdir}/$@ glib-ginterface-gen.py: libglibcodegen.py - $(AM_V_GEN)touch $@ + $(AM_V_GEN)test -e ${srcdir}/$@ && touch ${srcdir}/$@ glib-gtypes-generator.py: libglibcodegen.py - $(AM_V_GEN)touch $@ + $(AM_V_GEN)test -e ${srcdir}/$@ && touch ${srcdir}/$@ glib-interfaces-gen.py: libglibcodegen.py - $(AM_V_GEN)touch $@ + $(AM_V_GEN)test -e ${srcdir}/$@ && touch ${srcdir}/$@ TELEPATHY_SPEC_SRCDIR = $(top_srcdir)/../telepathy-spec maintainer-update-from-telepathy-spec: |