Fixed generation of tutorial and reference in html/pdf/ps format [A.Sheplyakov].
authorJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Mon, 14 Aug 2006 19:48:15 +0000 (19:48 +0000)
committerJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Mon, 14 Aug 2006 19:48:15 +0000 (19:48 +0000)
INSTALL
configure.ac
doc/reference/Makefile.am
doc/tutorial/Makefile.am

diff --git a/INSTALL b/INSTALL
index 31a8f4d91581a560a234e99139bad2023fa452df..8d0b703c885d57d24c4ce9e36b611ac2e6ebab41 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -10,6 +10,10 @@ different or older compiler you are on your own. Note that you may have to
 use the same compiler you compiled CLN with because of differing
 name-mangling schemes.
 
+To build the GiNaC tutorial and reference manual the doxygen utility
+(it can be downloaded from http://www.stack.nl/~dimitri/doxygen) and
+TeX are necessary.
+
 Known to work with:
  - Linux on x86, Alpha and Sparc using GCC 3.x and 4.0.
 
index c9960d7c8a617969b1a6c62869c17095eb9415af..44356f2770797c76134c64d4b5ce5235e704cf1e 100644 (file)
@@ -146,11 +146,14 @@ dnl Check for utilities needed by the different kinds of documentation.
 dnl Documentation needs only be built when extending it, so never mind if it
 dnl cannot find those helpers:
 AC_PATH_PROG(DOXYGEN, doxygen, "")
+AM_CONDITIONAL(CONFIG_DOXYGEN, [test ! -z "$DOXYGEN"])
 AC_PATH_PROG(LATEX, latex, "")
 AC_PATH_PROG(PDFLATEX, pdflatex, "")
 AC_PATH_PROG(MAKEINDEX, makeindex, "")
 AC_PATH_PROG(DVIPS, dvips, "")
+AM_CONDITIONAL(CONFIG_TEX, [test ! \( -z "$LATEX" -o -z $"PDFLATEX" -o -z "$MAKEINDEX" -o -z "$DVIPS" \)])
 AC_PATH_PROG(FIG2DEV, fig2dev, "")
+AM_CONDITIONAL(CONFIG_FIG2DEV, [test ! -z "$FIG2DEV"])
 
 dnl Output makefiles etc.
 AC_CONFIG_FILES([
index 129ac50b7d0c70b725a05847d2e6cb82dd9098b6..bf2da91dd2384c7ad19755b04e9ebfc075dba208 100644 (file)
@@ -1,10 +1,15 @@
 ## Process this file with automake to produce Makefile.in
 
 # Targets
+if CONFIG_DOXYGEN
 html: html_files/index.html
+
+if CONFIG_TEX
 dvi: reference.dvi
 ps: reference.ps
 pdf: reference.pdf
+endif
+
 
 # This section produces HTML'ed and TeX'ed developer's reference from the
 # sources with a JavaDoc-like tool (in this case doxygen):
@@ -12,64 +17,42 @@ html_files::
        @[ -d html_files ] || mkdir html_files >/dev/null 2>&1
 
 html_files/index.html:
-       @if [ "${DOXYGEN}" ]; then \
-         echo "Running ${DOXYGEN} DoxyfileHTML..."; \
-         ${DOXYGEN} DoxyfileHTML; \
-       else \
-         echo "warning: target reference_html disabled by configuration"; \
-       fi
+         @echo "Running ${DOXYGEN} DoxyfileHTML..."; \
+         ${DOXYGEN} DoxyfileHTML
 
+if CONFIG_TEX
 latex::
        @[ -d latex ] || mkdir latex >/dev/null 2>&1
 
 latex/reference.tex:
-       @if [ "${DOXYGEN}" ]; then \
-         echo "Running ${DOXYGEN} DoxyfileTEX..."; \
-         ${DOXYGEN} DoxyfileTEX; \
-         mv latex/refman.tex latex/reference.tex; \
-       else \
-         echo "warning: target reference.tex disabled by configuration"; \
-       fi
+       @echo "Running ${DOXYGEN} DoxyfileTEX..."; \
+         ${DOXYGEN} DoxyfileTEX
 
 latex/reference.dvi: latex/reference.tex
-       @if [ "${LATEX}" -a "${MAKEINDEX}" ]; then \
-         (cd latex; \
-         ${LATEX} reference.tex && \
-         ${MAKEINDEX} reference.idx && \
-         ${LATEX} reference.tex); \
-       else \
-         echo "warning: target reference.dvi disabled by configuration"; \
-       fi
+       @set -e ;\
+         cd latex; \
+         ${LATEX} reference.tex ; \
+         ${MAKEINDEX} reference.idx ; \
+         ${LATEX} reference.tex
 
 latex/reference.ps: latex/reference.dvi
-       @if [ "${DVIPS}" ]; then \
-         echo "Running ${DVIPS} -o reference.ps reference.dvi..."; \
-         (cd latex; ${DVIPS} -o reference.ps reference.dvi); \
-       else \
-         echo "warning: target reference.ps disabled by configuration"; \
-       fi
+       @echo "Running ${DVIPS} -o reference.ps reference.dvi..."; \
+         cd latex; ${DVIPS} -o reference.ps reference.dvi
 
 pdflatex::
        @[ -d pdflatex ] || mkdir pdflatex >/dev/null 2>&1
 
 pdflatex/reference.tex:
-       @if [ "${DOXYGEN}" ]; then \
-         echo "Running ${DOXYGEN} DoxyfilePDF..."; \
+       @echo "Running ${DOXYGEN} DoxyfilePDF..."; \
          ${DOXYGEN} DoxyfilePDF; \
-         mv pdflatex/refman.tex pdflatex/reference.tex; \
-       else \
-         echo "warning: target reference.pdf disabled by configuration"; \
-       fi
+         mv pdflatex/refman.tex pdflatex/reference.tex
 
 pdflatex/reference.pdf: pdflatex/reference.tex
-       @if [ "${PDFLATEX}" -a "${MAKEINDEX}" ]; then \
-         (cd pdflatex; \
-         ${PDFLATEX} reference.tex && \
-         ${MAKEINDEX} reference.idx && \
-         ${PDFLATEX} reference.tex); \
-       else \
-         echo "warning: target reference.pdf disabled by configuration"; \
-       fi
+       @set -e ; \
+               cd pdflatex; \
+         ${PDFLATEX} reference.tex ;\
+         ${MAKEINDEX} reference.idx ;\
+         ${PDFLATEX} reference.tex
 
 reference.dvi: latex latex/reference.dvi
        cp latex/reference.dvi reference.dvi
@@ -79,5 +62,10 @@ reference.ps: latex latex/reference.ps
 
 reference.pdf: pdflatex pdflatex/reference.pdf
        cp pdflatex/reference.pdf reference.pdf
+endif 
+## CONFIG_TEX
+
+endif
+## CONFIG_DOXYGEN
 
 CLEANFILES = reference.dvi reference.ps reference.pdf html_files/* latex/* pdflatex/*
index c9025d9aa683d37f3a801735394457d7b57187ee..2d23965fae29d51bb2a190e1f49184922986bb90 100644 (file)
@@ -1,45 +1,42 @@
 ## Process this file with automake to produce Makefile.in
 
+FIG = classhierarchy.fig repnaive.fig reppair.fig repreal.fig
+TXT = $(addsuffix .txt, $(basename $(FIG)))
+info_TEXINFOS =
 AM_MAKEINFOHTMLFLAGS = --no-split
 
+if CONFIG_TEX
+if CONFIG_FIG2DEV
+
 # Graphics file conversion
-FIG = classhierarchy.fig repnaive.fig reppair.fig repreal.fig
 PNG = $(addsuffix .png, $(basename $(FIG)))
 EPS = $(addsuffix .eps, $(basename $(FIG)))
 PDF = $(addsuffix .pdf, $(basename $(FIG)))
-TXT = $(addsuffix .txt, $(basename $(FIG)))
 
 SUFFIXES = .fig .png .eps .txt
 
 .fig.eps:
-       @if [ "${FIG2DEV}" ]; then \
          echo "Running ${FIG2DEV} -L eps -m 0.9 $< $@..."; \
-         ${FIG2DEV} -L eps -m 0.9 $< $@; \
-       else \
-         echo "warning: fig2dev was not found by configure"; \
-       fi
+         ${FIG2DEV} -L eps -m 0.9 $< $@;
 
 .fig.pdf:
-       @if [ "${FIG2DEV}" ]; then \
          echo "Running ${FIG2DEV} -L pdf -m 0.9 $< $@..."; \
-         ${FIG2DEV} -L pdf -m 0.9 $< $@; \
-       else \
-         echo "warning: fig2dev was not found by configure"; \
-       fi
+         ${FIG2DEV} -L pdf -m 0.9 $< $@
 
 .fig.png:
-       @if [ "${FIG2DEV}" ]; then \
-         echo "Running ${FIG2DEV} -L png $< $@..."; \
-         ${FIG2DEV} -L png $< $@; \
-       else \
-         echo "warning: fig2dev was not found by configure"; \
-       fi
+       @echo "Running ${FIG2DEV} -L png $< $@..."; \
+         ${FIG2DEV} -L png $< $@
+
 
-info_TEXINFOS = ginac.texi
+info_TEXINFOS += ginac.texi
 
 ginac.pdf: $(PDF)
 ginac.dvi: $(EPS)
 ginac.html: $(PNG)
-
 CLEANFILES = $(EPS) $(PDF) $(PNG)
+## CONFIG_FIG2DEV
+endif
+## CONFIG_TEX
+endif
+
 EXTRA_DIST = $(FIG) $(TXT)