summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2013-06-03 15:31:26 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-06-04 12:28:27 +0100
commita942b597feb553eb72d1d984741b35e91c94aae8 (patch)
tree04ae114c6f9226c9937bc22df50b7c71dcff715d /extensions
parentfeb24fdaa4a79ba96caa14b9572e3f1787a51955 (diff)
Avoid having two of the same set of commands run in parallel
A rule like this: _gen/x.c _gen/x.h: prerequisites $(AM_V_GEN)x-generator doesn't consider x.c and x.h together. Instead, it expands to two rules, one to generate x.c and one to generate x.h, which happen to run the same commands. This means that in the worst case, you can end up running x-generator twice in parallel, and they'll race with each other and overwrite or delete each other's output. Based on commit 36c2a545c from telepathy-glib. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64285 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/Makefile.am10
1 files changed, 6 insertions, 4 deletions
diff --git a/extensions/Makefile.am b/extensions/Makefile.am
index 8208a7e..f99d103 100644
--- a/extensions/Makefile.am
+++ b/extensions/Makefile.am
@@ -58,8 +58,9 @@ extensions.html: _gen/all.xml $(tools_dir)/doc-generator.xsl
$(tools_dir)/doc-generator.xsl \
$< > $@
-_gen/gtypes.h _gen/gtypes-body.h: _gen/all.xml \
- $(top_srcdir)/tools/glib-gtypes-generator.py
+_gen/gtypes.h: _gen/gtypes-body.h
+ @: # do nothing, output as a side-effect
+_gen/gtypes-body.h: _gen/all.xml $(top_srcdir)/tools/glib-gtypes-generator.py
$(PYTHON) $(top_srcdir)/tools/glib-gtypes-generator.py \
$< _gen/gtypes RAKIA
@@ -109,8 +110,9 @@ _gen/channel.xml: channel.xml $(wildcard *.xml)
$(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(tools_dir)/identity.xsl \
$< > $@
-_gen/svc-channel.c _gen/svc-channel.h: _gen/channel.xml \
- $(tools_dir)/glib-ginterface-gen.py
+_gen/svc-channel.h: _gen/svc-channel.c
+ @: # do nothing, output as a side-effect
+_gen/svc-channel.c: _gen/channel.xml $(tools_dir)/glib-ginterface-gen.py
$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \
--filename=_gen/svc-channel \
--signal-marshal-prefix=_rakia_ext \