Makefile.am 940 B

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