{"thread":{"id":"43554","subject":"[PATCH] Add support for building documentation in separate build-dir too.","startedAt":"2006-12-08T17:16:47Z","lastAt":"2006-12-08T17:16:47Z","messageCount":1,"participants":["Han-Wen Nienhuys"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"295461","messageId":"elc6lk$vnl$1@sea.gmane.org","threadId":"43554","inReplyTo":null,"subject":"[PATCH] Add support for building documentation in separate build-dir too.","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-12-08T17:16:47Z","receivedAt":"2006-12-08T17:16:47Z","isPatch":true,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"From 6969e092758f65e8b4b3875ab3050cd0c049cc60 Mon Sep 17 00:00:00 2001\nFrom: Han-Wen Nienhuys <hanwen@xs4all.nl>\nDate: Fri, 8 Dec 2006 18:09:23 +0100\n\n\nSigned-off-by: Han-Wen Nienhuys <hanwen@xs4all.nl>\n---\n Documentation/Makefile |   33 ++++++++++++++++++++-------------\n 1 files changed, 20 insertions(+), 13 deletions(-)\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex c00f5f6..51cd707 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -1,6 +1,6 @@\n MAN1_TXT= \\\n \t$(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \\\n-\t\t$(wildcard git-*.txt)) \\\n+\t\t$(wildcard $(here-srcdir)/git-*.txt)) \\\n \tgitk.txt\n MAN7_TXT=git.txt\n \n@@ -33,8 +33,15 @@ man7dir=$(mandir)/man7\n \n INSTALL?=install\n \n--include ../config.mak.autogen\n+ifndef srcdir\n+srcdir=..\n+endif\n+\n+here-srcdir=$(srcdir)/Documentation\n \n+ASCIIDOC_CONF=$(here-srcdir)/asciidoc.conf\n+\n+-include ../config.mak.autogen\n #\n # Please note that there is a minor bug in asciidoc.\n # The version after 6.0.3 _will_ include the patch found here:\n@@ -63,9 +70,9 @@ install: man\n #\n # Determine \"include::\" file references in asciidoc files.\n #\n-doc.dep : $(wildcard *.txt) build-docdep.perl\n+doc.dep : $(wildcard $(here-srcdir)/*.txt) build-docdep.perl\n \trm -f $@+ $@\n-\tperl ./build-docdep.perl >$@+\n+\tperl $(lastword $^) >$@+\n \tmv $@+ $@\n \n -include doc.dep\n@@ -80,35 +87,35 @@ clean:\n \trm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep README\n \n %.html : %.txt\n-\tasciidoc -b xhtml11 -d manpage -f asciidoc.conf $<\n+\tasciidoc -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) $<\n \n %.1 %.7 : %.xml\n-\txmlto -m callouts.xsl man $<\n+\txmlto --searchpath $(here-srcdir)/  -m callouts.xsl man $<\n \n %.xml : %.txt\n-\tasciidoc -b docbook -d manpage -f asciidoc.conf $<\n+\tasciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) $<\n \n git.html: git.txt README\n \n glossary.html : glossary.txt sort_glossary.pl\n \tcat $< | \\\n-\tperl sort_glossary.pl | \\\n+\tperl $(lastword $^) | \\\n \tasciidoc -b xhtml11 - > glossary.html\n \n-howto-index.txt: howto-index.sh $(wildcard howto/*.txt)\n+howto-index.txt: howto-index.sh $(wildcard $(here-srcdir)/howto/*.txt)\n \trm -f $@+ $@\n-\tsh ./howto-index.sh $(wildcard howto/*.txt) >$@+\n+\tsh $^ >$@+\n \tmv $@+ $@\n \n $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt\n-\tasciidoc -b xhtml11 $*.txt\n+\tasciidoc -b xhtml11 $<\n \n WEBDOC_DEST = /pub/software/scm/git/docs\n \n-$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt\n+$(patsubst %.txt,%.html,$(wildcard $(here-srcdir)/howto/*.txt)): %.html : %.txt\n \trm -f $@+ $@\n \tsed -e '1,/^$$/d' $< | asciidoc -b xhtml11 - >$@+\n \tmv $@+ $@\n \n install-webdoc : html\n-\tsh ./install-webdoc.sh $(WEBDOC_DEST)\n+\tsh $(here-srcdir)/install-webdoc.sh $(WEBDOC_DEST)\n-- \n1.4.4.1.gc9922-dirty\n\n\n-- \n Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen\n"}]}