/
Makefile.am
47 lines (37 loc) · 1.21 KB
/
Makefile.am
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
LINGUAS = @LINGUAS@
MOFILES = $(LINGUAS:%=%.mo)
POFILES = $(LINGUAS:%=%.po)
noinst_DATA = $(MOFILES)
SUFFIXES = .mo
.po.mo:
rm -f && $(MSGFMT) -o $@ $<
clean-local:
rm -f $(MOFILES)
install-data-hook: all
linguas="$(LINGUAS)"; \
for l in $$linguas; do \
dir="$(DESTDIR)$(localedir)/$$l/LC_MESSAGES"; \
$(mkdir_p) $$dir; \
echo Installing $$l.mo to $$dir/$(PACKAGE).mo ; \
$(INSTALL_DATA) $$l.mo $$dir/$(PACKAGE).mo; \
done
uninstall-hook:
linguas="$(LINGUAS)"; \
for l in $$linguas; do \
file="$(DESTDIR)$(localedir)/$$l/LC_MESSAGES/$(PACKAGE).mo"; \
if [ -r "$$file" ]; then \
echo "Removing $$file"; rm -f "$$file"; \
fi ; \
done
# This is a GNUism but I don't care; it's not a default target.
POTFILESIN = $(shell grep -v '^\#' $(srcdir)/POTFILES.in)
POTFILES = $(POTFILESIN:%=$(top_srcdir)/%)
$(PACKAGE).pot: $(POTFILES) Makefile
rm -f $@ && \
xgettext --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
--files-from=$(srcdir)/POTFILES.in --from-code=UTF-8 \
--package-name="@PACKAGE@" --package-version="@VERSION@" \
--msgid-bugs-address=openconnect-devel@lists.infradead.org -o $@
EXTRA_DIST = $(POFILES) LINGUAS POTFILES.in
DISTCLEANFILES=$(PACKAGE).pot