From 0e95ef746318a24477a3329707c8568b431201fc Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 3 Jun 2013 15:31:26 +0100 Subject: [PATCH 3/4] 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 --- extensions/Makefile.am | 10 ++++++---- 1 file 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 \ -- 1.7.10.4