Code

Documentation: add git user's manual
[git.git] / Documentation / Makefile
index 0d9ffb4ad9475de730ab2ee240d8b528b44017e8..c2ee5b4824aa8708ddbddf0afd4415442a086557 100644 (file)
@@ -17,7 +17,7 @@ ARTICLES += hooks
 ARTICLES += everyday
 ARTICLES += git-tools
 # with their own formatting rules.
-SP_ARTICLES = glossary howto/revert-branch-rebase
+SP_ARTICLES = glossary howto/revert-branch-rebase user-manual
 
 DOC_HTML += $(patsubst %,%.html,$(ARTICLES) $(SP_ARTICLES))
 
@@ -32,6 +32,9 @@ man7dir=$(mandir)/man7
 # DESTDIR=
 
 INSTALL?=install
+DOC_REF = origin/man
+
+-include ../config.mak.autogen
 
 #
 # Please note that there is a minor bug in asciidoc.
@@ -54,8 +57,8 @@ man7: $(DOC_MAN7)
 
 install: man
        $(INSTALL) -d -m755 $(DESTDIR)$(man1dir) $(DESTDIR)$(man7dir)
-       $(INSTALL) $(DOC_MAN1) $(DESTDIR)$(man1dir)
-       $(INSTALL) $(DOC_MAN7) $(DESTDIR)$(man7dir)
+       $(INSTALL) -m644 $(DOC_MAN1) $(DESTDIR)$(man1dir)
+       $(INSTALL) -m644 $(DOC_MAN7) $(DESTDIR)$(man7dir)
 
 
 #
@@ -86,6 +89,12 @@ clean:
 %.xml : %.txt
        asciidoc -b docbook -d manpage -f asciidoc.conf $<
 
+user-manual.xml: user-manual.txt user-manual.conf
+       asciidoc -b docbook -d book $<
+
+user-manual.html: user-manual.xml
+       xmlto -m /etc/asciidoc/docbook-xsl/xhtml.xsl html-nochunks $<
+
 git.html: git.txt README
 
 glossary.html : glossary.txt sort_glossary.pl
@@ -105,8 +114,11 @@ WEBDOC_DEST = /pub/software/scm/git/docs
 
 $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
        rm -f $@+ $@
-       sed -e '1,/^$$/d' $? | asciidoc -b xhtml11 - >$@+
+       sed -e '1,/^$$/d' $< | asciidoc -b xhtml11 - >$@+
        mv $@+ $@
 
 install-webdoc : html
        sh ./install-webdoc.sh $(WEBDOC_DEST)
+
+quick-install:
+       sh ./install-doc-quick.sh $(DOC_REF) $(mandir)