chiark / gitweb /
doc/Makefile.am: Abstract out repeated TeX arguments into a variable.
[sod] / doc / Makefile.am
index a6894bec127d2257483a4e0d2fa62b90a62e8a4e..60661d5f1a2228a44c846f51b719688dc9015a36 100644 (file)
@@ -7,7 +7,7 @@
 
 ###----- Licensing notice ---------------------------------------------------
 ###
-### This file is part of the Sensble Object Design, an object system for C.
+### This file is part of the Sensible Object Design, an object system for C.
 ###
 ### SOD is free software; you can redistribute it and/or modify
 ### it under the terms of the GNU General Public License as published by
@@ -28,9 +28,11 @@ include $(top_srcdir)/vars.am
 doc_DATA                =
 TEX_FILES               =
 
-CLEANFILES             += *.aux *.out *.log *.toc
+CLEANFILES             += *.aux *.out *.log *.toc *.ind *.idx *.ilg
 EXTRA_DIST             += $(TEX_FILES)
 
+TEXFLAGS                = --output-directory=$(abs_builddir)
+
 ###--------------------------------------------------------------------------
 ### The manual.
 
@@ -68,7 +70,9 @@ MAINTAINERCLEANFILES  += sod.pdf
 EXTRA_DIST             += sod.pdf
 doc_DATA               += sod.pdf
 sod.pdf: $(TEX_FILES)
-       cd $(srcdir) && pdflatex --output-directory=$(abs_builddir) sod.tex
-       cd $(srcdir) && pdflatex --output-directory=$(abs_builddir) sod.tex
+       cd $(srcdir) && pdflatex $(TEXFLAGS) sod.tex
+       cd $(srcdir) && pdflatex $(TEXFLAGS) sod.tex
+       makeindex sod.idx
+       cd $(srcdir) && pdflatex $(TEXFLAGS) sod.tex
 
 ###----- That's all, folks --------------------------------------------------