X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=doc%2Ftutorial%2FMakefile.am;h=14d333650c52ef0d0c3c76f8c2e4a5093d90bdb8;hp=4971a9b30fbfdb1358e5a60de4ecba0c40e919b9;hb=HEAD;hpb=6cecf65f570c056be7d99536ca53e8073ebc3559 diff --git a/doc/tutorial/Makefile.am b/doc/tutorial/Makefile.am index 4971a9b3..14d33365 100644 --- a/doc/tutorial/Makefile.am +++ b/doc/tutorial/Makefile.am @@ -1,100 +1,41 @@ ## Process this file with automake to produce Makefile.in -# This section produces HTML'ed and TeX'ed versions of the tutorial using a -# SGML to TeX converter (in this case jade). As a dirty hack, we are doing -# some regexpese to tutorial.sgml prior to parsing it, in order to allow for -# different graphics output. This seems to be an ugly limitation of docbook... +FIG = classhierarchy.fig repnaive.fig reppair.fig repreal.fig +info_TEXINFOS = +AM_MAKEINFOHTMLFLAGS = --no-split -FIG = classhierarchy.fig rep_naive.fig rep_pair.fig rep_real.fig -PNG = $(addsuffix .png, $(basename $(FIG))) -EPS = $(addsuffix .eps, $(basename $(FIG))) +if CONFIG_TEX +if CONFIG_FIG2DEV -SUFFIXES = .fig .png .eps - -%.eps: %.fig - @if [ "${FIG2DEV}" ]; then \ - echo "Running ${FIG2DEV} -L ps -m 0.8 $< $@..."; \ - ${FIG2DEV} -L ps -m 0.8 $< $@; \ - else \ - echo "warning: fig2dev was not found by configure"; \ - fi - -%.png: %.fig - @if [ "${FIG2DEV}" ]; then \ - echo "Running ${FIG2DEV} -L png $< $@..."; \ - ${FIG2DEV} -L png $< $@; \ - else \ - echo "warning: fig2dev was not found by configure"; \ - fi +# Graphics file conversion +PNG = classhierarchy.png repnaive.png reppair.png repreal.png +EPS = classhierarchy.eps repnaive.eps reppair.eps repreal.eps +PDF = classhierarchy.pdf repnaive.pdf reppair.pdf repreal.pdf -JADEARGS_TEX = -t tex -o tutorial.tex -d /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/print/docbook.dsl -JADEARGS_HTML = -t sgml -d /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl - -index.html: tutorial.sgml.in $(PNG) - @if [ "${JADE}" ]; then \ - sed -e "s/MAJOR_VERSION/${GINACLIB_MAJOR_VERSION}/" \ - -e "s/MINOR_VERSION/${GINACLIB_MINOR_VERSION}/" \ - -e 's/graext/png/g' \ - -e 's/GRAEXT/GIF/g' tutorial.sgml.in > tutorial.sgml; \ - echo "Running ${JADE} ${JADEARGS_HTML} tutorial.sgml..."; \ - ${JADE} ${JADEARGS_HTML} tutorial.sgml; \ - if [ -f book1.html ]; then mv book1.html index.html; fi; \ - else \ - echo "warning: target tutorial_html disabled by configuration"; \ - fi +SUFFIXES = .fig .png .eps -tutorial.tex: tutorial.sgml.in $(EPS) - @if [ "${JADE}" -a "${LATEX}" ]; then \ - sed -e "s/MAJOR_VERSION/${GINACLIB_MAJOR_VERSION}/" \ - -e "s/MINOR_VERSION/${GINACLIB_MINOR_VERSION}/" \ - -e 's/graext/eps/g' \ - -e 's/GRAEXT/EPS/g' tutorial.sgml.in > tutorial.sgml; \ - echo "Running ${JADE} ${JADEARGS_TEX} tutorial.sgml..."; \ - ${JADE} ${JADEARGS_TEX} tutorial.sgml ; \ - else \ - echo "warning: target tutorial.tex disabled by configuration"; \ - fi +.fig.eps: + echo "Running ${FIG2DEV} -L eps -m 0.9 $< $@..."; \ + ${FIG2DEV} -L eps -m 0.9 $< $@; -tutorial.dvi: tutorial.tex - @if [ "${JADETEX}" ]; then \ - echo "Running ${JADETEX} tutorial.tex..."; \ - ${JADETEX} tutorial.tex && ${JADETEX} tutorial.tex && ${JADETEX} tutorial.tex; \ - else \ - echo "warning: target tutorial.dvi disabled by configuration"; \ - fi +.fig.pdf: + echo "Running ${FIG2DEV} -L pdf -m 0.9 $< $@..."; \ + ${FIG2DEV} -L pdf -m 0.9 $< $@ -tutorial.ps: tutorial.dvi - @if [ "${DVIPS}" ]; then \ - echo "Running ${DVIPS} tutorial.dvi -o tutorial.ps..."; \ - ${DVIPS} tutorial.dvi -o tutorial.ps; \ - else \ - echo "warning: target tutorial.ps disabled by configuration"; \ - fi +.fig.png: + @echo "Running ${FIG2DEV} -L png $< $@..."; \ + ${FIG2DEV} -L png $< $@ -install-data-local: - @for p in *.html; do \ - echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p"; \ - $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p; \ - done - @for p in *.png; do \ - echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p"; \ - $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(ginactutorialdir)/$$p; \ - done -uninstall-local: - @for p in *.html; do \ - echo " rm -f $(DESTDIR)$(ginactutorialdir)/$$p"; \ - rm -f $(DESTDIR)$(ginactutorialdir)/$$p; \ - done - @for p in *.png; do \ - echo " rm -f $(DESTDIR)$(ginactutorialdir)/$$p"; \ - rm -f $(DESTDIR)$(ginactutorialdir)/$$p; \ - done +info_TEXINFOS += ginac.texi -ginacdocdir = $(datadir)/doc/GiNaC -ginactutorialdir = $(ginacdocdir)/tutorial -ginactutorial_DATA = $(TUTORIAL_TARGETS) -EXTRA_DATA = index.html tutorial.ps +ginac.pdf: $(PDF) +ginac.dvi: $(EPS) +ginac.html: $(PNG) +CLEANFILES = $(EPS) $(PDF) $(PNG) +## CONFIG_FIG2DEV +endif +## CONFIG_TEX +endif -CLEANFILES = *.html *.png *.ps *.tex *.log *.aux *.dvi *.eps tutorial.sgml HTML.manifest -EXTRA_DIST = tutorial.sgml.in $(FIG) +EXTRA_DIST = $(FIG) CMakeLists.txt version.texi.cmake