* create dirs ${prefix}/share/doc/GiNaC/{tutorial,reference} only if
[ginac.git] / doc / reference / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 # This section produces HTML'ed and TeX'ed developer's reference from the
4 # sources with a JavaDoc-like tool (in this case doxygen):
5 index.html:
6         @if [ "${DOXYGEN}" ]; then \
7           echo "Running ${DOXYGEN} DoxyfileHTML..."; \
8           (cd ${srcdir}; \
9           ${DOXYGEN} DoxyfileHTML); \
10         else \
11           echo "warning: target reference_html disabled by configuration"; \
12         fi
13
14 latex::
15         @[ -d ${srcdir}/latex ] || mkdir ${srcdir}/latex >/dev/null 2>&1
16
17 latex/reference.tex:
18         @if [ "${DOXYGEN}" ]; then \
19           echo "Running ${DOXYGEN} DoxyfileTEX..."; \
20           (cd ${srcdir}; \
21           ${DOXYGEN} DoxyfileTEX); \
22           mv ${srcdir}/latex/refman.tex ${srcdir}/latex/reference.tex; \
23         else \
24           echo "warning: target reference.tex disabled by configuration"; \
25         fi
26
27 latex/reference.dvi: latex/reference.tex
28         @if [ "${LATEX}" -a "${MAKEINDEX}" ]; then \
29           (cd ${srcdir}/latex; \
30           ${LATEX} reference.tex && \
31           ${MAKEINDEX} reference.idx && \
32           ${LATEX} reference.tex); \
33         else \
34           echo "warning: target reference.dvi disabled by configuration"; \
35         fi
36
37 latex/reference.ps: latex/reference.dvi
38         @if [ "${DVIPS}" ]; then \
39           echo "Running ${DVIPS} -o reference.ps reference.dvi..."; \
40           (cd ${srcdir}/latex; ${DVIPS} -o reference.ps reference.dvi); \
41         else \
42           echo "warning: target reference.ps disabled by configuration"; \
43         fi
44
45 reference.ps: latex latex/reference.ps
46         cp ${srcdir}/latex/reference.ps reference.ps
47
48 ginacreferencedir = `test -z "@REFERENCE_TARGETS@" || echo @datadir@/doc/GiNaC/reference`
49 ginacreference_DATA = @REFERENCE_TARGETS@
50
51 CLEANFILES = *.html *.gif doxygen.css *.ps latex/*
52 EXTRA_DIST = DoxyfileHTML DoxyfileTEX Doxyfooter
53
54 install-data-local:
55         @if [ -f $(srcdir)/doxygen.css ]; then \
56           echo " $(INSTALL_DATA) $(srcdir)/doxygen.css $(DESTDIR)$(ginacreferencedir)/doxygen.css"; \
57           $(INSTALL_DATA) $(srcdir)/doxygen.css $(DESTDIR)$(ginacreferencedir)/doxygen.css; \
58         fi
59         @for p in `echo $(srcdir)/*.html | sed -e 's,[^ ]*/,,g' -e 's,\*\.html,,'`; do \
60           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginacreferencedir)/$$p"; \
61           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginacreferencedir)/$$p; \
62         done
63         @for p in `echo $(srcdir)/*.gif | sed -e 's,[^ ]*/,,g' -e 's,\*\.gif,,'`; do \
64           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginacreferencedir)/$$p"; \
65           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginacreferencedir)/$$p; \
66         done
67
68 uninstall-local:
69         rm -f $(DESTDIR)$(ginacreferencedir)/doxygen.css
70         rm -f $(DESTDIR)$(ginacreferencedir)/*.html
71         rm -f $(DESTDIR)$(ginacreferencedir)/*.gif