diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-01-31T14·33+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-01-31T14·33+0100 |
commit | 4271927c5be2c5b87ca83682d1f2bd71d5ce4a66 (patch) | |
tree | ac25fb054d624f45fd676ff5576fc73fd36e4c98 | |
parent | 5311b2b25084e53ff132df96d66ab06efead0853 (diff) |
Add support for installing man-pages
-rw-r--r-- | lib.mk | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib.mk b/lib.mk index 8894d5308b8a..cbed773fe762 100644 --- a/lib.mk +++ b/lib.mk @@ -8,6 +8,7 @@ default: all # Initialise some variables. bin_SCRIPTS := noinst_SCRIPTS := +man-pages := OS = $(shell uname -s) @@ -19,6 +20,7 @@ libexecdir ?= $(prefix)/libexec datadir ?= $(prefix)/share localstatedir ?= $(prefix)/var sysconfdir ?= $(prefix)/etc +mandir ?= $(prefix)/share/man # Pass -fPIC if we're building dynamic libraries. @@ -78,9 +80,14 @@ $(foreach script, $(bin_SCRIPTS), $(eval programs_list += $(script))) $(foreach script, $(noinst_SCRIPTS), $(eval programs_list += $(script))) $(foreach template, $(template_files), $(eval $(call instantiate-template,$(template)))) $(foreach test, $(INSTALL_TESTS), $(eval $(call run-install-test,$(test)))) +$(foreach file, $(man-pages), $(eval $(call install-data-in, $(file), $(mandir)/man$(patsubst .%,%,$(suffix $(file)))))) -all: $(programs_list) $(libs_list) $(jars_list) +.PHONY: all man help + +all: $(programs_list) $(libs_list) $(jars_list) $(man-pages) + +man: $(man-pages) help: @@ -93,6 +100,9 @@ help: ifdef PACKAGE_NAME @echo " dist: Generate a source distribution" endif +ifdef man-pages + @echo " man: Generate manual pages" +endif ifdef programs_list @echo "" @echo "The following programs can be built:" |