summaryrefslogtreecommitdiff
path: root/Documentation/Makefile
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2012-06-07 23:03:23 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-06-08 08:31:52 -0700
commitfe77b416c774a469a585c4b58fcae5e7a5f3545d (patch)
tree061ebc63f37f82f7852733fc311333dc7c2c789f /Documentation/Makefile
parentapi-credentials.txt: add "see also" section (diff)
downloadtgif-fe77b416c774a469a585c4b58fcae5e7a5f3545d.tar.xz
docs: fix cross-directory linkgit references
Most of our documentation is in a single directory, so using linkgit:git-config[1] just generates a relative link in the same directory. However, this is not the case with the API documentation in technical/*, which need to refer to git-config from the parent directory. We can fix this by passing a special prefix attribute when building in a subdirectory, and respecting that prefix in our linkgit definitions. We only have to modify the html linkgit definition. For manpages, we can ignore this for two reasons: 1. we do not generate actual links to the file in manpages, but instead just give the name and section of the linked manpage 2. we do not currently build manpages for subdirectories, only html Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/Makefile')
-rw-r--r--Documentation/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 9ad6a6a300..d84d6f414a 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -270,6 +270,7 @@ technical/api-index.txt: technical/api-index-skel.txt \
technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS))
$(QUIET_GEN)cd technical && '$(SHELL_PATH_SQ)' ./api-index.sh
+technical/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
$(patsubst %,%.html,$(API_DOCS) technical/api-index): %.html : %.txt
$(QUIET_ASCIIDOC)$(ASCIIDOC) -b xhtml11 -f asciidoc.conf \
$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) $*.txt
@@ -323,6 +324,7 @@ $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
WEBDOC_DEST = /pub/software/scm/git/docs
+howto/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
sed -e '1,/^$$/d' $< | $(ASCIIDOC) $(ASCIIDOC_EXTRA) -b xhtml11 - >$@+ && \