Code

Documentation: quote {non-attributes} for asciidoc
[git.git] / Documentation / Makefile
index 3f92783d55b401a5c919f7c9176a12953d0c4904..f3a6c733b662f4e9d06bc69cadc2201ea34f41ce 100644 (file)
@@ -2,7 +2,7 @@ MAN1_TXT= \
        $(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
                $(wildcard git-*.txt)) \
        gitk.txt
-MAN5_TXT=gitattributes.txt
+MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt
 MAN7_TXT=git.txt
 
 DOC_HTML=$(patsubst %.txt,%.html,$(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT))
@@ -29,7 +29,7 @@ DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
 
 prefix?=$(HOME)
 bindir?=$(prefix)/bin
-mandir?=$(prefix)/man
+mandir?=$(prefix)/share/man
 man1dir=$(mandir)/man1
 man5dir=$(mandir)/man5
 man7dir=$(mandir)/man7
@@ -37,6 +37,9 @@ man7dir=$(mandir)/man7
 
 ASCIIDOC=asciidoc
 ASCIIDOC_EXTRA =
+ifdef ASCIIDOC8
+ASCIIDOC_EXTRA += -a asciidoc7compatible
+endif
 INSTALL?=install
 DOC_REF = origin/man
 
@@ -112,8 +115,7 @@ clean:
 %.html : %.txt
        rm -f $@+ $@
        $(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
-               $(ASCIIDOC_EXTRA) -o - $< | \
-               sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' >$@+
+               $(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $<
        mv $@+ $@
 
 %.1 %.5 %.7 : %.xml
@@ -122,8 +124,7 @@ clean:
 %.xml : %.txt
        rm -f $@+ $@
        $(ASCIIDOC) -b docbook -d manpage -f asciidoc.conf \
-               $(ASCIIDOC_EXTRA) -o - $< | \
-               sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' >$@+
+               $(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $<
        mv $@+ $@
 
 user-manual.xml: user-manual.txt user-manual.conf