Salome HOME
Updating documentation to integrate the python package documentation
[modules/smesh.git] / doc / docutils / Makefile.am
1 #  -*- coding: iso-8859-1 -*-
2 #  Copyright (C) 2007-2010  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 include $(top_srcdir)/adm_local/unix/make_common_starter.am
24
25 pydocdir = $(docdir)/tui/SMESH/docutils
26
27 .PHONY : latex
28
29 if SPHINX_IS_OK
30
31 pydoc_DATA=html/index.html
32 html/index.html:$(RSTFILES)
33         make htm
34
35 endif
36
37 EXTRA_DIST+= html
38
39 SPHINXOPTS      =
40 SOURCEDIR       = $(srcdir)
41 SPHINXBUILD     = sphinx-build
42 PAPEROPT_a4     = -D latex_paper_size=a4
43 ALLSPHINXOPTS   = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR)
44
45 SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages
46
47 SPHINX_LD_LIBRARY_PATH = $(OMNIORB_ROOT)/lib
48
49 htm:
50         mkdir -p html doctrees
51         PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH}; \
52         LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH}; \
53         $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) html
54         @echo
55         @echo "Build finished. The HTML pages are in html."
56
57 latex:
58         mkdir -p latex doctrees
59         PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH}; \
60         LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH}; \
61         $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) latex
62         @echo
63         @echo "Build finished; the LaTeX files are in latex."
64         @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
65               "run these through (pdf)latex."
66
67 html:
68         mkdir -p $@
69
70 RSTFILES= \
71         index.rst \
72         overview.rst \
73         docapi.rst
74
75 EXTRA_DIST+= $(RSTFILES)
76
77 EXTRA_DIST+= \
78         conf.py 
79
80 install-data-local:
81         $(INSTALL) -d $(pydocdir)
82         if test -d "html"; then b=; else b="$(srcdir)/"; fi; \
83         cp -rf $$b"html"/* $(pydocdir) ; \
84         if test -f $$b"latex"/smeshpy.pdf; then cp -f $$b"latex"/smeshpy.pdf $(pydocdir) ; fi;
85
86 uninstall-local:
87         chmod -R +w $(pydocdir)
88         rm -rf $(pydocdir)/*
89
90 clean-local:
91         -rm -rf html latex doctrees
92         if test -d "html"; then rm -rf html ; fi