aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2008-02-02 07:32:33 +0100
committerJunio C Hamano <gitster@pobox.com>2008-02-05 01:01:45 -0800
commit482cce820554809c02bc639bb33462f9905e4342 (patch)
tree0db89b008dba37f564ea74e6275c2bc297dfeb85 /Makefile
parent7a2078b4b00fb1c5d7b0bf8155778f79377b8f2f (diff)
downloadgit-482cce820554809c02bc639bb33462f9905e4342.tar.gz
git-482cce820554809c02bc639bb33462f9905e4342.tar.xz
help: make 'git-help--browse' usable outside 'git-help'.
"git-help--browse" helper is to launch a browser of the user's choice to view the HTML version of git documentation for a given command. It used to take the name of a command, convert it to the path of the documentation by prefixing the directory name and appending the ".html" suffix, and start the browser on the path. This updates the division of labor between the caller in help.c and git-help--browser helper. The helper is now responsible for launching a browser of the user's choice on given URLs, and it is the caller's responsibility to tell it the paths to documentation files. This is in preparation to reuse the logic to choose user's preferred browser in instaweb. The helper had a provision for running it without any command name, in which case it showed the toplevel "git(7)" documentation, but the caller in help.c never makes such a call. The helper now exits with a usage message when no path is given. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 92341c4bb..a03fd2e9c 100644
--- a/Makefile
+++ b/Makefile
@@ -819,6 +819,7 @@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
help.o: help.c common-cmds.h GIT-CFLAGS
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \
+ '-DGIT_HTML_PATH="$(htmldir_SQ)"' \
'-DGIT_MAN_PATH="$(mandir_SQ)"' \
'-DGIT_INFO_PATH="$(infodir_SQ)"' $<
@@ -839,7 +840,6 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
-e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
-e 's/@@NO_CURL@@/$(NO_CURL)/g' \
- -e 's|@@HTMLDIR@@|$(htmldir_SQ)|g' \
$@.sh >$@+ && \
chmod +x $@+ && \
mv $@+ $@