manpage.mak 580 B

12345678910111213141516171819202122232425262728
  1. # -*- make -*-
  2. # This installs man pages into the doc directory
  3. # Input
  4. # $(SOURCE) - The documents to use
  5. # All output is writtin 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: $($(LOCAL)-LIST)
  12. veryclean: veryclean/$(LOCAL)
  13. $($(LOCAL)-LIST) : $(DOC)/% : %
  14. echo Installing man page $< to $(@D)
  15. cp $< $(@D)
  16. # Clean rule
  17. .PHONY: veryclean/$(LOCAL)
  18. veryclean/$(LOCAL):
  19. -rm -rf $($(@F)-LIST)