* [PATCH] Add support for building documentation in separate build-dir too.
@ 2006-12-08 17:16 Han-Wen Nienhuys
0 siblings, 0 replies; only message in thread
From: Han-Wen Nienhuys @ 2006-12-08 17:16 UTC (permalink / raw)
To: git
From 6969e092758f65e8b4b3875ab3050cd0c049cc60 Mon Sep 17 00:00:00 2001
From: Han-Wen Nienhuys <hanwen@xs4all.nl>
Date: Fri, 8 Dec 2006 18:09:23 +0100
Signed-off-by: Han-Wen Nienhuys <hanwen@xs4all.nl>
---
Documentation/Makefile | 33 ++++++++++++++++++++-------------
1 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index c00f5f6..51cd707 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1,6 +1,6 @@
MAN1_TXT= \
$(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
- $(wildcard git-*.txt)) \
+ $(wildcard $(here-srcdir)/git-*.txt)) \
gitk.txt
MAN7_TXT=git.txt
@@ -33,8 +33,15 @@ man7dir=$(mandir)/man7
INSTALL?=install
--include ../config.mak.autogen
+ifndef srcdir
+srcdir=..
+endif
+
+here-srcdir=$(srcdir)/Documentation
+ASCIIDOC_CONF=$(here-srcdir)/asciidoc.conf
+
+-include ../config.mak.autogen
#
# Please note that there is a minor bug in asciidoc.
# The version after 6.0.3 _will_ include the patch found here:
@@ -63,9 +70,9 @@ install: man
#
# Determine "include::" file references in asciidoc files.
#
-doc.dep : $(wildcard *.txt) build-docdep.perl
+doc.dep : $(wildcard $(here-srcdir)/*.txt) build-docdep.perl
rm -f $@+ $@
- perl ./build-docdep.perl >$@+
+ perl $(lastword $^) >$@+
mv $@+ $@
-include doc.dep
@@ -80,35 +87,35 @@ clean:
rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep README
%.html : %.txt
- asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
+ asciidoc -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) $<
%.1 %.7 : %.xml
- xmlto -m callouts.xsl man $<
+ xmlto --searchpath $(here-srcdir)/ -m callouts.xsl man $<
%.xml : %.txt
- asciidoc -b docbook -d manpage -f asciidoc.conf $<
+ asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) $<
git.html: git.txt README
glossary.html : glossary.txt sort_glossary.pl
cat $< | \
- perl sort_glossary.pl | \
+ perl $(lastword $^) | \
asciidoc -b xhtml11 - > glossary.html
-howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
+howto-index.txt: howto-index.sh $(wildcard $(here-srcdir)/howto/*.txt)
rm -f $@+ $@
- sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
+ sh $^ >$@+
mv $@+ $@
$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
- asciidoc -b xhtml11 $*.txt
+ asciidoc -b xhtml11 $<
WEBDOC_DEST = /pub/software/scm/git/docs
-$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
+$(patsubst %.txt,%.html,$(wildcard $(here-srcdir)/howto/*.txt)): %.html : %.txt
rm -f $@+ $@
sed -e '1,/^$$/d' $< | asciidoc -b xhtml11 - >$@+
mv $@+ $@
install-webdoc : html
- sh ./install-webdoc.sh $(WEBDOC_DEST)
+ sh $(here-srcdir)/install-webdoc.sh $(WEBDOC_DEST)
--
1.4.4.1.gc9922-dirty
--
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-08 17:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-08 17:16 [PATCH] Add support for building documentation in separate build-dir too Han-Wen Nienhuys
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).