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