]> www.ginac.de Git - ginac.git/blob - doc/Makefile
Initial revision
[ginac.git] / doc / Makefile
1 # Generated automatically from Makefile.in by configure.
2 # This is the prototype Makefile for all of GiNaC's documentation.  It tries to
3 # be tolerant---if some tools were not found it skips the built of that part
4 # of documentation and tries to continue.
5
6 # Substitution variables from configure skript:
7 # Here come the usual install directories in GNU-configure fashion:
8 prefix = /usr/local
9 docdir = ${prefix}/share/doc/GiNaC
10 srcdir = .
11 # Dimitri van Heesch's Doxygen is needed for developer's resource:
12 DOXYGEN = /usr/local/bin_i386/doxygen
13 # LaTeX and friends are needed for processing developer's resource for print:
14 LATEX = /usr/local/bin/latex
15 MAKEINDEX = /usr/local/bin/makeindex
16 DVIPS = /usr/local/bin/dvips
17 FIG2DEV = /usr/bin/X11/fig2dev
18 # Jade and friends needed for generating the tutorial:
19 JADE = /usr/bin/jade
20 JADETEX = /usr/local/bin/jadetex
21 # Arguments for Jade and friends (does anybody know how to find them out?)
22 # JADEARGS_TEX = -t tex -o tutorial.tex -d /usr/lib/dsssl/stylesheets/docbook/print/docbook.dsl
23 JADEARGS_TEX = -t tex -o tutorial.tex -d /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/print/docbook.dsl
24 # JADEARGS_HTML = -t sgml -d /usr/lib/dsssl/stylesheets/docbook/html/docbook.dsl
25 JADEARGS_HTML = -t sgml -d /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl
26 # Autoconf macro AC_PROC_INSTALL sets these:
27 INSTALL = /usr/bin/install -c
28 INSTALL_DATA = ${INSTALL} -m 644
29 # All LaTeX builds will take place in a separate subdirectory:
30 VPATH = .:./latex:./tutorial
31
32 # default target:
33 all: reference tutorial
34
35 # REFERENCE:
36 # This section produces HTML'ed and TeX'ed developer's reference from the
37 # sources with a JavaDoc-like tool (in this case doxygen):
38 reference_html:
39         @ if [ ! -d ${srcdir}/reference ]; then mkdir ${srcdir}/reference; fi
40         @ if [ "${DOXYGEN}" ]; then \
41                 echo "Running ${DOXYGEN} ./DoxyfileHTML..."; \
42                 cd ..; ${DOXYGEN} ./doc/DoxyfileHTML; \
43         else \
44                 echo "warning: target reference_html disabled by configuration"; \
45         fi
46
47 reference.tex:
48         @ if [ ! -d ${srcdir}/latex ]; then mkdir ${srcdir}/latex; fi
49         @ if [ "${DOXYGEN}" ]; then \
50                 echo "Running ${DOXYGEN} ./DoxyfileTEX..."; \
51                 cd ..; ${DOXYGEN} ./doc/DoxyfileTEX; \
52         else \
53                 echo "warning: target reference.tex disabled by configuration"; \
54         fi
55         - mv ${srcdir}/latex/refman.tex ${srcdir}/latex/reference.tex 
56
57 reference.dvi: reference.tex
58         @ if [ "${LATEX}" -a "${MAKEINDEX}" ]; then \
59                 cd latex; \
60                 ${LATEX} reference.tex && \
61                 ${MAKEINDEX} reference.idx && \
62                 ${LATEX} reference.tex; \
63         else \
64                 echo "warning: target reference.dvi disabled by configuration"; \
65         fi
66
67 reference.ps: reference.dvi
68         @ if [ "${DVIPS}" ]; then \
69                 echo "Running ${DVIPS} -o reference.ps reference.dvi..."; \
70                 cd latex; ${DVIPS} -o reference.ps reference.dvi; \
71         else \
72                 echo "warning: target reference.ps disabled by configuration"; \
73         fi
74
75 reference: reference_html reference.ps
76
77 # TUTORIAL:
78 # This section produces HTML'ed and TeX'ed versions of the tutorial using a
79 # SGML to TeX converter (in this case jade).  As a dirty hack, we are doing
80 # some regexpese to tutorial.sgml prior to parsing it, in order to allow for
81 # different graphics output.  This seems to be an ugly limitation of docbook...
82
83 EPS = classhierarchy.eps rep_naive.eps rep_pair.eps
84 PNG = classhierarchy.png rep_naive.png rep_pair.png
85
86 tutorial/index.html: tutorial.sgml.in ${PNG}
87         @ if [ ! -d ${srcdir}/latex ]; then mkdir ${srcdir}/latex; fi
88         @ if [ "${JADE}" ]; then \
89                 sed -e 's/graext/png/g' -e 's/GRAEXT/GIF/g' tutorial.sgml.in > tutorial.sgml; \
90                 echo "Running ${JADE} ${JADEARGS_HTML} tutorial.sgml..."; \
91                 cd tutorial/; ${JADE} ${JADEARGS_HTML} ../tutorial.sgml; \
92                 if [ -f book1.html ]; then cp book1.html index.html; fi; \
93         else \
94                 echo "warning: target tutorial_html disabled by configuration"; \
95         fi
96
97 tutorial.tex: tutorial.sgml.in ${EPS}
98         @ if [ ! -d ${srcdir}/latex ]; then mkdir ${srcdir}/latex; fi
99         @ if [ "${JADE}" -a "${LATEX}" ]; then \
100                 sed -e 's/graext/eps/g' -e 's/GRAEXT/EPS/g' tutorial.sgml.in > tutorial.sgml; \
101                 echo "Running ${JADE} ${JADEARGS_TEX} tutorial.sgml..."; \
102                 cd latex; ${JADE} ${JADEARGS_TEX} ../tutorial.sgml ; \
103         else \
104                 echo "warning: target tutorial.tex disabled by configuration"; \
105         fi
106
107 tutorial.dvi: tutorial.tex
108         @ if [ "${JADETEX}" ]; then \
109                 echo "Running ${JADETEX} tutorial.tex..."; \
110                 cd latex; ${JADETEX} tutorial.tex && ${JADETEX} tutorial.tex && ${JADETEX} tutorial.tex; \
111         else \
112                 echo "warning: target tutorial.dvi disabled by configuration"; \
113         fi
114
115 tutorial.ps: tutorial.dvi
116         @ if [ "${DVIPS}" ]; then \
117                 echo "Running ${DVIPS} tutorial.dvi -o tutorial.ps..."; \
118                 cd latex; ${DVIPS} tutorial.dvi -o tutorial.ps; \
119         else \
120                 echo "warning: target tutorial.ps disabled by configuration"; \
121         fi
122
123 tutorial:       tutorial/index.html tutorial.ps
124
125 # Target for installing all generated documentation files on the system.
126 # (Foolproof: installs what we got, even if one or more targets failed.)
127 install:
128         - ${INSTALL} -d ${docdir}/reference/
129         - ${INSTALL_DATA} ${srcdir}/reference/* ${docdir}/reference/
130         - ${INSTALL_DATA} ${srcdir}/latex/reference.ps ${docdir}/
131         - ${INSTALL} -d ${docdir}/tutorial/
132         - ${INSTALL_DATA} ${srcdir}/tutorial/* ${docdir}/tutorial/
133         - ${INSTALL_DATA} ${srcdir}/latex/tutorial.ps ${docdir}/
134
135 # Removes all installed documentation files from the system:
136 uninstall:
137         rm -rf ${docdir}
138
139 # The next targets should only be called in case of emergency by developers, 
140 # since the complete documentation is not normally rebuilt.  In any case, they
141 # should only be called from people who know what they are doing and never 
142 # from top-level Makefile's targets clean and distclean.
143 clean:
144         rm -rf ${srcdir}/tutorial ${srcdir}/reference ${srcdir}/latex
145         rm -f tutorial.sgml
146
147 distclean: clean
148         rm -f Makefile
149
150 # Special dummy targets:
151 .SUFFIXES: .fig .eps .png
152 .PHONY: all clean distclean reference tutorial
153 .SILENT: all reference tutorial_html tutorial_tex
154
155 # Suffix rules:
156 .fig.eps :
157         @ if [ ! -d ${srcdir}/latex ]; then mkdir ${srcdir}/latex; fi
158         if [ "${FIG2DEV}" ]; then \
159                 ${FIG2DEV} -L ps -m 0.8 $< ${srcdir}/latex/$@; \
160         else \
161                 echo "warning: fig2dev was not found by configure"; \
162         fi
163 .fig.png :
164         @ if [ ! -d ${srcdir}/tutorial ]; then mkdir ${srcdir}/tutorial; fi
165         if [ "${FIG2DEV}" ]; then \
166                 ${FIG2DEV} -L png $< ${srcdir}/tutorial/$@; \
167         else \
168                 echo "warning: fig2dev was not found by configure"; \
169         fi