aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerton R. Krzesinski <herton@redhat.com>2017-04-20 14:57:28 -0400
committerJonathan Corbet <corbet@lwn.net>2017-04-20 17:42:26 -0400
commit6e91b74d56e169797ecf8ba64def28d6f2fd5003 (patch)
tree8b99a96dd149ffa3fadfbb2525ae52059635aad6
parentd73350568cc773863d2587b06c4d7362e4df92c7 (diff)
Documentation: allow installing man pages to a user defined directory
Documentation/DocBook/Makefile hard codes the prefixed path to which you can install the built man pages (/usr/local prefix). That's unfortunate since the user may want to install to another prefix or location (for example, a distribution packaging the man pages may want to install to a random temporary location in the build process). Be flexible and allow the prefixed path to which we install man pages to be changed with the INSTALL_MAN_PATH environment variable (and use the same default as other similar variables like INSTALL_HDR_PATH). Signed-off-by: Herton R. Krzesinski <herton@redhat.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rw-r--r--Documentation/DocBook/Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index 13056d40e11b..85916f13d330 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -61,11 +61,14 @@ MAN := $(patsubst %.xml, %.9, $(BOOKS))
61mandocs: $(MAN) 61mandocs: $(MAN)
62 find $(obj)/man -name '*.9' | xargs gzip -nf 62 find $(obj)/man -name '*.9' | xargs gzip -nf
63 63
64# Default location for installed man pages
65export INSTALL_MAN_PATH = $(objtree)/usr
66
64installmandocs: mandocs 67installmandocs: mandocs
65 mkdir -p /usr/local/man/man9/ 68 mkdir -p $(INSTALL_MAN_PATH)/man/man9/
66 find $(obj)/man -name '*.9.gz' -printf '%h %f\n' | \ 69 find $(obj)/man -name '*.9.gz' -printf '%h %f\n' | \
67 sort -k 2 -k 1 | uniq -f 1 | sed -e 's: :/:' | \ 70 sort -k 2 -k 1 | uniq -f 1 | sed -e 's: :/:' | \
68 xargs install -m 644 -t /usr/local/man/man9/ 71 xargs install -m 644 -t $(INSTALL_MAN_PATH)/man/man9/
69 72
70# no-op for the DocBook toolchain 73# no-op for the DocBook toolchain
71epubdocs: 74epubdocs:
@@ -237,7 +240,9 @@ dochelp:
237 @echo ' psdocs - Postscript' 240 @echo ' psdocs - Postscript'
238 @echo ' xmldocs - XML DocBook' 241 @echo ' xmldocs - XML DocBook'
239 @echo ' mandocs - man pages' 242 @echo ' mandocs - man pages'
240 @echo ' installmandocs - install man pages generated by mandocs' 243 @echo ' installmandocs - install man pages generated by mandocs to INSTALL_MAN_PATH'; \
244 echo ' (default: $(INSTALL_MAN_PATH))'; \
245 echo ''
241 @echo ' cleandocs - clean all generated DocBook files' 246 @echo ' cleandocs - clean all generated DocBook files'
242 @echo 247 @echo
243 @echo ' make DOCBOOKS="s1.xml s2.xml" [target] Generate only docs s1.xml s2.xml' 248 @echo ' make DOCBOOKS="s1.xml s2.xml" [target] Generate only docs s1.xml s2.xml'