]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/two-volume.make
Update copyright year to 2015
[gnu-emacs] / doc / lispref / two-volume.make
index 4fcfe9039df989fe03c3a75b015ea318a12b4710..64799d8fc04ef54e9d0ae6f8df626d3b1caad2d9 100644 (file)
@@ -1,30 +1,45 @@
-# Copyright 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2007-2015 Free Software Foundation, Inc.
 # See end for copying conditions.
 
 # although it would be nice to use tex rather than pdftex to avoid
 # colors, spurious warnings about names being referenced but not
 # existing, etc., dvips | ps2pdf doesn't preserve the page size.
 # Instead of creating a special dvips config file, put up with the warnings.
-tex = pdftex -interaction=nonstopmode
+# (Note added 2012/05: for me, using texlive-2007-57, pdftex
+# doesn't work for reason, but tex does.)
+texinfodir=../misc
+emacsdir=../emacs
+
+tex = TEXINPUTS=".:$(texinfodir):${emacsdir}:${TEXINPUTS}" pdftex -interaction=nonstopmode
 
 all: vol1.pdf vol2.pdf
 
-# vol1.texi and vol2.texi specially define \tocreadfilename so we can
-# use our premade .toc's.
+# There's probably a better way to do this, without using a temp file.
+# Something like:
+# tex -jobname=vol1 '\def\SETVOL1 \input{elisp.texi}'
+# but I don't know what to use for "\def\SETVOL1".
+tex1 = sed '/^@setfilename/a\
+@set VOL1' elisp.texi > elisp1tmp.tex && $(tex) -jobname=vol1 elisp1tmp.tex
+
+tex2 = sed '/^@setfilename/a\
+@set VOL2' elisp.texi > elisp2tmp.tex && $(tex) -jobname=vol2 elisp2tmp.tex
+
+# elisp.texi specially defines \tocreadfilename when VOL1 or VOL2 is
+# set, so we can use our premade .toc's.
 # 
 vol1.pdf: elisp1med-fns-ready elisp1med-aux-ready elisp1med-toc-ready
        @echo -e "\f Final TeX run for volume 1..."
        cp elisp1med-toc-ready elisp1-toc-ready.toc
        cp elisp1med-fns-ready vol1.fns
        cp elisp1med-aux-ready vol1.aux
-       $(tex) vol1.texi
+       $(tex1)
 #
 vol2.pdf: elisp2med-fns-ready elisp2med-aux-ready elisp2med-toc-ready
        @echo "Final TeX run for volume 2..."
        cp elisp2med-toc-ready elisp2-toc-ready.toc
        cp elisp2med-fns-ready vol2.fns
        cp elisp2med-aux-ready vol2.aux
-       $(tex) vol2.texi
+       $(tex2)
 
 # \f intermediate toc files.
 # 
@@ -61,8 +76,6 @@ elisp1med-aux-vol-added: elisp1med-init
 #
 elisp2med-aux-vol-added: elisp2med-init
        sed 's/-pg}{\(.*\)}$$/-pg}{\1, vol.@tie2}/' elisp2med-aux >$@
-       
-
 
 # \f intermediate index (fns) file.
 # 
@@ -99,22 +112,22 @@ elisp2med-fn-vol-added: elisp2med-init
 # 
 # So, we start all over again, from these fns/aux/toc files.
 # 
-elisp1med-init: elisp1-fns-ready elisp1-aux-ready elisp1init-toc-ready texinfo.tex
+elisp1med-init: elisp1-fns-ready elisp1-aux-ready elisp1init-toc-ready $(texinfodir)/texinfo.tex
        @echo -e "\f Intermediate TeX run for volume 1..."
        cp elisp1init-toc-ready elisp1-toc-ready.toc
        cp elisp1-fns-ready vol1.fns
        cp elisp1-aux-ready vol1.aux
-       $(tex) vol1.texi
+       $(tex1)
        texindex vol1.??
        mv vol1.aux elisp1med-aux
        mv vol1.toc elisp1med-toc
 #
-elisp2med-init: elisp2-fns-ready elisp2-aux-ready elisp2init-toc-ready texinfo.tex
+elisp2med-init: elisp2-fns-ready elisp2-aux-ready elisp2init-toc-ready $(texinfodir)/texinfo.tex
        @echo "Final TeX run for volume 2..."
        cp elisp2init-toc-ready elisp2-toc-ready.toc
        cp elisp2-fns-ready vol2.fns
        cp elisp2-aux-ready vol2.aux
-       $(tex) vol2.texi
+       $(tex2)
        texindex vol2.??
        mv vol2.aux elisp2med-aux
        mv vol2.toc elisp2med-toc
@@ -156,7 +169,6 @@ elisp1-aux-vol-added: elisp1-init
 #
 elisp2-aux-vol-added: elisp2-init
        sed 's/-pg}{\(.*\)}$$/-pg}{\1, vol.@tie2}/' elisp2-aux >$@
-       
 
 # \f initial index (fns) file.
 # 
@@ -189,19 +201,19 @@ elisp2-fn-vol-added: elisp2-init
 # but we run texindex and TeX a second time just to get them closer.
 # Otherwise it might take even longer for them to converge.
 # 
-elisp1-init: vol1.texi
+elisp1-init: elisp.texi
        @echo -e "\f Initial TeX run for volume 1..."
        rm -f vol1.aux vol1.toc
-       $(tex) $<
+       $(tex1)
        texindex vol1.??
        mv vol1.aux elisp1-aux
        mv vol1.toc elisp1-toc
        touch $@
 #
-elisp2-init: vol2.texi
+elisp2-init: elisp.texi
        @echo "Initial TeX run for volume 2..."
        rm -f vol2.aux vol2.toc
-       $(tex) $<
+       $(tex2)
        texindex vol2.??
        mv vol2.aux elisp2-aux
        mv vol2.toc elisp2-toc
@@ -222,4 +234,3 @@ elisp2-init: vol2.texi
 # You should have received a copy of the GNU General Public License
 # along with this file.  If not, see <http://www.gnu.org/licenses/>.
  
-# arch-tag: 5c258a2e-d4a9-4d0e-b279-fb3a6faa27eb