]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Add 'prep' step that copies docs into docs/source/
authorZack Cerza <zack.cerza@inktank.com>
Thu, 23 Oct 2014 19:39:38 +0000 (13:39 -0600)
committerZack Cerza <zack.cerza@inktank.com>
Fri, 24 Oct 2014 22:02:08 +0000 (16:02 -0600)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
docs/Makefile

index 7899567f15e5566093280098c59c7be79b6d15eb..5362b713d69cff4633aa04fe7d8eb055decc0615 100644 (file)
@@ -8,6 +8,8 @@ PAPER         =
 SOURCEDIR     = source
 BUILDDIR      = build
 
+SOURCEFILES   = README.rst ChangeLog.rst
+
 # User-friendly check for sphinx-build
 ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
 $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
@@ -20,7 +22,7 @@ ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(S
 # the i18n builder cannot share the environment and doctrees with the others
 I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCEDIR)
 
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+.PHONY: help prep clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
 
 help:
        @echo "Please use \`make <target>' where <target> is one of"
@@ -47,41 +49,50 @@ help:
        @echo "  linkcheck  to check all external links for integrity"
        @echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
 
+prep:
+       for SOURCEFILE in $(SOURCEFILES) ; do \
+           cp -f ../$$SOURCEFILE $(SOURCEDIR)/ ; \
+       done
+
 clean:
+       @echo $(SOURCEFILES)
+       for SOURCEFILE in $(SOURCEFILES) ; do \
+           rm -f $(SOURCEDIR)/$$SOURCEFILE ; \
+       done
        rm -rf $(BUILDDIR)/*
 
-html:
+html:  prep
        $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
        @echo
        @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
 
-dirhtml:
+dirhtml:       prep
        $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
        @echo
        @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
 
-singlehtml:
+singlehtml:    prep
        $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
        @echo
        @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
 
-pickle:
+pickle:        prep
        $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
        @echo
        @echo "Build finished; now you can process the pickle files."
 
-json:
+json:  prep
        $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
        @echo
        @echo "Build finished; now you can process the JSON files."
 
-htmlhelp:
+htmlhelp:      prep
        $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
        @echo
        @echo "Build finished; now you can run HTML Help Workshop with the" \
              ".hhp project file in $(BUILDDIR)/htmlhelp."
 
-qthelp:
+qthelp:        prep
        $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
        @echo
        @echo "Build finished; now you can run "qcollectiongenerator" with the" \
@@ -90,7 +101,7 @@ qthelp:
        @echo "To view the help file:"
        @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/teuthology.qhc"
 
-devhelp:
+devhelp:       prep
        $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
        @echo
        @echo "Build finished."
@@ -99,80 +110,80 @@ devhelp:
        @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/teuthology"
        @echo "# devhelp"
 
-epub:
+epub:  prep
        $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
        @echo
        @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
 
-latex:
+latex: prep
        $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
        @echo
        @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
        @echo "Run \`make' in that directory to run these through (pdf)latex" \
              "(use \`make latexpdf' here to do that automatically)."
 
-latexpdf:
+latexpdf:      prep
        $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
        @echo "Running LaTeX files through pdflatex..."
        $(MAKE) -C $(BUILDDIR)/latex all-pdf
        @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
 
-latexpdfja:
+latexpdfja:    prep
        $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
        @echo "Running LaTeX files through platex and dvipdfmx..."
        $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
        @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
 
-text:
+text:  prep
        $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
        @echo
        @echo "Build finished. The text files are in $(BUILDDIR)/text."
 
-man:
+man:   prep
        $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
        @echo
        @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
 
-texinfo:
+texinfo:       prep
        $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
        @echo
        @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
        @echo "Run \`make' in that directory to run these through makeinfo" \
              "(use \`make info' here to do that automatically)."
 
-info:
+info:  prep
        $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
        @echo "Running Texinfo files through makeinfo..."
        make -C $(BUILDDIR)/texinfo info
        @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
 
-gettext:
+gettext:       prep
        $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
        @echo
        @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
 
-changes:
+changes:       prep
        $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
        @echo
        @echo "The overview file is in $(BUILDDIR)/changes."
 
-linkcheck:
+linkcheck:     prep
        $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
        @echo
        @echo "Link check complete; look for any errors in the above output " \
              "or in $(BUILDDIR)/linkcheck/output.txt."
 
-doctest:
+doctest:       prep
        $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
        @echo "Testing of doctests in the sources finished, look at the " \
              "results in $(BUILDDIR)/doctest/output.txt."
 
-xml:
+xml:   prep
        $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
        @echo
        @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
 
-pseudoxml:
+pseudoxml:     prep
        $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
        @echo
        @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."