Add packaging
[platform/upstream/openconnect.git] / po / Makefile.am
1
2 LINGUAS = @LINGUAS@
3 MOFILES = $(LINGUAS:%=%.mo)
4 POFILES = $(LINGUAS:%=%.po)
5
6 noinst_DATA = $(MOFILES)
7
8 SUFFIXES = .mo
9
10 .po.mo:
11         rm -f  && $(MSGFMT) -o $@ $<
12
13 clean-local:
14         rm -f $(MOFILES)
15
16 install-data-hook: all
17         linguas="$(LINGUAS)"; \
18         for l in $$linguas; do \
19           dir="$(DESTDIR)$(localedir)/$$l/LC_MESSAGES"; \
20           $(mkdir_p) $$dir; \
21           echo Installing $$l.mo to $$dir/$(PACKAGE).mo ; \
22           $(INSTALL_DATA) $$l.mo $$dir/$(PACKAGE).mo; \
23         done
24
25 uninstall-hook:
26         linguas="$(LINGUAS)"; \
27         for l in $$linguas; do \
28           file="$(DESTDIR)$(localedir)/$$l/LC_MESSAGES/$(PACKAGE).mo"; \
29           if [ -r "$$file" ]; then \
30             echo "Removing $$file"; rm -f "$$file"; \
31           fi ; \
32         done
33
34 # $(PACKAGE).pot is built by a rule in the parent directory Makefile
35 # This rule isn't needed but is here for convenience if manually invoked
36 .PHONY: $(PACKAGE).pot
37 $(PACKAGE).pot:
38         $(MAKE) -C .. po/$@
39
40 EXTRA_DIST = $(POFILES) LINGUAS
41 DISTCLEANFILES=$(PACKAGE).pot