summaryrefslogtreecommitdiff
path: root/Documentation/Makefile
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2007-12-02 05:07:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-12-09 09:19:44 (GMT)
commit5d6491c7c7536ab930a6e9ce2ec3b5249d4c283f (patch)
tree75c099f90edef7ea8debf2a5021f0fc661eb0b05 /Documentation/Makefile
parent45533d2694d480be86112f2da36d555e7373ba24 (diff)
downloadgit-5d6491c7c7536ab930a6e9ce2ec3b5249d4c283f.zip
git-5d6491c7c7536ab930a6e9ce2ec3b5249d4c283f.tar.gz
git-5d6491c7c7536ab930a6e9ce2ec3b5249d4c283f.tar.bz2
git-help: add -w|--web option to display html man page in a browser.
Now when using "git help -w cmd", we will try to show the HTML man page "git-cmd.html" in your prefered web browser. To do that "help.c" code will call a new shell script "git-browse-help". This currently works only if the HTML versions of the man page have been installed in $(htmldir) (typically "/usr/share/doc/git-doc"), so new target to do that is added to "Documentation/Makefile". The browser to use can be configured using the "web.browser" config variable. We try to open a new tab in an existing web browser, if possible. The code in "git-browse-help" is heavily stolen from "git-mergetool" by Theodore Y. Ts'o. Thanks. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/Makefile')
-rw-r--r--Documentation/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index de11ee0..f0df0b0 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -29,6 +29,7 @@ DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
prefix?=$(HOME)
bindir?=$(prefix)/bin
+htmldir?=$(prefix)/share/doc/git-doc
mandir?=$(prefix)/share/man
man1dir=$(mandir)/man1
man5dir=$(mandir)/man5
@@ -95,6 +96,9 @@ install-info: info
echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \
fi
+install-html: html
+ sh ./install-webdoc.sh $(DESTDIR)$(htmldir)
+
../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
$(MAKE) -C ../ GIT-VERSION-FILE