Update gitignore rules
[ganeti-local] / Makefile.am
index eae2cc5..6f0e705 100644 (file)
@@ -45,7 +45,8 @@ DIRS = \
 
 MAINTAINERCLEANFILES = \
        $(docpng) \
-       $(maninput)
+       $(maninput) \
+       doc/news.rst
 
 maintainer-clean-local:
        rm -rf doc/api doc/html
@@ -57,6 +58,7 @@ CLEANFILES = \
        doc/examples/bash_completion \
        doc/examples/ganeti.initd \
        doc/examples/ganeti.cron \
+       doc/examples/gnt-config-backup \
        doc/examples/hooks/ipsec \
        lib/*.py[co] \
        lib/build/*.py[co] \
@@ -147,8 +149,10 @@ docrst = \
        doc/index.rst \
        doc/install.rst \
        doc/locking.rst \
+       doc/news.rst \
        doc/rapi.rst \
-       doc/security.rst
+       doc/security.rst \
+       doc/walkthrough.rst
 
 doc/html/.stamp: $(docrst) $(docpng) doc/conf.py configure.ac
        @test -n "$(SPHINX)" || \
@@ -163,6 +167,14 @@ doc/html/.stamp: $(docrst) $(docpng) doc/conf.py configure.ac
 
 doc/html: doc/html/.stamp
 
+doc/news.rst: NEWS
+       set -e; \
+       { echo '.. This file is automatically updated at build time from $<.'; \
+         echo '.. Do not edit.'; \
+         echo; \
+         cat $<; \
+       } > $@
+
 docdot = \
        doc/arch-2.0.dot \
        doc/design-2.1-lock-acquire.dot \
@@ -178,6 +190,7 @@ noinst_DATA = \
        doc/examples/bash_completion \
        doc/examples/ganeti.cron \
        doc/examples/ganeti.initd \
+       doc/examples/gnt-config-backup \
        doc/examples/hooks/ipsec \
        $(manhtml)
 
@@ -223,6 +236,7 @@ EXTRA_DIST = \
        doc/html \
        doc/examples/ganeti.initd.in \
        doc/examples/ganeti.cron.in \
+       doc/examples/gnt-config-backup.in \
        doc/examples/dumb-allocator \
        doc/examples/hooks/ethers \
        doc/examples/hooks/ipsec.in \
@@ -266,7 +280,9 @@ man_MANS = \
 
 mansgml = $(patsubst %.7,%.sgml,$(patsubst %.8,%.sgml,$(man_MANS)))
 manhtml = $(patsubst %.sgml,%.html,$(mansgml))
-maninput = $(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS))) $(patsubst %.html,%.html.in,$(manhtml))
+maninput = \
+       $(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS))) \
+       $(patsubst %.html,%.html.in,$(manhtml))
 
 TEST_FILES = \
        test/data/bdev-both.txt \
@@ -348,11 +364,13 @@ doc/%.png: doc/%.dot
        $(DOT) -Tpng -o $@ $<
 
 man/%.7.in man/%.8.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
-       @test -n "$(DOCBOOK2MAN)" || { echo 'docbook2man' not found during configure; exit 1; }
+       @test -n "$(DOCBOOK2MAN)" || \
+         { echo 'docbook2man' not found during configure; exit 1; }
        $(DOCBOOK_WRAPPER) "$(DOCBOOK2MAN)" $< $(notdir $(@:.in=)) $@
 
 man/%.html.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
-       @test -n "$(DOCBOOK2HTML)" || { echo 'docbook2html' not found during configure; exit 1; }
+       @test -n "$(DOCBOOK2HTML)" || \
+         { echo 'docbook2html' not found during configure; exit 1; }
        $(DOCBOOK_WRAPPER) "$(DOCBOOK2HTML) --nochunks" $< $(notdir $(@:.in=)) $@
 
 man/%.7: man/%.7.in $(REPLACE_VARS_SED)
@@ -436,8 +454,16 @@ check-local:
 
 # a dist hook rule for catching revision control directories
 distcheck-hook:
-       if find $(top_distdir) | grep -F -e '.svn' -e '.git'; then \
-               echo "Found revision control files in final archive" 1>&2 ; \
+       if find $(top_distdir) -name .svn -or -name .git | grep .; then \
+               echo "Found revision control files in final archive." 1>&2; \
+               exit 1; \
+       fi
+       if find $(top_distdir) -name '*.py[co]' | grep .; then \
+               echo "Found Python byte code in final archive." 1>&2; \
+               exit 1; \
+       fi
+       if find $(top_distdir) -name '*~' | grep .; then \
+               echo "Found backup files in final archive." 1>&2; \
                exit 1; \
        fi