GNOME Bugzilla – Bug 723616
gio/tests: fix race when generating code
Last modified: 2014-02-17 10:30:06 UTC
There is a race condition in the makefile that can result in build failures like this in parallel builds: | ./gdbus-test-codegen-generated.h:7:0: error: unterminated #ifndef | #ifndef __GDBUS_TEST_CODEGEN_GENERATED_H__ This is because a rule like this: x.c x.h: prerequisites @commands 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. In the worst case they execute in parallel, overwriting each other's output. Signed-off-by: Ross Burton <ross.burton@intel.com>
Created attachment 268078 [details] [review] gio/tests: fix race when generating code
Comment on attachment 268078 [details] [review] gio/tests: fix race when generating code looks good >+gdbus-test-codegen-generated.c: gdbus-test-codegen-generated.h >+ @: # Generated as side-effect of .h you might not even need the last line