Salome HOME
Merge from V6_main 01/04/2013
[modules/yacs.git] / doc / Makefile.am
1 # Copyright (C) 2006-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 include $(top_srcdir)/adm/unix/make_begin.am
21
22 .PHONY : latex
23
24 if SPHINX_IS_OK
25
26 yacsdoc_DATA=html/index.html
27 html/index.html:$(RSTFILES)
28         make htm
29
30 endif
31
32 dev_docs: build_dev_docs install_dev_docs
33
34 build_dev_docs:
35         doxygen
36
37 DOXFILES= ref/bases.dox ref/engine.dox ref/hmi.dox ref/python.dox ref/runtime.dox ref/yacs.dox ref/yacsloader.dox
38
39 EXTRA_DIST= _static exemples $(DOXFILES)
40
41 yacsdocdir=$(docdir)/gui/YACS
42 yacsdevdocdir=$(docdir)/tui/YACS
43
44 SPHINXOPTS      =
45 SOURCEDIR       = $(srcdir)
46 SPHINXBUILD     = sphinx-build
47 PAPEROPT_a4     = -D latex_paper_size=a4
48 ALLSPHINXOPTS   = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR)
49
50 htm:
51         mkdir -p html doctrees
52         $(SPHINXBUILD) -c $(top_builddir)/doc -b html $(ALLSPHINXOPTS) html
53         @echo
54         @echo "Build finished. The HTML pages are in html."
55
56 latex:
57         mkdir -p latex doctrees
58         $(SPHINXBUILD) -c $(top_builddir)/doc -b latex $(ALLSPHINXOPTS) latex
59         @echo "Running LaTeX files through pdflatex..."
60         make -C latex all-pdf
61         @echo "pdflatex finished; the PDF files are in latex."
62
63 pdf:
64         $(SPHINXBUILD) -c $(top_builddir)/doc -b pdf $(ALLSPHINXOPTS) pdf
65         @echo
66         @echo "Build finished. The pdf documents are in pdf."
67
68 html:
69                  mkdir -p $@
70
71 htmldev:
72                  mkdir -p $@
73
74 RSTFILES=          \
75 accesCorba.rst     \
76 accesLocal.rst     \
77 advancepy.rst      \
78 annexe_common.rst  \
79 batch.rst          \
80 calcium.rst        \
81 calciumyacs.rst    \
82 calciumapi.rst     \
83 calciummod.rst     \
84 calculator.rst     \
85 compInterne.rst    \
86 components.rst     \
87 console.rst        \
88 cppsalome.rst      \
89 dataflow.rst       \
90 etapes.rst         \
91 execpy.rst         \
92 execution.rst      \
93 execxml.rst        \
94 gui_components.rst \
95 gui.rst            \
96 hxx2salome.rst     \
97 index.rst          \
98 integration.rst    \
99 using.rst          \
100 main_menu.rst      \
101 modification.rst   \
102 operations.rst     \
103 principes.rst      \
104 progdsc.rst        \
105 pysalome.rst       \
106 python.rst         \
107 rappels.rst        \
108 references.rst     \
109 representation.rst \
110 salome.rst         \
111 schemapy.rst       \
112 schemaxml.rst      \
113 scratch.rst        \
114 toolbars.rst       \
115 optimizer.rst      \
116 yacsgen.rst
117
118
119 EXTRA_DIST+= $(RSTFILES) images
120
121 EXTRA_DIST+= \
122 ref/classDiagram.png \
123 ref/createNodeCollaboration.png \
124 opml.dtd \
125 opml.xslt \
126 ref/programingRules.sxw \
127 ref/schema.jpeg \
128 ref/sequenceCreateNode.png \
129 ref/undoCreateNodeCollaboration.png
130
131 install-data-local:
132         $(INSTALL) -d $(DESTDIR)$(yacsdocdir)
133         if test -d "html"; then b=; else b="$(srcdir)/"; fi; \
134         cp -rf $$b"html"/* $(DESTDIR)$(yacsdocdir) ; \
135         if test -f $$b"latex"/using.pdf; then cp -f $$b"latex"/using.pdf $(DESTDIR)$(yacsdocdir) ; fi; \
136         if test -f $$b"latex"/integration.pdf; then cp -f $$b"latex"/integration.pdf $(DESTDIR)$(yacsdocdir) ; fi;
137
138 install_dev_docs:
139         $(INSTALL) -d $(DESTDIR)$(yacsdevdocdir)
140         if test -d "htmldev"; then b=; else b="$(srcdir)/"; fi; \
141         find $$b"htmldev" -name "*.*" -exec cp -rf {} $(DESTDIR)$(yacsdevdocdir) ';' ; \
142         cp -rf $(top_srcdir)/src/yacsloader/samples $(DESTDIR)$(yacsdevdocdir); \
143         rm -rf $(DESTDIR)$(yacsdevdocdir)/samples/CVS;
144
145 uninstall-local:
146         chmod -R +w $(DESTDIR)$(yacsdocdir)
147         rm -rf $(DESTDIR)$(yacsdocdir)/*
148
149 clean-local:
150         -rm -rf html latex doctrees
151         if test -d "html"; then rm -rf html ; fi
152
153 dist-hook:
154         if test -d "html"; then b=; else b="$(srcdir)/"; fi; \
155         if test -d $$b"html"; then cp -rf $$b"html" $(distdir) ; fi; \
156         if test -d "htmldev"; then b=; else b="$(srcdir)/"; fi; \
157         if test -d $$b"htmldev"; then cp -rf $$b"htmldev" $(distdir) ; fi