manpage.mak 598 B

123456789101112131415161718192021222324252627282930
  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. MKDIRS += $(DOC)
  14. $($(LOCAL)-LIST) : $(DOC)/% : %
  15. echo Installing man page $< to $(@D)
  16. cp $< $(@D)
  17. # Clean rule
  18. .PHONY: veryclean/$(LOCAL)
  19. veryclean/$(LOCAL):
  20. -rm -rf $($(@F)-LIST)