makefile 975 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 apt-vendor.ent
  11. STYLESHEET=../manpage-style.xsl
  12. LOCAL := manpage-$(firstword $(SOURCE))
  13. $(LOCAL)-LIST := $(SOURCE)
  14. apt-vendor.ent: ../../vendor/current/apt-vendor.ent
  15. ln -sf $(shell readlink -f $^) $@
  16. # Install generation hooks
  17. manpages: $($(LOCAL)-LIST) apt.7
  18. $($(LOCAL)-LIST) :: % : ../%.xml $(STYLESHEET) $(INCLUDES)
  19. echo Creating man page $@
  20. $(XSLTPROC) -o $@ $(STYLESHEET) $<
  21. apt.7: ../apt.7
  22. cp -a ../apt.7 apt.7
  23. # Clean rule
  24. .PHONY: clean/$(LOCAL)
  25. veryclean: clean/$(LOCAL)
  26. clean: clean/$(LOCAL)
  27. clean/$(LOCAL):
  28. -rm -rf $($(@F)-LIST) apt.7 apt-vendor.ent
  29. endif
  30. # Chain to the manpage rule
  31. SOURCE = apt.7
  32. include $(MANPAGE_H)