Implement make targets: man, html, docs.

This commit is contained in:
Darko Poljak 2016-07-04 12:21:01 +02:00
parent 76563756ee
commit 4dac520d98
3 changed files with 21 additions and 15 deletions

View file

@ -63,13 +63,13 @@ $(DOCSREF): $(DOCSREFSH)
$(DOCSREFSH) $(DOCSREFSH)
# Manpages #3: generic part # Manpages #3: generic part
sphinxman: $(MANTYPES) $(DOCSREF) $(PYTHON_VERSION) man: $(MANTYPES) $(DOCSREF) $(PYTHON_VERSION)
$(SPHINXM) $(SPHINXM)
sphinxhtml: $(MANTYPES) $(DOCSREF) $(PYTHON_VERSION) html: $(MANTYPES) $(DOCSREF) $(PYTHON_VERSION)
$(SPHINXH) $(SPHINXH)
docs: sphinxman sphinxhtml docs: man html
# Manpages #5: release part # Manpages #5: release part
MANWEBDIR=$(WEBBASE)/man/$(CHANGELOG_VERSION) MANWEBDIR=$(WEBBASE)/man/$(CHANGELOG_VERSION)
@ -102,12 +102,9 @@ $(DOTMAN7DSTDIR)/cdist-type%.rst: $(DOTTYPEDIR)/%/man.rst
ln -sf "$^" $@ ln -sf "$^" $@
# Manpages #3: generic part # Manpages #3: generic part
dotsphinxman: $(DOTMANTYPES) dotman: $(DOTMANTYPES)
$(SPHINXM) $(SPHINXM)
dotman: dotsphinxman
################################################################################ ################################################################################
# Speeches # Speeches
# #

View file

@ -12,7 +12,7 @@ This is the machine you use to configure the target hosts.
* /bin/sh: A posix like shell (for instance bash, dash, zsh) * /bin/sh: A posix like shell (for instance bash, dash, zsh)
* Python >= 3.2 * Python >= 3.2
* SSH client * SSH client
* sphinx (for building html docs and/or the manpages) * sphinx (for building html docs and/or the man pages)
Target Hosts Target Hosts
~~~~~~~~~~~~ ~~~~~~~~~~~~
@ -88,18 +88,31 @@ If you want to use man pages, run:
export MANPATH=$MANPATH:$(pwd -P)/docs/dist/man export MANPATH=$MANPATH:$(pwd -P)/docs/dist/man
Or you can move manpages from docs/dist/man directory to some Or you can move man pages from docs/dist/man directory to some
other directory and add it to MANPATH. other directory and add it to MANPATH.
Full HTML documentation can be accessed at docs/dist/html/index.html. Full HTML documentation can be accessed at docs/dist/html/index.html.
You can also build manpages for types in your ~/.cdist directory: You can also build only man pages or only html documentation, for
only man pages run:
.. code-block:: sh
make man
for only html documentation run:
.. code-block:: sh
make html
You can also build man pages for types in your ~/.cdist directory:
.. code-block:: sh .. code-block:: sh
make dotman make dotman
Built manpages are now in docs/dist/man directory. If you have Built man pages are now in docs/dist/man directory. If you have
some other custom .cdist directory, e.g. /opt/cdist then use: some other custom .cdist directory, e.g. /opt/cdist then use:
.. code-block:: sh .. code-block:: sh

View file

@ -56,10 +56,6 @@ CONFIG
------ ------
Configure one or more hosts Configure one or more hosts
.. option:: -h, --help
Show the help screen
.. option:: -c CONF_DIR, --conf-dir CONF_DIR .. option:: -c CONF_DIR, --conf-dir CONF_DIR
Add a configuration directory. Can be specified multiple times. Add a configuration directory. Can be specified multiple times.