makefile 901 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 '$(abspath $^)' $@
  16. # Install generation hooks
  17. manpages: $($(LOCAL)-LIST)
  18. $($(LOCAL)-LIST) :: % : ../%.xml $(STYLESHEET) $(INCLUDES)
  19. echo Creating man page $@
  20. $(XSLTPROC) -o $@ $(STYLESHEET) $<
  21. # Clean rule
  22. .PHONY: clean/$(LOCAL)
  23. veryclean: clean/$(LOCAL)
  24. clean: clean/$(LOCAL)
  25. clean/$(LOCAL):
  26. -rm -rf $($(@F)-LIST) apt-vendor.ent
  27. endif
  28. # Chain to the manpage rule
  29. include $(MANPAGE_H)