Stop ignoring Documentation/README
[gitweb.git] / Documentation / Makefile
index 0d9ffb4ad9475de730ab2ee240d8b528b44017e8..5314068d32f1e9205ec7b76c9356674a414d773c 100644 (file)
@@ -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)
 
 
 #
@@ -68,14 +71,24 @@ doc.dep : $(wildcard *.txt) build-docdep.perl
 
 -include doc.dep
 
-git.7: README
+cmds_txt = cmds-ancillaryinterrogators.txt \
+       cmds-ancillarymanipulators.txt \
+       cmds-mainporcelain.txt \
+       cmds-plumbinginterrogators.txt \
+       cmds-plumbingmanipulators.txt \
+       cmds-synchingrepositories.txt \
+       cmds-synchelpers.txt \
+       cmds-purehelpers.txt \
+       cmds-foreignscminterface.txt
 
-README: ../README
-       cp $< $@
+$(cmds_txt): cmd-list.perl $(MAN1_TXT)
+       perl ./cmd-list.perl
 
+git.7 git.html: git.txt core-intro.txt
 
 clean:
-       rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep README
+       rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html doc.dep
+       rm -f $(cmds_txt)
 
 %.html : %.txt
        asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
@@ -86,8 +99,6 @@ clean:
 %.xml : %.txt
        asciidoc -b docbook -d manpage -f asciidoc.conf $<
 
-git.html: git.txt README
-
 glossary.html : glossary.txt sort_glossary.pl
        cat $< | \
        perl sort_glossary.pl | \
@@ -105,8 +116,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)