makefile 857 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # -*- make -*-
  2. BASE=../..
  3. SUBDIR=doc/en
  4. # Bring in the default rules
  5. include ../../buildlib/defaults.mak
  6. # Do not use XMLTO, build the manpages directly with XSLTPROC
  7. ifdef XSLTPROC
  8. # generate a list of accepted man page translations
  9. SOURCE = $(patsubst ../%.xml,%,$(wildcard ../*.?.xml))
  10. INCLUDES = ../apt.ent ../apt-verbatim.ent
  11. STYLESHEET=../manpage-style.xsl
  12. LOCAL := manpage-$(firstword $(SOURCE))
  13. $(LOCAL)-LIST := $(SOURCE)
  14. # Install generation hooks
  15. manpages: $($(LOCAL)-LIST) apt.8
  16. $($(LOCAL)-LIST) :: % : ../%.xml $(STYLESHEET) $(INCLUDES)
  17. echo Creating man page $@
  18. $(XSLTPROC) -o $@ $(STYLESHEET) $<
  19. apt.8: ../apt.8
  20. cp -a ../apt.8 apt.8
  21. # Clean rule
  22. .PHONY: clean/$(LOCAL)
  23. veryclean: clean/$(LOCAL)
  24. clean: clean/$(LOCAL)
  25. clean/$(LOCAL):
  26. -rm -rf $($(@F)-LIST) apt.8
  27. endif
  28. # Chain to the manpage rule
  29. SOURCE = apt.8
  30. include $(MANPAGE_H)