]> SALOME platform Git repositories - modules/med.git/blob - src/MEDOP/doc/sphinx/Makefile.am
Salome HOME
c8f1fc021af5576e360a557d49b1be9be5e6cad0
[modules/med.git] / src / MEDOP / doc / sphinx / Makefile.am
1 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 # author: Guillaume Boulant (EDF/R&D, 2012)
21
22 include $(top_srcdir)/adm_local/unix/make_common_starter.am
23
24 tuidocdir = $(docdir)/tui/MED
25 devdocdir = $(docdir)/dev/MED
26 medopdocdir=$(devdocdir)
27
28 .PHONY : latex
29
30 if SPHINX_IS_OK
31
32 medopdoc_DATA=html/index.html
33 html/index.html:$(RSTFILES)
34         make htm
35
36 endif
37
38 EXTRA_DIST += html
39
40 SPHINXOPTS      =
41 SOURCEDIR       = $(srcdir)
42 SPHINXBUILD     = sphinx-build
43 PAPEROPT_a4     = -D latex_paper_size=a4
44 ALLSPHINXOPTS   = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR)
45 SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages
46
47 CONF_PATH = $(top_builddir)/src/MEDOP/doc/sphinx
48
49 SPHINX_LD_LIBRARY_PATH = $(OMNIORB_ROOT)/lib
50
51 htm:
52         mkdir -p html doctrees
53         PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH}; \
54         LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH}; \
55         $(SPHINXBUILD) -c $(CONF_PATH) -b html $(ALLSPHINXOPTS) html
56         @echo
57         @echo "Build finished. The HTML pages are in html."
58
59 latex:
60         mkdir -p latex doctrees
61         PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH}; \
62         LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH}; \
63         $(SPHINXBUILD) -c $(CONF_PATH) -b latex $(ALLSPHINXOPTS) latex
64         @echo
65         @echo "Build finished; the LaTeX files are in latex."
66         @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
67               "run these through (pdf)latex."
68
69 html:
70         mkdir -p $@
71
72 RSTFILES= \
73         index.rst               \
74         medop-specifications.rst \
75         medop-develguide.rst     \
76         medop-userguide.rst
77
78 # Files on the development of the prototype (version 2010)
79 RSTFILES+=\
80         medop-prototype-overview.rst     \
81         medop-prototype-develguide.rst   \
82         medop-prototype-medmem.rst
83
84 # Files containing definitions and references
85 RSTFILES+=\
86         medop-definitions.rst \
87         medop-references.rst  \
88         medop-workingnotes-2010.rst \
89         medop-workingnotes-2011.rst \
90         medop-workingnotes-2012.rst
91
92 EXTRA_DIST+= $(RSTFILES)
93
94 EXTRA_DIST+= \
95         conf.py \
96         _static \
97         images
98
99 install-data-local:
100         $(INSTALL) -d $(DESTDIR)$(medopdocdir)
101         if test -d "html"; then b=; else b="$(srcdir)/"; fi; \
102         cp -rf $$b"html"/* $(DESTDIR)$(medopdocdir) ; \
103         if test -f $$b"latex"/medopdoc.pdf; then cp -f $$b"latex"/medopdoc.pdf $(DESTDIR)$(medopdocdir) ; fi;
104
105 uninstall-local:
106         chmod -R +w $(DESTDIR)$(medopdocdir)
107         rm -rf $(DESTDIR)$(medopdocdir)/*
108
109 clean-local:
110         -chmod -R +w html latex doctrees
111         rm -rf html latex doctrees
112         if test -d "html"; then rm -rf html ; fi
113
114 pdf: latex
115         cd latex; make all-pdf
116         cp latex/*.pdf html/_static/documents/.
117
118 WIKIRELATIVEPATH="pub/userdata/gboulant/data/salome/smodules/xmed/doc"
119 WIKIREMOTEPATH="nepal@nepal:/nepal/$(WIKIRELATIVEPATH)"
120 deploy: htm pdf
121         rsync -avz html/ $(WIKIREMOTEPATH)
122         @echo "The documentation can be read at URL : http://nepal.der.edf.fr/$(WIKIRELATIVEPATH)/index.html"