]> www.ginac.de Git - ginac.git/blob - doc/tutorial/Makefile.am
- account for new GNU-automake built-scheme
[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
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/graext/png/g' -e 's/GRAEXT/GIF/g' tutorial.sgml.in > tutorial.sgml; \
36           echo "Running ${JADE} ${JADEARGS_HTML} tutorial.sgml..."; \
37           ${JADE} ${JADEARGS_HTML} tutorial.sgml; \
38           if [ -f book1.html ]; then mv book1.html index.html; fi; \
39         else \
40           echo "warning: target tutorial_html disabled by configuration"; \
41         fi
42
43 tutorial.tex: tutorial.sgml.in $(EPS)
44         @if [ "${JADE}" -a "${LATEX}" ]; then \
45           sed -e 's/graext/eps/g' -e 's/GRAEXT/EPS/g' tutorial.sgml.in > tutorial.sgml; \
46           echo "Running ${JADE} ${JADEARGS_TEX} tutorial.sgml..."; \
47           ${JADE} ${JADEARGS_TEX} tutorial.sgml ; \
48         else \
49           echo "warning: target tutorial.tex disabled by configuration"; \
50         fi
51
52 tutorial.dvi: tutorial.tex
53         @if [ "${JADETEX}" ]; then \
54           echo "Running ${JADETEX} tutorial.tex..."; \
55           ${JADETEX} tutorial.tex && ${JADETEX} tutorial.tex && ${JADETEX} tutorial.tex; \
56         else \
57           echo "warning: target tutorial.dvi disabled by configuration"; \
58         fi
59
60 tutorial.ps: tutorial.dvi
61         @if [ "${DVIPS}" ]; then \
62           echo "Running ${DVIPS} tutorial.dvi -o tutorial.ps..."; \
63           ${DVIPS} tutorial.dvi -o tutorial.ps; \
64         else \
65           echo "warning: target tutorial.ps disabled by configuration"; \
66         fi
67
68 install-data-local:
69         @for p in *.html; do \
70           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p"; \
71           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p; \
72         done
73         @for p in *.png; do \
74           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p"; \
75           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p; \
76         done
77
78 uninstall-local:
79         @for p in *.html; do \
80           echo " rm -f $(DESTDIR)$(ginactutorialdir)/$$p"; \
81           rm -f $(DESTDIR)$(ginactutorialdir)/$$p; \
82         done
83         @for p in *.png; do \
84           echo " rm -f $(DESTDIR)$(ginactutorialdir)/$$p"; \
85           rm -f $(DESTDIR)$(ginactutorialdir)/$$p; \
86         done
87
88 ginacdocdir = $(datadir)/doc/GiNaC
89 ginactutorialdir = $(ginacdocdir)/tutorial
90 ginactutorial_DATA = $(TUTORIAL_TARGETS)
91 EXTRA_DATA = index.html tutorial.ps
92
93 CLEANFILES = *.html *.png *.ps *.tex *.log *.aux *.dvi *.eps tutorial.sgml HTML.manifest
94 EXTRA_DIST = tutorial.sgml.in $(FIG)