From 7e9f3bb26996b68e9f52be6e950d2f2e7e455304 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 27 Jul 2011 10:22:21 +0000 Subject: [PATCH] Fix-up docutils conf file (version) --- configure.ac | 1 + doc/docutils/Makefile.am | 57 +++++++++++++--------------- doc/docutils/{conf.py => conf.py.in} | 4 +- 3 files changed, 29 insertions(+), 33 deletions(-) rename doc/docutils/{conf.py => conf.py.in} (99%) diff --git a/configure.ac b/configure.ac index cea015f6e..e4932a83c 100644 --- a/configure.ac +++ b/configure.ac @@ -549,6 +549,7 @@ AC_OUTPUT([ \ doc/salome/gui/doxyfile \ doc/salome/gui/static/header.html \ doc/docutils/Makefile \ + doc/docutils/conf.py \ idl/Makefile \ idl/Calcium_Ports.idl \ resources/Makefile \ diff --git a/doc/docutils/Makefile.am b/doc/docutils/Makefile.am index 62d65a830..259d61536 100644 --- a/doc/docutils/Makefile.am +++ b/doc/docutils/Makefile.am @@ -24,16 +24,13 @@ include $(top_srcdir)/salome_adm/unix/make_common_starter.am pydocdir = $(docdir)/tui/KERNEL/docutils -.PHONY : latex - -if SPHINX_IS_OK - -html/index.html:$(RSTFILES) - make htm - -endif +RSTFILES = \ + index.rst \ + overview.rst \ + docapi.rst \ + salomepypkg.rst -EXTRA_DIST = archives +EXTRA_DIST = archives $(RSTFILES) SPHINXOPTS = SOURCEDIR = $(srcdir) @@ -45,38 +42,36 @@ SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$ SPHINX_LD_LIBRARY_PATH = $(OMNIORB_ROOT)/lib -htm: + +.PHONY: latex + +if SPHINX_IS_OK + +html/index.html:$(RSTFILES) mkdir -p html doctrees - PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH}; \ - LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH}; \ - $(SPHINXBUILD) -W -b html $(ALLSPHINXOPTS) html + PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH} \ + LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} \ + $(SPHINXBUILD) -c $(top_builddir)/doc/docutils -W -b html $(ALLSPHINXOPTS) html @echo @echo "Build finished. The HTML pages are in html." +else + +html/index.html: + @echo "Documentation for Python package not built. Sphinx was not present at configure time." + +endif + latex: mkdir -p latex doctrees - PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH}; \ - LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH}; \ - $(SPHINXBUILD) -W -b latex $(ALLSPHINXOPTS) latex + PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH} \ + LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} \ + $(SPHINXBUILD) -c $(top_builddir)/doc/docutils -W -b latex $(ALLSPHINXOPTS) latex @echo @echo "Build finished; the LaTeX files are in latex." @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ "run these through (pdf)latex." -html: - mkdir -p $@ - -RSTFILES= \ - index.rst \ - overview.rst \ - docapi.rst \ - salomepypkg.rst - -EXTRA_DIST+= $(RSTFILES) - -EXTRA_DIST+= \ - conf.py - install-data-local: html/index.html test -z $(pydocdir) || mkdir -p $(DESTDIR)$(pydocdir) if test -d "html"; then b=; else b="$(srcdir)/"; fi; \ @@ -90,5 +85,5 @@ clean-local: -rm -rf html latex doctrees if test -d "html"; then rm -rf html ; fi -disthook : +dist-hook: -test -d html && cp -Rp html $(distdir) diff --git a/doc/docutils/conf.py b/doc/docutils/conf.py.in similarity index 99% rename from doc/docutils/conf.py rename to doc/docutils/conf.py.in index 2a98b01fb..cea4f5734 100644 --- a/doc/docutils/conf.py +++ b/doc/docutils/conf.py.in @@ -54,9 +54,9 @@ copyright = '2010 EDF R&D' # built documents. # # The short X.Y version. -version = '5.1.5' +version = '@VERSION@' # The full version, including alpha/beta/rc tags. -release = '5.1.5' +release = '@VERSION@' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -- 2.39.2