Makefile 972 B

123456789101112131415161718192021222324252627282930313233343536
  1. # vim:set ts=2:noet:
  2. include ../common.mk
  3. bdir=generated
  4. .PHONY: all install clean
  5. all: $(bdir)/manpages.stamp
  6. install: $(bdir)/manpages.stamp
  7. for man in $(bdir)/apt-listchanges*.1; do \
  8. test -s "$$f"; \
  9. lang=`echo $$man | sed -e 's/^.*apt-listchanges\.*// ; s/\.*1//'`; \
  10. install -d $(DESTDIR)/usr/share/man/$$lang/man1; \
  11. install -m 644 $$man $(DESTDIR)/usr/share/man/$$lang/man1/apt-listchanges.1; \
  12. done
  13. clean:
  14. rm -rf generated
  15. PO4A := PERL_HASH_SEED=0 PERL_PERTURB_KEYS=0 po4a $(XGETTEXT_COMMON_OPTIONS) --previous
  16. update-po:
  17. $(PO4A) --force -v po4a.cfg
  18. $(bdir)/po4a.stamp: apt-listchanges.sgml po/*.po po/*.add po4a.cfg
  19. $(PO4A) -v po4a.cfg
  20. touch "$@"
  21. $(bdir)/manpages.stamp: $(bdir)/po4a.stamp
  22. for f in apt-listchanges.sgml $(bdir)/apt-listchanges.*.sgml; do \
  23. test -f "$$f" || continue; \
  24. g="$(bdir)/`basename $$f .sgml`.1"; \
  25. echo "Creating $$g from $$f"; \
  26. LC_ALL=C docbook-to-man "$$f" > "$$g"; \
  27. done
  28. touch "$@"