manpage.mak 617 B

12345678910111213141516171819202122232425262728293031
  1. # -*- make -*-
  2. # This installs man pages into the doc directory
  3. # Input
  4. # $(SOURCE) - The documents to use
  5. # All output is written to files in the build doc directory
  6. # See defaults.mak for information about LOCAL
  7. # Some local definitions
  8. LOCAL := manpage-$(firstword $(SOURCE))
  9. $(LOCAL)-LIST := $(addprefix $(DOC)/,$(SOURCE))
  10. # Install generation hooks
  11. doc: manpages
  12. manpages: $($(LOCAL)-LIST)
  13. veryclean: veryclean/$(LOCAL)
  14. MKDIRS += $(DOC)
  15. $($(LOCAL)-LIST) : $(DOC)/% : %
  16. echo Installing man page $< to $(@D)
  17. cp $< $(@D)
  18. # Clean rule
  19. .PHONY: veryclean/$(LOCAL)
  20. veryclean/$(LOCAL):
  21. -rm -rf $($(@F)-LIST)