summaryrefslogtreecommitdiff
blob: df14a5cfe3056d40eafb761f86dc25a1b7e0ac43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Respect intltool's LINGUAS variable for building translations.

--- a/webkit-1.7.5/GNUmakefile.am
+++ b/webkit-1.7.5/GNUmakefile.am
@@ -54,6 +54,9 @@
 IDL_BINDINGS :=
 TEST_PROGS :=
 POFILES :=
+PO_LINGUAS :=
+USER_LINGUAS :=
+USE_LINGUAS :=
 MOFILES :=
 dom_binding_idls :=
 wtf_cppflags:=
--- a/webkit-1.7.5/Source/WebKit/gtk/po/GNUmakefile.am
+++ b/webkit-1.7.5/Source/WebKit/gtk/po/GNUmakefile.am
@@ -27,7 +27,15 @@
 
 POFILES += $(shell ls $(srcdir)/Source/WebKit/gtk/po/*.po)
 
-MOFILES += $(shell echo $(POFILES) | tr ' ' '\n' | sed "s,^$(srcdir)/,,g" | sed 's/\.po/.mo/g')
+PO_LINGUAS += $(patsubst $(srcdir)/Source/WebKit/gtk/po/%.po,%,$(POFILES))
+
+USER_LINGUAS += $(filter $(LINGUAS),$(PO_LINGUAS))
+
+USE_LINGUAS += $(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else LLINGUAS="$(PO_LINGUAS)"; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+MOFILES += $(USE_LINGUAS:%=Source/WebKit/gtk/po/%.mo)
+
+ALL_MOFILES := $(shell echo $(POFILES) | tr ' ' '\n' | sed "s,^$(srcdir)/,,g" | sed 's/\.po/.mo/g')
 
 .po.mo:
 	test -d Source/WebKit/gtk/po/ || mkdir -p Source/WebKit/gtk/po/
@@ -124,11 +132,11 @@
 	$(top_builddir)/stamp-po
 
 MAINTAINERCLEANFILES += \
-	$(MOFILES) \
+	$(ALL_MOFILES) \
 	$(top_builddir)/Source/WebKit/gtk/po/$(DOMAIN).pot
 
 DISTCLEANFILES += \
-	$(MOFILES) \
+	$(ALL_MOFILES) \
 	$(top_builddir)/Source/WebKit/gtk/po/$(DOMAIN).pot
 
 po-install-data-local: all