smesh/doc/docutils/Makefile.am

98 lines
3.9 KiB
Makefile
Raw Normal View History

2010-11-25 17:44:43 +05:00
# -*- coding: iso-8859-1 -*-
2012-04-13 15:31:26 +06:00
# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
2010-11-25 17:44:43 +05:00
#
2011-06-06 14:15:39 +06:00
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
2010-11-25 17:44:43 +05:00
#
2011-06-06 14:15:39 +06:00
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License.
2010-11-25 17:44:43 +05:00
#
2011-06-06 14:15:39 +06:00
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
2010-11-25 17:44:43 +05:00
#
2011-06-06 14:15:39 +06:00
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
2010-11-25 17:44:43 +05:00
#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
pydocdir = $(docdir)/tui/SMESH/docutils
2011-06-06 14:15:39 +06:00
RSTFILES = \
index.rst \
overview.rst \
docapi.rst
2010-11-25 17:44:43 +05:00
2011-06-06 14:15:39 +06:00
EXTRA_DIST += $(RSTFILES)
2010-11-25 17:44:43 +05:00
SPHINXOPTS =
SOURCEDIR = $(srcdir)
SPHINXBUILD = sphinx-build
PAPEROPT_a4 = -D latex_paper_size=a4
ALLSPHINXOPTS = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR)
if SMESH_ENABLE_GUI
SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(GUI_ROOT_DIR)/lib/salome:$(GUI_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(GUI_ROOT_DIR)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages
else !SMESH_ENABLE_GUI
2010-11-25 17:44:43 +05:00
SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages
endif
2010-11-25 17:44:43 +05:00
if SMESH_ENABLE_GUI
SPHINX_LD_LIBRARY_PATH = $(GUI_ROOT_DIR)/lib/salome:$(KERNEL_ROOT_DIR)/lib/salome:$(OMNIORB_ROOT)/lib
else !SMESH_ENABLE_GUI
2010-11-25 17:44:43 +05:00
SPHINX_LD_LIBRARY_PATH = $(KERNEL_ROOT_DIR)/lib/salome:$(OMNIORB_ROOT)/lib
endif
2010-11-25 17:44:43 +05:00
2011-06-06 14:15:39 +06:00
.PHONY: latex
if SPHINX_IS_OK
html/index.html:$(RSTFILES)
2010-11-25 17:44:43 +05:00
mkdir -p html doctrees
2010-12-23 14:01:56 +05:00
PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH} \
LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} \
2010-12-24 13:18:34 +05:00
$(SPHINXBUILD) -c $(top_builddir)/doc/docutils -W -b html $(ALLSPHINXOPTS) html
2010-11-25 17:44:43 +05:00
@echo
@echo "Build finished. The HTML pages are in html."
2011-06-06 14:15:39 +06:00
else
html/index.html:
@echo "Documentation for Python package not built. Sphinx was not present at configure time."
endif
2010-11-25 17:44:43 +05:00
latex:
mkdir -p latex doctrees
2010-12-23 14:01:56 +05:00
PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH} \
LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} \
2010-12-24 13:18:34 +05:00
$(SPHINXBUILD) -c $(top_builddir)/doc/docutils -W -b latex $(ALLSPHINXOPTS) latex
2010-11-25 17:44:43 +05:00
@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."
install-data-local: html/index.html
test -z $(pydocdir) || mkdir -p $(DESTDIR)$(pydocdir)
if test -d "html"; then b=; else b="$(srcdir)/"; fi; \
cp -rf $$b"html"/* $(pydocdir) ; \
if test -f $$b"latex"/smeshpy.pdf; then cp -f $$b"latex"/smeshpy.pdf $(pydocdir) ; fi;
uninstall-local:
-test -d $(pydocdir) && chmod -R +w $(pydocdir) && rm -rf $(pydocdir)/*
clean-local:
-rm -rf html latex doctrees
if test -d "html"; then rm -rf html ; fi
2011-06-06 14:15:39 +06:00
dist-hook:
2010-11-25 17:44:43 +05:00
-test -d html && cp -Rp html $(distdir)