diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-03-09 15:13:13 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-03-09 15:27:42 +0000 |
commit | 36c2a545c9c1d1cc6db205bfc33d980d29b0a0f6 (patch) | |
tree | db6a84455257d878042e56b7e8cb1f7e802677b6 /telepathy-glib/codegen.am | |
parent | 60470526bdbe624201c32a50f9d4145dd32fa1cb (diff) | |
download | telepathy-glib-36c2a545c9c1d1cc6db205bfc33d980d29b0a0f6.tar.gz |
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.
Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
Diffstat (limited to 'telepathy-glib/codegen.am')
-rw-r--r-- | telepathy-glib/codegen.am | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/telepathy-glib/codegen.am b/telepathy-glib/codegen.am index 9fe43d143..fcb5b74b5 100644 --- a/telepathy-glib/codegen.am +++ b/telepathy-glib/codegen.am @@ -152,7 +152,11 @@ _gen/reentrant-methods.list: \ # Things generated from the whole spec at once -_gen/gtypes.h _gen/gtypes-body.h: _gen/stable-spec.xml \ +# do nothing, output as a side-effect +_gen/gtypes.h: _gen/gtypes-body.h + @: + +_gen/gtypes-body.h: _gen/stable-spec.xml \ $(tools_dir)/glib-gtypes-generator.py $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-gtypes-generator.py \ _gen/stable-spec.xml \ @@ -163,7 +167,11 @@ _gen/telepathy-enums.h: _gen/stable-spec.xml \ $(AM_V_GEN)$(PYTHON) $(tools_dir)/c-constants-gen.py \ Tp $< _gen/telepathy-enums -_gen/interfaces-body.h _gen/telepathy-interfaces.h: _gen/stable-spec.xml \ +# do nothing, output as a side-effect +_gen/interfaces-body.h: _gen/telepathy-interfaces.h + @: + +_gen/telepathy-interfaces.h: _gen/stable-spec.xml \ $(tools_dir)/glib-interfaces-gen.py $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-interfaces-gen.py \ Tp _gen/interfaces-body.h _gen/telepathy-interfaces.h $< @@ -182,7 +190,10 @@ _gen/genums.h: _gen/spec-stamp genums.h.template $(our_headers) codegen.am $(GLIB_MKENUMS) --template genums.h.template $(our_headers) \ ) > $@ -_gen/error-str.h _gen/error-str.c: _gen/stable-spec.xml \ +_gen/error-str.h: _gen/error-str.c + @: # do nothing, output as a side-effect + +_gen/error-str.c: _gen/stable-spec.xml \ $(tools_dir)/glib-errors-str-gen.py $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-errors-str-gen.py \ _gen/error-str $< @@ -193,7 +204,11 @@ _gen/tp-spec-%.xml: %.xml _gen/spec-stamp $(tools_dir)/xincludator.py $(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py $< > $@.tmp @mv $@.tmp $@ -_gen/tp-svc-%.c _gen/tp-svc-%.h: _gen/tp-spec-%.xml \ +# do nothing, output as a side-effect +_gen/tp-svc-%.h: _gen/tp-svc-%.c + @: + +_gen/tp-svc-%.c: _gen/tp-spec-%.xml \ $(tools_dir)/glib-ginterface-gen.py \ codegen.am $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \ @@ -203,7 +218,11 @@ _gen/tp-svc-%.c _gen/tp-svc-%.h: _gen/tp-spec-%.xml \ --not-implemented-func='tp_dbus_g_method_return_not_implemented' \ $< Tp_Svc_ -_gen/tp-cli-%-body.h _gen/tp-cli-%.h: _gen/tp-spec-%.xml \ +# do nothing, output as a side-effect +_gen/tp-cli-%.h: _gen/tp-cli-%-body.h + @: + +_gen/tp-cli-%-body.h: _gen/tp-spec-%.xml \ _gen/reentrant-methods.list \ $(tools_dir)/glib-client-gen.py \ codegen.am |