]> SALOME platform Git repositories - modules/kernel.git/blob - doc/docutils/Makefile.am
Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/kernel.git] / doc / docutils / Makefile.am
1 #  -*- coding: iso-8859-1 -*-
2 # Copyright (C) 2007-2012  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)/salome_adm/unix/make_common_starter.am
25
26 pydocdir = $(docdir)/tui/KERNEL/docutils
27
28 RSTFILES = \
29         index.rst \
30         overview.rst \
31         docapi.rst \
32         salomepypkg.rst \
33         kernel.rst \
34         parametric.rst
35
36 EXTRA_DIST = archives $(RSTFILES)
37
38 SPHINXOPTS      =
39 SOURCEDIR       = $(srcdir)
40 SPHINXBUILD     = sphinx-build
41 PAPEROPT_a4     = -D latex_paper_size=a4
42 ALLSPHINXOPTS   = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR)
43
44 if WITH_PACO_PARALLEL
45 SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/bin/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages:$(PACOPATH)/lib/python$(PYTHON_VERSION):$(PACOPATH)/lib/python
46 else
47 SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/bin/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages
48 endif
49
50 SPHINX_LD_LIBRARY_PATH = $(OMNIORB_ROOT)/lib
51
52 .PHONY: latex
53
54 if SPHINX_IS_OK
55
56 html/index.html:$(RSTFILES)
57         mkdir -p html doctrees
58         PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH} \
59         LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} \
60         OMNIORB_CONFIG= \
61         $(SPHINXBUILD) -c $(top_builddir)/doc/docutils -W -b html $(ALLSPHINXOPTS) html
62         @echo
63         @echo "Build finished. The HTML pages are in html."
64
65 else
66
67 html/index.html:
68         @echo "Documentation for Python package not built. Sphinx was not present at configure time."
69
70 endif
71
72 latex:
73         mkdir -p latex doctrees
74         PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH} \
75         LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} \
76         $(SPHINXBUILD) -c $(top_builddir)/doc/docutils -W -b latex $(ALLSPHINXOPTS) latex
77         @echo
78         @echo "Build finished; the LaTeX files are in latex."
79         @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
80               "run these through (pdf)latex."
81
82 install-data-local: html/index.html
83         test -z $(pydocdir) || mkdir -p $(DESTDIR)$(pydocdir)
84         if test -d "html"; then b=; else b="$(srcdir)/"; fi; \
85         cp -rf $$b"html"/* $(pydocdir) ; \
86         if test -f $$b"latex"/kernelpy.pdf; then cp -f $$b"latex"/kernelpy.pdf $(pydocdir) ; fi;
87
88 uninstall-local:
89         -test -d $(pydocdir) && chmod -R +w $(pydocdir) && rm -rf $(pydocdir)/*
90
91 clean-local:
92         -rm -rf html latex doctrees
93         if test -d "html"; then rm -rf html ; fi
94
95 dist-hook:
96         -test -d html && cp -Rp html $(distdir)