Remove unused code in parse_commit_buffer()
[gitweb.git] / Documentation / Makefile
index 37ec355ba41e9f0cc6474ca0f04ec7e8921dfd59..62269e39c4edf95b2cf2e6a60bff2a33b239b07e 100644 (file)
@@ -1,9 +1,12 @@
 MAN1_TXT= \
        $(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
                $(wildcard git-*.txt)) \
-       gitk.txt
-MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt
-MAN7_TXT=git.txt
+       gitk.txt git.txt
+MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt githooks.txt \
+       gitrepository-layout.txt
+MAN7_TXT=gitcli.txt gittutorial.txt gittutorial-2.txt \
+       gitcvs-migration.txt gitcore-tutorial.txt gitglossary.txt \
+       gitdiffcore.txt
 
 MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)
 MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT))
@@ -11,19 +14,14 @@ MAN_HTML=$(patsubst %.txt,%.html,$(MAN_TXT))
 
 DOC_HTML=$(MAN_HTML)
 
-ARTICLES = tutorial
-ARTICLES += tutorial-2
-ARTICLES += core-tutorial
-ARTICLES += cvs-migration
-ARTICLES += diffcore
-ARTICLES += howto-index
-ARTICLES += repository-layout
-ARTICLES += hooks
+ARTICLES = howto-index
 ARTICLES += everyday
 ARTICLES += git-tools
-ARTICLES += glossary
 # with their own formatting rules.
-SP_ARTICLES = howto/revert-branch-rebase user-manual
+SP_ARTICLES = howto/revert-branch-rebase howto/using-merge-subtree user-manual
+API_DOCS = $(patsubst %.txt,%,$(filter-out technical/api-index-skel.txt technical/api-index.txt, $(wildcard technical/api-*.txt)))
+SP_ARTICLES += $(API_DOCS)
+SP_ARTICLES += technical/api-index
 
 DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
 
@@ -42,6 +40,7 @@ man7dir=$(mandir)/man7
 
 ASCIIDOC=asciidoc
 ASCIIDOC_EXTRA =
+MANPAGE_XSL = callouts.xsl
 INSTALL?=install
 RM ?= rm -f
 DOC_REF = origin/man
@@ -62,6 +61,7 @@ ASCIIDOC_EXTRA += -a asciidoc7compatible
 endif
 ifdef DOCBOOK_XSL_172
 ASCIIDOC_EXTRA += -a docbook-xsl-172
+MANPAGE_XSL = manpage-1.72.xsl
 endif
 
 #
@@ -139,13 +139,14 @@ cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT)
        $(PERL_PATH) ./cmd-list.perl ../command-list.txt
        date >$@
 
-git.7 git.html: git.txt
-
 clean:
-       $(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7 *.texi *.texi+ howto-index.txt howto/*.html doc.dep
+       $(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7
+       $(RM) *.texi *.texi+ git.info gitman.info
+       $(RM) howto-index.txt howto/*.html doc.dep
+       $(RM) technical/api-*.html technical/api-index.txt
        $(RM) $(cmds_txt) *.made
 
-%.html : %.txt
+$(MAN_HTML): %.html : %.txt
        $(RM) $@+ $@
        $(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
                $(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $<
@@ -153,7 +154,7 @@ clean:
 
 %.1 %.5 %.7 : %.xml
        $(RM) $@
-       xmlto -m callouts.xsl man $<
+       xmlto -m $(MANPAGE_XSL) man $<
 
 %.xml : %.txt
        $(RM) $@+ $@
@@ -164,16 +165,24 @@ clean:
 user-manual.xml: user-manual.txt user-manual.conf
        $(ASCIIDOC) -b docbook -d book $<
 
+technical/api-index.txt: technical/api-index-skel.txt \
+       technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS))
+       cd technical && sh ./api-index.sh
+
+$(patsubst %,%.html,$(API_DOCS) technical/api-index): %.html : %.txt
+       $(ASCIIDOC) -b xhtml11 -f asciidoc.conf \
+               $(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) $*.txt
+
 XSLT = docbook.xsl
 XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
 
 user-manual.html: user-manual.xml
        xsltproc $(XSLTOPTS) -o $@ $(XSLT) $<
 
-git.info: git.texi
-       $(MAKEINFO) --no-split $*.texi
+git.info: user-manual.texi
+       $(MAKEINFO) --no-split -o $@ user-manual.texi
 
-git.texi: user-manual.xml
+user-manual.texi: user-manual.xml
        $(RM) $@+ $@
        $(DOCBOOK2X_TEXI) user-manual.xml --to-stdout | $(PERL_PATH) fix-texi.perl >$@+
        mv $@+ $@
@@ -211,6 +220,6 @@ install-webdoc : html
        sh ./install-webdoc.sh $(WEBDOC_DEST)
 
 quick-install:
-       sh ./install-doc-quick.sh $(DOC_REF) $(mandir)
+       sh ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir)
 
 .PHONY: .FORCE-GIT-VERSION-FILE