[blivet:master 1/5] Automate generation of the .rst files which just set up the modules.

mulhern amulhern at redhat.com
Tue Jun 10 21:17:00 UTC 2014


Since these .rst files were added a couple of files have moved or been
added and these .rst files should have been updated, but weren't. Now
they'll be updated automatically, and they won't be in the repository.

This isn't fully automatic, but the step of removing these particular *.rst
files is in the correct direction.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 .gitignore                |   4 ++
 doc/Makefile              |  45 +++++++-----
 doc/blivet.devicelibs.rst |  82 ---------------------
 doc/blivet.formats.rst    |  91 -----------------------
 doc/blivet.rst            | 179 ----------------------------------------------
 doc/modules.rst           |   7 --
 6 files changed, 30 insertions(+), 378 deletions(-)
 delete mode 100644 doc/blivet.devicelibs.rst
 delete mode 100644 doc/blivet.formats.rst
 delete mode 100644 doc/blivet.rst
 delete mode 100644 doc/modules.rst

diff --git a/.gitignore b/.gitignore
index 897cde7..ba1aabf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,10 @@
 .*.swp
 blivet*.tar.gz
 blivet*.tar.bz2
+doc/blivet.devicelibs.rst
+doc/blivet.formats.rst
+doc/blivet.rst
+doc/modules.rst
 po/*.gmo
 po/*.po
 po/POTFILES
diff --git a/doc/Makefile b/doc/Makefile
index 68bfbdb..2088c55 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -4,8 +4,11 @@
 # You can set these variables from the command line.
 SPHINXOPTS    =
 SPHINXBUILD   = sphinx-build
+SPHINXAPIDOC  = sphinx-apidoc
 PAPER         =
 BUILDDIR      = _build
+SOURCEDIR     = ../blivet
+MODULE_NAMES  = blivet.rst blivet.devicelibs.rst blivet.formats.rst modules.rst
 
 # Internal variables.
 PAPEROPT_a4     = -D latex_paper_size=a4
@@ -14,7 +17,7 @@ ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
 # the i18n builder cannot share the environment and doctrees with the others
 I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
 
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext apidoc
 
 help:
 	@echo "Please use \`make <target>' where <target> is one of"
@@ -41,12 +44,16 @@ help:
 clean:
 	-rm -rf $(BUILDDIR)/*
 
-html:
+apidoc:
+	-rm $(addprefix ./, $(MODULE_NAMES))
+	$(SPHINXAPIDOC) -o . $(SOURCEDIR)
+
+html: apidoc
 	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
 	@echo
 	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
 
-dirhtml:
+dirhtml: apidoc
 	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
 	@echo
 	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
@@ -56,23 +63,23 @@ singlehtml:
 	@echo
 	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
 
-pickle:
+pickle: apidoc
 	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
 	@echo
 	@echo "Build finished; now you can process the pickle files."
 
-json:
+json: apidoc
 	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
 	@echo
 	@echo "Build finished; now you can process the JSON files."
 
-htmlhelp:
+htmlhelp: apidoc
 	$(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: apidoc
 	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
 	@echo
 	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
@@ -81,7 +88,7 @@ qthelp:
 	@echo "To view the help file:"
 	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Blivet.qhc"
 
-devhelp:
+devhelp: apidoc
 	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
 	@echo
 	@echo "Build finished."
@@ -90,64 +97,64 @@ devhelp:
 	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Blivet"
 	@echo "# devhelp"
 
-epub:
+epub: apidoc
 	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
 	@echo
 	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
 
-latex:
+latex: apidoc
 	$(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: apidoc
 	$(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."
 
-text:
+text: apidoc
 	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
 	@echo
 	@echo "Build finished. The text files are in $(BUILDDIR)/text."
 
-man:
+man: apidoc
 	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
 	@echo
 	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
 
-texinfo:
+texinfo: apidoc
 	$(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: apidoc
 	$(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: apidoc
 	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
 	@echo
 	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
 
-changes:
+changes: apidoc
 	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
 	@echo
 	@echo "The overview file is in $(BUILDDIR)/changes."
 
-linkcheck:
+linkcheck: apidoc
 	$(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: apidoc
 	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
 	@echo "Testing of doctests in the sources finished, look at the " \
 	      "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/doc/blivet.devicelibs.rst b/doc/blivet.devicelibs.rst
deleted file mode 100644
index 5a5696f..0000000
--- a/doc/blivet.devicelibs.rst
+++ /dev/null
@@ -1,82 +0,0 @@
-devicelibs Package
-==================
-
-:mod:`btrfs` Module
--------------------
-
-.. automodule:: blivet.devicelibs.btrfs
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`crypto` Module
---------------------
-
-.. automodule:: blivet.devicelibs.crypto
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`dm` Module
-----------------
-
-.. automodule:: blivet.devicelibs.dm
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`edd` Module
------------------
-
-.. automodule:: blivet.devicelibs.edd
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`loop` Module
-------------------
-
-.. automodule:: blivet.devicelibs.loop
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`lvm` Module
------------------
-
-.. automodule:: blivet.devicelibs.lvm
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`mdraid` Module
---------------------
-
-.. automodule:: blivet.devicelibs.mdraid
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`mpath` Module
--------------------
-
-.. automodule:: blivet.devicelibs.mpath
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`raid` Module
-------------------
-
-.. automodule:: blivet.devicelibs.raid
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`swap` Module
-------------------
-
-.. automodule:: blivet.devicelibs.swap
-    :members:
-    :undoc-members:
-    :show-inheritance:
diff --git a/doc/blivet.formats.rst b/doc/blivet.formats.rst
deleted file mode 100644
index c8b6c03..0000000
--- a/doc/blivet.formats.rst
+++ /dev/null
@@ -1,91 +0,0 @@
-formats Package
-===============
-
-:mod:`formats` Package
-----------------------
-
-.. automodule:: blivet.formats
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`biosboot` Module
-----------------------
-
-.. automodule:: blivet.formats.biosboot
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`disklabel` Module
------------------------
-
-.. automodule:: blivet.formats.disklabel
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`dmraid` Module
---------------------
-
-.. automodule:: blivet.formats.dmraid
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`fs` Module
-----------------
-
-.. automodule:: blivet.formats.fs
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`luks` Module
-------------------
-
-.. automodule:: blivet.formats.luks
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`lvmpv` Module
--------------------
-
-.. automodule:: blivet.formats.lvmpv
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`mdraid` Module
---------------------
-
-.. automodule:: blivet.formats.mdraid
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`multipath` Module
------------------------
-
-.. automodule:: blivet.formats.multipath
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`prepboot` Module
-----------------------
-
-.. automodule:: blivet.formats.prepboot
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`swap` Module
-------------------
-
-.. automodule:: blivet.formats.swap
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
diff --git a/doc/blivet.rst b/doc/blivet.rst
deleted file mode 100644
index e9886cc..0000000
--- a/doc/blivet.rst
+++ /dev/null
@@ -1,179 +0,0 @@
-blivet Package
-==============
-
-:mod:`blivet` Package
----------------------
-
-.. automodule:: blivet.__init__
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`arch` Module
-------------------
-
-.. automodule:: blivet.arch
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`dasd` Module
-------------------
-
-.. automodule:: blivet.dasd
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`deviceaction` Module
---------------------------
-
-.. automodule:: blivet.deviceaction
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`devicefactory` Module
----------------------------
-
-.. automodule:: blivet.devicefactory
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`devices` Module
----------------------
-
-.. automodule:: blivet.devices
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`devicetree` Module
-------------------------
-
-.. automodule:: blivet.devicetree
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`errors` Module
---------------------
-
-.. automodule:: blivet.errors
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`fcoe` Module
-------------------
-
-.. automodule:: blivet.fcoe
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`flags` Module
--------------------
-
-.. automodule:: blivet.flags
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`iscsi` Module
--------------------
-
-.. automodule:: blivet.iscsi
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`partitioning` Module
---------------------------
-
-.. automodule:: blivet.partitioning
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`partspec` Module
-----------------------
-
-.. automodule:: blivet.partspec
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`platform` Module
-----------------------
-
-.. automodule:: blivet.platform
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`pyudev` Module
---------------------
-
-.. automodule:: blivet.pyudev
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`size` Module
-------------------
-
-.. automodule:: blivet.size
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`storage_log` Module
--------------------------
-
-.. automodule:: blivet.storage_log
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`tsort` Module
--------------------
-
-.. automodule:: blivet.tsort
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`udev` Module
-------------------
-
-.. automodule:: blivet.udev
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`util` Module
-------------------
-
-.. automodule:: blivet.util
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`zfcp` Module
-------------------
-
-.. automodule:: blivet.zfcp
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-Subpackages
------------
-
-.. toctree::
-
-    blivet.devicelibs
-    blivet.formats
-
diff --git a/doc/modules.rst b/doc/modules.rst
deleted file mode 100644
index 3910865..0000000
--- a/doc/modules.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-Blivet
-======
-
-.. toctree::
-   :maxdepth: 4
-
-   blivet
-- 
1.9.3



More information about the anaconda-patches mailing list