Merge branch 'sp/smart-http-content-type-check'
[git.git] / Documentation / Makefile
index 5d22e0e0235a03e78681f0fd365f39a596d076b2..62dbd9ac7c93e8df4359b00b7c3a59b614bd8d57 100644 (file)
@@ -8,6 +8,7 @@ MAN1_TXT += $(filter-out \
                $(wildcard git-*.txt))
 MAN1_TXT += git.txt
 MAN1_TXT += gitk.txt
+MAN1_TXT += gitremote-helpers.txt
 MAN1_TXT += gitweb.txt
 
 MAN5_TXT += gitattributes.txt
@@ -33,7 +34,8 @@ MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)
 MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT))
 MAN_HTML=$(patsubst %.txt,%.html,$(MAN_TXT))
 
-DOC_HTML=$(MAN_HTML)
+OBSOLETE_HTML = git-remote-helpers.html
+DOC_HTML=$(MAN_HTML) $(OBSOLETE_HTML)
 
 ARTICLES = howto-index
 ARTICLES += everyday
@@ -242,7 +244,11 @@ install-html: html
 #
 # Determine "include::" file references in asciidoc files.
 #
-doc.dep : $(wildcard *.txt) build-docdep.perl
+docdep_prereqs = \
+       mergetools-list.made $(mergetools_txt) \
+       cmd-list.made $(cmds_txt)
+
+doc.dep : $(docdep_prereqs) $(wildcard *.txt) build-docdep.perl
        $(QUIET_GEN)$(RM) $@+ $@ && \
        $(PERL_PATH) ./build-docdep.perl >$@+ $(QUIET_STDERR) && \
        mv $@+ $@
@@ -266,13 +272,27 @@ cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT)
        $(PERL_PATH) ./cmd-list.perl ../command-list.txt $(QUIET_STDERR) && \
        date >$@
 
+mergetools_txt = mergetools-diff.txt mergetools-merge.txt
+
+$(mergetools_txt): mergetools-list.made
+
+mergetools-list.made: ../git-mergetool--lib.sh $(wildcard ../mergetools/*)
+       $(QUIET_GEN)$(RM) $@ && \
+       $(SHELL_PATH) -c 'MERGE_TOOLS_DIR=../mergetools && \
+               . ../git-mergetool--lib.sh && \
+               show_tool_names can_diff "* " || :' >mergetools-diff.txt && \
+       $(SHELL_PATH) -c 'MERGE_TOOLS_DIR=../mergetools && \
+               . ../git-mergetool--lib.sh && \
+               show_tool_names can_merge "* " || :' >mergetools-merge.txt && \
+       date >$@
+
 clean:
        $(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7
        $(RM) *.texi *.texi+ *.texi++ git.info gitman.info
        $(RM) *.pdf
        $(RM) howto-index.txt howto/*.html doc.dep
        $(RM) technical/*.html technical/api-index.txt
-       $(RM) $(cmds_txt) *.made
+       $(RM) $(cmds_txt) $(mergetools_txt) *.made
        $(RM) manpage-base-url.xsl
 
 $(MAN_HTML): %.html : %.txt asciidoc.conf
@@ -281,6 +301,12 @@ $(MAN_HTML): %.html : %.txt asciidoc.conf
                $(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $< && \
        mv $@+ $@
 
+$(OBSOLETE_HTML): %.html : %.txto asciidoc.conf
+       $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
+       $(ASCIIDOC) -b xhtml11 -f asciidoc.conf \
+               $(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $< && \
+       mv $@+ $@
+
 manpage-base-url.xsl: manpage-base-url.xsl.in
        sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@
 
@@ -366,8 +392,8 @@ $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
 install-webdoc : html
        '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(WEBDOC_DEST)
 
-# You must have a clone of git-htmldocs and git-manpages repositories
-# next to the git repository itself for the following to work.
+# You must have a clone of 'git-htmldocs' and 'git-manpages' repositories
+# next to the 'git' repository itself for the following to work.
 
 quick-install: quick-install-man