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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
respect user LINGUAS
fix parallel build install
--- a/Makefile.in
+++ b/Makefile.in
@@ -16,7 +16,12 @@
export VPATH = .:$(srcdir)
DESTDIR =
-LINGUAS = $(basename $(notdir $(wildcard $(srcdir)/po/*.po)))
+ALL_LINGUAS = $(basename $(notdir $(wildcard $(srcdir)/po/*.po)))
+ifeq ($(LINGUAS),)
+INSTALL_LINGUAS = $(ALL_LINGUAS)
+else
+INSTALL_LINGUAS = $(filter $(LINGUAS),$(ALL_LINGUAS))
+endif
CC = @CC@
PERL = @PERL@
@@ -39,12 +44,13 @@
all: $(target) man info @extra_make_all@
install: all install_base @extra_make_install@
-install_base:
+install_dirs:
$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
$(MKINSTALLDIRS) $(DESTDIR)$(infodir)
+install_base: install_dirs
$(INSTALL_PROGRAM) $(target) $(DESTDIR)$(bindir)
$(INSTALL_DATA) $(call vpath_file,$(target).1) $(DESTDIR)$(mandir)/man1
$(INSTALL_DATA) $(call vpath_file,/$(target).info) \
@@ -56,11 +62,11 @@
$(DESTDIR)$(infodir)/$(target).info; \
fi
-install_preload: preload
+install_preload: install_dirs preload
$(INSTALL_PROGRAM) $(preload).so $(DESTDIR)$(libdir)
-install_l10n: msg_l10n man_l10n
- for lang in $(LINGUAS); \
+install_l10n: install_dirs msg_l10n man_l10n
+ for lang in $(INSTALL_LINGUAS); \
do \
$(MKINSTALLDIRS) $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
$(INSTALL_DATA) $(call vpath_file,po/$$lang.gmo) \
@@ -124,7 +130,7 @@
$(MAKE) $(target).h2m
./$(target) --include=$(target).h2m --output=$@ ./$(target)
-msg_l10n: $(addprefix po/,$(addsuffix .gmo,$(LINGUAS)))
+msg_l10n: $(addprefix po/,$(addsuffix .gmo,$(ALL_LINGUAS)))
po/%.gmo: $(srcdir)/po/%.po
test -d po || mkdir po
$(MSGFMT) -o $@ $?
@@ -134,7 +140,7 @@
$(MKINSTALLDIRS) localetmp/$$lang/LC_MESSAGES && \
$(INSTALL_DATA) po/$$lang.gmo localetmp/$$lang/LC_MESSAGES/$(target).mo
-man_l10n: $(addprefix $(target).,$(addsuffix .1,$(LINGUAS)))
+man_l10n: $(addprefix $(target).,$(addsuffix .1,$(ALL_LINGUAS)))
$(target).%.1: $(srcdir)/$(target).PL $(srcdir)/$(target).h2m.PL \
$(srcdir)/po/%.po
lang=$(patsubst $(target).%.1,%,$@); \
@@ -164,7 +170,7 @@
./config.status
update-po: $(srcdir)/po/$(target).pot
- for lang in $(LINGUAS); \
+ for lang in $(ALL_LINGUAS); \
do \
echo -n "Updating $$lang "; \
msgmerge -U $(srcdir)/po/$$lang.po $(srcdir)/po/$(target).pot; \
|