sgml_manpage.mak 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # -*- make -*-
  2. # This handles man pages in DocBook SGMLL format. We convert to the respective
  3. # output in the source directory then copy over to the final dest. This
  4. # means yodl is only needed if compiling from CVS
  5. # Input
  6. # $(SOURCE) - The documents to use, in the form foo.sect, ie apt-cache.8
  7. # the sgml files are called apt-cache.8.sgml
  8. # See defaults.mak for information about LOCAL
  9. # Some local definitions
  10. ifdef NSGMLS
  11. ifdef SGMLSPL
  12. ifdef DOCBOOK2MAN
  13. LOCAL := sgml-manpage-$(firstword $(SOURCE))
  14. $(LOCAL)-LIST := $(SOURCE)
  15. # Install generation hooks
  16. doc: $($(LOCAL)-LIST)
  17. veryclean: veryclean/$(LOCAL)
  18. $($(LOCAL)-LIST) :: % : %.sgml $(INCLUDES)
  19. echo Creating man page $@
  20. $(NSGMLS) $< | $(SGMLSPL) $(DOCBOOK2MAN)
  21. # Clean rule
  22. .PHONY: veryclean/$(LOCAL)
  23. veryclean/$(LOCAL):
  24. -rm -rf $($(@F)-LIST)
  25. HAVE_SGML=yes
  26. endif
  27. endif
  28. endif
  29. INCLUDES :=
  30. ifndef HAVE_SGML
  31. # Strip from the source list any man pages we dont have compiled already
  32. SOURCE := $(wildcard $(SOURCE))
  33. endif
  34. # Chain to the manpage rule
  35. ifneq ($(words $(SOURCE)),0)
  36. include $(MANPAGE_H)
  37. endif