]> www.ginac.de Git - ginac.git/blob - doc/tutorial/Makefile.am
- Finished tutorial :-)
[ginac.git] / doc / tutorial / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 # This section produces HTML'ed and TeX'ed versions of the tutorial using a
4 # SGML to TeX converter (in this case jade).  As a dirty hack, we are doing
5 # some regexpese to tutorial.sgml prior to parsing it, in order to allow for
6 # different graphics output.  This seems to be an ugly limitation of docbook...
7
8 FIG = classhierarchy.fig rep_naive.fig rep_pair.fig rep_real.fig
9 PNG = $(addsuffix .png, $(basename $(FIG)))
10 EPS = $(addsuffix .eps, $(basename $(FIG)))
11
12 SUFFIXES = .fig .png .eps
13
14 %.eps: %.fig
15         @if [ "${FIG2DEV}" ]; then \
16           echo "Running ${FIG2DEV} -L ps -m 0.8 $< $@..."; \
17           ${FIG2DEV} -L ps -m 0.8 $< $@; \
18         else \
19           echo "warning: fig2dev was not found by configure"; \
20         fi
21
22 %.png: %.fig
23         @if [ "${FIG2DEV}" ]; then \
24           echo "Running ${FIG2DEV} -L png $< $@..."; \
25           ${FIG2DEV} -L png $< $@; \
26         else \
27           echo "warning: fig2dev was not found by configure"; \
28         fi
29
30 JADEARGS_TEX = -t tex -o tutorial.tex -d /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/print/docbook.dsl
31 JADEARGS_HTML = -t sgml -d /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl
32
33 index.html: tutorial.sgml.in $(PNG)
34         @if [ "${JADE}" ]; then \
35           sed -e "s/MAJOR_VERSION/${GINACLIB_MAJOR_VERSION}/" \
36               -e "s/MINOR_VERSION/${GINACLIB_MINOR_VERSION}/" \
37               -e 's/graext/png/g' \
38               -e 's/GRAEXT/GIF/g' tutorial.sgml.in > tutorial.sgml; \
39           echo "Running ${JADE} ${JADEARGS_HTML} tutorial.sgml..."; \
40           ${JADE} ${JADEARGS_HTML} tutorial.sgml; \
41           if [ -f book1.html ]; then mv book1.html index.html; fi; \
42         else \
43           echo "warning: target tutorial_html disabled by configuration"; \
44         fi
45
46 tutorial.tex: tutorial.sgml.in $(EPS)
47         @if [ "${JADE}" -a "${LATEX}" ]; then \
48           sed -e "s/MAJOR_VERSION/${GINACLIB_MAJOR_VERSION}/" \
49               -e "s/MINOR_VERSION/${GINACLIB_MINOR_VERSION}/" \
50               -e 's/graext/eps/g' \
51               -e 's/GRAEXT/EPS/g' tutorial.sgml.in > tutorial.sgml; \
52           echo "Running ${JADE} ${JADEARGS_TEX} tutorial.sgml..."; \
53           ${JADE} ${JADEARGS_TEX} tutorial.sgml ; \
54         else \
55           echo "warning: target tutorial.tex disabled by configuration"; \
56         fi
57
58 tutorial.dvi: tutorial.tex
59         @if [ "${JADETEX}" ]; then \
60           echo "Running ${JADETEX} tutorial.tex..."; \
61           ${JADETEX} tutorial.tex && ${JADETEX} tutorial.tex && ${JADETEX} tutorial.tex; \
62         else \
63           echo "warning: target tutorial.dvi disabled by configuration"; \
64         fi
65
66 tutorial.ps: tutorial.dvi
67         @if [ "${DVIPS}" ]; then \
68           echo "Running ${DVIPS} tutorial.dvi -o tutorial.ps..."; \
69           ${DVIPS} tutorial.dvi -o tutorial.ps; \
70         else \
71           echo "warning: target tutorial.ps disabled by configuration"; \
72         fi
73
74 install-data-local:
75         @for p in *.html; do \
76           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p"; \
77           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p; \
78         done
79         @for p in *.png; do \
80           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p"; \
81           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p; \
82         done
83
84 uninstall-local:
85         @for p in *.html; do \
86           echo " rm -f $(DESTDIR)$(ginactutorialdir)/$$p"; \
87           rm -f $(DESTDIR)$(ginactutorialdir)/$$p; \
88         done
89         @for p in *.png; do \
90           echo " rm -f $(DESTDIR)$(ginactutorialdir)/$$p"; \
91           rm -f $(DESTDIR)$(ginactutorialdir)/$$p; \
92         done
93
94 ginacdocdir = $(datadir)/doc/GiNaC
95 ginactutorialdir = $(ginacdocdir)/tutorial
96 ginactutorial_DATA = $(TUTORIAL_TARGETS)
97 EXTRA_DATA = index.html tutorial.ps
98
99 CLEANFILES = *.html *.png *.ps *.tex *.log *.aux *.dvi *.eps tutorial.sgml HTML.manifest
100 EXTRA_DIST = tutorial.sgml.in $(FIG)