X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=doc%2Ftutorial%2FMakefile.am;h=d3c1afa06ba2cb15a5d607f3e7f497b144ddb14a;hp=29fc24632b9b57af132250660acf884a6b774878;hb=9a3a5502651d1f8464a0ec7b653a3fd2c5cb09a1;hpb=868126104f29e425a1f3a5c8196d5673735aa30d diff --git a/doc/tutorial/Makefile.am b/doc/tutorial/Makefile.am index 29fc2463..d3c1afa0 100644 --- a/doc/tutorial/Makefile.am +++ b/doc/tutorial/Makefile.am @@ -1,25 +1,22 @@ ## 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 rep_naive.fig rep_pair.fig rep_real.fig +# Graphics file conversion +FIG = classhierarchy.fig repnaive.fig reppair.fig repreal.fig PNG = $(addsuffix .png, $(basename $(FIG))) EPS = $(addsuffix .eps, $(basename $(FIG))) +TXT = $(addsuffix .txt, $(basename $(FIG))) -SUFFIXES = .fig .png .eps +SUFFIXES = .fig .png .eps .txt -%.eps: %.fig +.fig.eps: @if [ "${FIG2DEV}" ]; then \ - echo "Running ${FIG2DEV} -L ps -m 0.8 $< $@..."; \ - ${FIG2DEV} -L ps -m 0.8 $< $@; \ + echo "Running ${FIG2DEV} -L eps -m 0.9 $< $@..."; \ + ${FIG2DEV} -L eps -m 0.9 $< $@; \ else \ echo "warning: fig2dev was not found by configure"; \ fi -%.png: %.fig +.fig.png: @if [ "${FIG2DEV}" ]; then \ echo "Running ${FIG2DEV} -L png $< $@..."; \ ${FIG2DEV} -L png $< $@; \ @@ -27,73 +24,30 @@ SUFFIXES = .fig .png .eps echo "warning: fig2dev was not found by configure"; \ fi -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 +info_TEXINFOS = ginac.texi -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 +ginac.dvi: $(EPS) -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 +ginac.html: ginac.texi version.texi $(PNG) + $(MAKEINFO) --html $< -I ${srcdir} -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 - -ginacdocdir = $(datadir)/doc/GiNaC -ginactutorialdir = $(ginacdocdir)/tutorial +ginactutorialdir = `test -z "@TUTORIAL_TARGETS@" || echo @datadir@/doc/GiNaC/tutorial` ginactutorial_DATA = @TUTORIAL_TARGETS@ -CLEANFILES = *.html *.png *.ps *.tex *.log *.aux *.dvi *.eps tutorial.sgml HTML.manifest -EXTRA_DIST = tutorial.sgml.in $(FIG) +CLEANFILES = $(EPS) $(PNG) ginac.html +EXTRA_DIST = $(FIG) $(TXT) 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; \ + $(mkinstalldirs) $(DESTDIR)$(ginactutorialdir) + @for p in $(PNG); do \ + if [ -f $$p ]; then \ + echo " $(INSTALL_DATA) $$p $(DESTDIR)$(ginactutorialdir)/$$p"; \ + $(INSTALL_DATA) $$p $(DESTDIR)$(ginactutorialdir)/$$p; \ + fi; \ 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 \ + @for p in $(PNG); do \ echo " rm -f $(DESTDIR)$(ginactutorialdir)/$$p"; \ rm -f $(DESTDIR)$(ginactutorialdir)/$$p; \ done