Patch for the generation of the documentation

This commit is contained in:
gdd 2010-10-01 15:06:10 +00:00
parent b65a958881
commit 19ef864fd7
2 changed files with 14 additions and 12 deletions

View File

@ -71,6 +71,9 @@ dnl Export the AR macro so that it will be placed in the libtool file
dnl correctly. dnl correctly.
export AR export AR
AC_PROG_MKDIR_P
AC_SUBST(MKDIR_P)
echo echo
echo --------------------------------------------- echo ---------------------------------------------
echo testing make echo testing make

View File

@ -28,14 +28,11 @@ pydocdir = $(docdir)/tui/SMESH/docutils
if SPHINX_IS_OK if SPHINX_IS_OK
pydoc_DATA=html/index.html
html/index.html:$(RSTFILES) html/index.html:$(RSTFILES)
make htm make htm
endif endif
EXTRA_DIST+= html
SPHINXOPTS = SPHINXOPTS =
SOURCEDIR = $(srcdir) SOURCEDIR = $(srcdir)
SPHINXBUILD = sphinx-build SPHINXBUILD = sphinx-build
@ -47,25 +44,25 @@ SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$
SPHINX_LD_LIBRARY_PATH = $(OMNIORB_ROOT)/lib SPHINX_LD_LIBRARY_PATH = $(OMNIORB_ROOT)/lib
htm: htm:
mkdir -p html doctrees $(MKDIR_P) html doctrees
PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH}; \ PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH}; \
LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH}; \ LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH}; \
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) html $(SPHINXBUILD) -W -b html $(ALLSPHINXOPTS) html
@echo @echo
@echo "Build finished. The HTML pages are in html." @echo "Build finished. The HTML pages are in html."
latex: latex:
mkdir -p latex doctrees $(MKDIR_P) latex doctrees
PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH}; \ PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH}; \
LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH}; \ LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH}; \
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) latex $(SPHINXBUILD) -W -b latex $(ALLSPHINXOPTS) latex
@echo @echo
@echo "Build finished; the LaTeX files are in latex." @echo "Build finished; the LaTeX files are in latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
"run these through (pdf)latex." "run these through (pdf)latex."
html: html:
mkdir -p $@ $(MKDIR_P) $@
RSTFILES= \ RSTFILES= \
index.rst \ index.rst \
@ -77,16 +74,18 @@ EXTRA_DIST+= $(RSTFILES)
EXTRA_DIST+= \ EXTRA_DIST+= \
conf.py conf.py
install-data-local: install-data-local: html/index.html
$(INSTALL) -d $(pydocdir) test -z $(pydocdir) || $(MKDIR_P) $(DESTDIR)$(pydocdir)
if test -d "html"; then b=; else b="$(srcdir)/"; fi; \ if test -d "html"; then b=; else b="$(srcdir)/"; fi; \
cp -rf $$b"html"/* $(pydocdir) ; \ cp -rf $$b"html"/* $(pydocdir) ; \
if test -f $$b"latex"/smeshpy.pdf; then cp -f $$b"latex"/smeshpy.pdf $(pydocdir) ; fi; if test -f $$b"latex"/smeshpy.pdf; then cp -f $$b"latex"/smeshpy.pdf $(pydocdir) ; fi;
uninstall-local: uninstall-local:
chmod -R +w $(pydocdir) -test -d $(pydocdir) && chmod -R +w $(pydocdir) && rm -rf $(pydocdir)/*
rm -rf $(pydocdir)/*
clean-local: clean-local:
-rm -rf html latex doctrees -rm -rf html latex doctrees
if test -d "html"; then rm -rf html ; fi if test -d "html"; then rm -rf html ; fi
disthook :
-test -d html && cp -Rp html $(distdir)