1 ## Process this file with automake to produce Makefile.in
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...
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)))
12 SUFFIXES = .fig .png .eps
15 @if [ "${FIG2DEV}" ]; then \
16 echo "Running ${FIG2DEV} -L ps -m 0.8 $< $@..."; \
17 ${FIG2DEV} -L ps -m 0.8 $< $@; \
19 echo "warning: fig2dev was not found by configure"; \
23 @if [ "${FIG2DEV}" ]; then \
24 echo "Running ${FIG2DEV} -L png $< $@..."; \
25 ${FIG2DEV} -L png $< $@; \
27 echo "warning: fig2dev was not found by configure"; \
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
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}/" \
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; \
43 echo "warning: target tutorial_html disabled by configuration"; \
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}/" \
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 ; \
55 echo "warning: target tutorial.tex disabled by configuration"; \
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; \
63 echo "warning: target tutorial.dvi disabled by configuration"; \
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; \
71 echo "warning: target tutorial.ps disabled by configuration"; \
74 ginacdocdir = $(datadir)/doc/GiNaC
75 ginactutorialdir = $(ginacdocdir)/tutorial
76 ginactutorial_DATA = @TUTORIAL_TARGETS@
78 CLEANFILES = *.html *.png *.ps *.tex *.log *.aux *.dvi *.eps tutorial.sgml HTML.manifest
79 EXTRA_DIST = tutorial.sgml.in $(FIG)
82 @for p in *.html; do \
83 echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p"; \
84 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p; \
87 echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p"; \
88 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p; \
92 @for p in *.html; do \
93 echo " rm -f $(DESTDIR)$(ginactutorialdir)/$$p"; \
94 rm -f $(DESTDIR)$(ginactutorialdir)/$$p; \
97 echo " rm -f $(DESTDIR)$(ginactutorialdir)/$$p"; \
98 rm -f $(DESTDIR)$(ginactutorialdir)/$$p; \