-
GNU Make manual says: A rule with multiple targets is equivalent to writing many rules, each with one target, and all identical aside from that. In other words, make may very well call glib-gtypes-generator.py twice (once for each generated header). And hell breaks loose because the python code assumes it will run once (it should be using the tempfile module, but that's another bug). On a fast multi-core machine, make -j4 will easily reproduce this bug. The solution is hidden in the same manual [1] : %.tab.c %.tab.h: %.y bison -d $< This tells make that the recipe ‘bison -d x.y’ will make both x.tab.c and x.tab.h. So by using '%' to replace the 'y' in the targets, I'm telling make that running the recipe once will generate both files. [1] http://www.gnu.org/software/make/manual/make.html#Pattern-Examples https://bugs.gentoo.org/show_bug.cgi?id=515894 https://bugzilla.gnome.org/show_bug.cgi?id=685837 Signed-off-by: Gilles Dartiguelongue <eva@gentoo.org>
fd624644