]> SALOME platform Git repositories - modules/smesh.git/blob - doc/docutils/Makefile.am
Salome HOME
0022098: EDF 2036 SMESH: Create groups from none conected parts of a mesh
[modules/smesh.git] / doc / docutils / Makefile.am
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
3 #
4 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
5 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 #
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License.
11 #
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 # Lesser General Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this library; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20 #
21 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #
23
24 include $(top_srcdir)/adm_local/unix/make_common_starter.am
25
26 pydocdir = $(docdir)/tui/SMESH/docutils
27
28 RSTFILES = \
29         index.rst \
30         overview.rst \
31         docapi.rst
32
33 EXTRA_DIST += $(RSTFILES)
34
35 SPHINXOPTS      =
36 SOURCEDIR       = $(srcdir)
37 SPHINXBUILD     = sphinx-build
38 PAPEROPT_a4     = -D latex_paper_size=a4
39 ALLSPHINXOPTS   = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR)
40
41 if SMESH_ENABLE_GUI
42 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
43 else !SMESH_ENABLE_GUI
44 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
45 endif
46
47 if SMESH_ENABLE_GUI
48 SPHINX_LD_LIBRARY_PATH = $(GUI_ROOT_DIR)/lib/salome:$(KERNEL_ROOT_DIR)/lib/salome:$(OMNIORB_ROOT)/lib
49 else !SMESH_ENABLE_GUI
50 SPHINX_LD_LIBRARY_PATH = $(KERNEL_ROOT_DIR)/lib/salome:$(OMNIORB_ROOT)/lib
51 endif
52
53
54 .PHONY: latex
55
56 if SPHINX_IS_OK
57
58 html/index.html:$(RSTFILES)
59         mkdir -p html doctrees
60         PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH} \
61         LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} \
62         $(SPHINXBUILD) -c $(top_builddir)/doc/docutils -W -b html $(ALLSPHINXOPTS) html
63         @echo
64         @echo "Build finished. The HTML pages are in html."
65
66 else
67
68 html/index.html:
69         @echo "Documentation for Python package not built. Sphinx was not present at configure time."
70
71 endif
72
73 latex:
74         mkdir -p latex doctrees
75         PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH} \
76         LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} \
77         $(SPHINXBUILD) -c $(top_builddir)/doc/docutils -W -b latex $(ALLSPHINXOPTS) latex
78         @echo
79         @echo "Build finished; the LaTeX files are in latex."
80         @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
81               "run these through (pdf)latex."
82
83 install-data-local: html/index.html
84         test -z $(pydocdir) || mkdir -p $(DESTDIR)$(pydocdir)
85         if test -d "html"; then b=; else b="$(srcdir)/"; fi; \
86         cp -rf $$b"html"/* $(pydocdir) ; \
87         if test -f $$b"latex"/smeshpy.pdf; then cp -f $$b"latex"/smeshpy.pdf $(pydocdir) ; fi;
88
89 uninstall-local:
90         -test -d $(pydocdir) && chmod -R +w $(pydocdir) && rm -rf $(pydocdir)/*
91
92 clean-local:
93         -rm -rf html latex doctrees
94         if test -d "html"; then rm -rf html ; fi
95
96 dist-hook:
97         -test -d html && cp -Rp html $(distdir)