1 |
remi 14/11/30 22:00:59 |
2 |
|
3 |
Added: |
4 |
empathy-3.12.7-Fix-parallel-build-in-extensions.patch |
5 |
Log: |
6 |
net-im/empathy: fix parallel build issue |
7 |
|
8 |
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 901AB08A) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 net-im/empathy/files/empathy-3.12.7-Fix-parallel-build-in-extensions.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/empathy/files/empathy-3.12.7-Fix-parallel-build-in-extensions.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/empathy/files/empathy-3.12.7-Fix-parallel-build-in-extensions.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: empathy-3.12.7-Fix-parallel-build-in-extensions.patch |
17 |
=================================================================== |
18 |
From 24e4480421483685dfc493ad38089c286a8c5f4a Mon Sep 17 00:00:00 2001 |
19 |
From: =?UTF-8?q?R=C3=A9mi=20Cardona?= <remi@g.o> |
20 |
Date: Sun, 30 Nov 2014 22:10:59 +0100 |
21 |
Subject: [PATCH] Fix parallel build in extensions/ |
22 |
MIME-Version: 1.0 |
23 |
Content-Type: text/plain; charset=UTF-8 |
24 |
Content-Transfer-Encoding: 8bit |
25 |
|
26 |
GNU Make manual says: |
27 |
|
28 |
A rule with multiple targets is equivalent to writing many rules, |
29 |
each with one target, and all identical aside from that. |
30 |
|
31 |
In other words, make may very well call glib-gtypes-generator.py twice |
32 |
(once for each generated header). And hell breaks loose because the |
33 |
python code assumes it will run once (it should be using the tempfile |
34 |
module, but that's another bug). On a fast multi-core machine, make -j4 |
35 |
will easily reproduce this bug. |
36 |
|
37 |
The solution is hidden in the same manual [1] : |
38 |
|
39 |
%.tab.c %.tab.h: %.y |
40 |
bison -d $< |
41 |
|
42 |
This tells make that the recipe ‘bison -d x.y’ will make both |
43 |
x.tab.c and x.tab.h. |
44 |
|
45 |
So by using '%' to replace the 'y' in the targets, I'm telling make that |
46 |
running the recipe once will generate both files. |
47 |
|
48 |
[1] http://www.gnu.org/software/make/manual/make.html#Pattern-Examples |
49 |
|
50 |
https://bugs.gentoo.org/show_bug.cgi?id=515894 |
51 |
https://bugzilla.gnome.org/show_bug.cgi?id=685837 |
52 |
--- |
53 |
extensions/Makefile.am | 2 +- |
54 |
1 file changed, 1 insertion(+), 1 deletion(-) |
55 |
|
56 |
diff --git a/extensions/Makefile.am b/extensions/Makefile.am |
57 |
index 79622d4..ebe5fac 100644 |
58 |
--- a/extensions/Makefile.am |
59 |
+++ b/extensions/Makefile.am |
60 |
@@ -66,7 +66,7 @@ extensions.html: _gen/all.xml $(tools_dir)/doc-generator.xsl |
61 |
$(tools_dir)/doc-generator.xsl \ |
62 |
$< > $@ |
63 |
|
64 |
-_gen/gtypes.h _gen/gtypes-body.h: _gen/all.xml \ |
65 |
+_gen/gt%pes.h _gen/gt%pes-body.h: _gen/all.xml \ |
66 |
$(top_srcdir)/tools/glib-gtypes-generator.py |
67 |
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glib-gtypes-generator.py \ |
68 |
$< _gen/gtypes Emp |
69 |
-- |
70 |
2.1.3 |