doc/misc.tex: Clarify that `augment-options' is in `sod-frontend'.
[sod] / doc / Makefile.am
index 53820a1..5f090d8 100644 (file)
@@ -34,6 +34,11 @@ EXTRA_DIST           += $(TEX_FILES)
 TEXFLAGS                = --interaction=nonstopmode \
                                --output-directory=$(abs_builddir)
 
+run_pdflatex            = cd $(srcdir) && \
+       pdflatex $(TEXFLAGS) \
+               --jobname=$(basename $1) \
+               '\def\pkgversion{$(VERSION)}\input{$1}'
+
 ###--------------------------------------------------------------------------
 ### The manual.
 
@@ -43,6 +48,9 @@ TEX_FILES             += sod.tex
 ## Main document styling and definitions.
 TEX_FILES              += sod.sty
 
+## The introduction.
+TEX_FILES              += intro.tex
+
 ## Tutorial.
 TEX_FILES              += tutorial.tex
 
@@ -71,9 +79,10 @@ MAINTAINERCLEANFILES += sod.pdf
 EXTRA_DIST             += sod.pdf
 doc_DATA               += sod.pdf
 sod.pdf: $(TEX_FILES)
-       cd $(srcdir) && pdflatex $(TEXFLAGS) sod.tex
-       cd $(srcdir) && pdflatex $(TEXFLAGS) sod.tex
+       $(call run_pdflatex,sod.tex)
+       bibtex sod.aux
+       $(call run_pdflatex,sod.tex)
        makeindex sod.idx
-       cd $(srcdir) && pdflatex $(TEXFLAGS) sod.tex
+       $(call run_pdflatex,sod.tex)
 
 ###----- That's all, folks --------------------------------------------------