Subject: [PATCH] Make asciidoc related rules depend on asciidoc.conf

From: Jonas Fonseca <[email-masked]>
Date: Sat, 15 Jul 2006 09:44:25 +0200

Any rule running asciidoc, whether using -f asciidoc.conf or not,
will read asciidoc.conf. Make such rules depend on asciidoc.conf.

Signed-off-by: Jonas Fonseca <[email-masked]>
---

Junio C Hamano <[email-masked]> wrote Fri, Jul 14, 2006:
> Alp is right -- the comments in [attributes] section after the
> definition do appear in the output, even with asciidoc 7.1.2, so
> here is a replacement proposal from me.

Am using the same setup as Alp (AsciiDoc 7.0.2 on Ubuntu Dapper), so I
was a bit curious that I could not see that. So I guess I compiled the
docs first and later decided to add the comments which then didn't cause
a recompilation.

I don't know if there should be a dependency on asciidoc.conf in every
rule calling asciidoc. Could be annoying if you are only making a minor
change.

---

diff --git a/Documentation/Makefile b/Documentation/Makefile
index cc83610..ce6c6cf 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -76,18 +76,18 @@ README: ../README
 clean:
 	rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep README
 
-%.html : %.txt
+%.html : %.txt asciidoc.conf
 	asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
 
 %.1 %.7 : %.xml
 	xmlto -m callouts.xsl man $<
 
-%.xml : %.txt
+%.xml : %.txt asciidoc.conf
 	asciidoc -b docbook -d manpage -f asciidoc.conf $<
 
 git.html: git.txt README
 
-glossary.html : glossary.txt sort_glossary.pl
+glossary.html : glossary.txt sort_glossary.pl asciidoc.conf
 	cat $< | \
 	perl sort_glossary.pl | \
 	asciidoc -b xhtml11 - > glossary.html
@@ -97,12 +97,12 @@ howto-index.txt: howto-index.sh $(wildca
 	sh ./howto-index.sh $(wildcard howto/*.txt) >$@+
 	mv $@+ $@
 
-$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
+$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt asciidoc.conf
 	asciidoc -b xhtml11 $*.txt
 
 WEBDOC_DEST = /pub/software/scm/git/docs
 
-$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
+$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt asciidoc.conf
 	rm -f $@+ $@
 	sed -e '1,/^$$/d' $? | asciidoc -b xhtml11 - >$@+
 	mv $@+ $@
-- 
Jonas Fonseca