1 # Copyright (C) 2007-2012 Free Software Foundation, Inc.
2 # See end for copying conditions.
4 # although it would be nice to use tex rather than pdftex to avoid
5 # colors, spurious warnings about names being referenced but not
6 # existing, etc., dvips | ps2pdf doesn't preserve the page size.
7 # Instead of creating a special dvips config file, put up with the warnings.
11 tex = TEXINPUTS
=".:$(texinfodir):${emacsdir}:${TEXINPUTS}" pdftex
-interaction
=nonstopmode
13 all: vol1.pdf vol2.pdf
15 # vol1.texi and vol2.texi specially define \tocreadfilename so we can
16 # use our premade .toc's.
18 vol1.pdf
: elisp1med-fns-ready elisp1med-aux-ready elisp1med-toc-ready
19 @echo
-e
"\f Final TeX run for volume 1..."
20 cp elisp1med-toc-ready elisp1-toc-ready.toc
21 cp elisp1med-fns-ready vol1.fns
22 cp elisp1med-aux-ready vol1.aux
25 vol2.pdf
: elisp2med-fns-ready elisp2med-aux-ready elisp2med-toc-ready
26 @echo
"Final TeX run for volume 2..."
27 cp elisp2med-toc-ready elisp2-toc-ready.toc
28 cp elisp2med-fns-ready vol2.fns
29 cp elisp2med-aux-ready vol2.aux
32 # \f intermediate toc files.
34 # vol1 toc: volume 1, page break, volume 2 (with II: prepended).
35 elisp1med-toc-ready
: elisp1med-init elisp2med-init
36 echo
'@unnchapentry{@b{Volume 1}}{10001}{vol1}{}' >$@
37 cat elisp1med-toc
>>$@
39 echo
'@unnchapentry{@b{Volume 2}}{10001}{vol2}{}' >>$@
40 sed
's/{\([^}]*\)}$$/{II:\1}/' elisp2med-toc
>>$@
42 # vol2 toc: volume 1 (with I: prepended), page break, volume 2.
43 elisp2med-toc-ready
: elisp1med-init elisp2med-init
44 echo
'@unnchapentry{@b{Volume 1}}{10001}{vol1}{}' >$@
45 sed
's/{\([^}]*\)}$$/{I:\1}/' elisp1med-toc
>>$@
47 echo
'@unnchapentry{@b{Volume 2}}{10001}{vol2}{}' >>$@
48 cat elisp2med-toc
>>$@
51 # \f intermediate aux files.
53 # append vol2's fixed aux to normal vol1.
54 elisp1med-aux-ready
: elisp2med-aux-vol-added
55 cat elisp1med-aux
$< >$@
57 # prepend vol1's fixed aux to vol2.
58 elisp2med-aux-ready
: elisp1med-aux-vol-added
59 cat
$< elisp2med-aux
>$@
61 # on -pg entries, append volume number after page number.
62 elisp1med-aux-vol-added
: elisp1med-init
63 sed
's/-pg}{\(.*\)}$$/-pg}{\1, vol.@tie1}/' elisp1med-aux
>$@
65 elisp2med-aux-vol-added
: elisp2med-init
66 sed
's/-pg}{\(.*\)}$$/-pg}{\1, vol.@tie2}/' elisp2med-aux
>$@
68 # \f intermediate index (fns) file.
70 elisp1med-fns-ready
: elisp1med-fn-vol-added elisp2med-fn-vol-added
71 cat elisp2med-fn-vol-added
>>vol1.fn
75 elisp2med-fns-ready
: elisp1med-fn-vol-added elisp2med-fn-vol-added
76 cat elisp1med-fn-vol-added
>>vol2.fn
80 # Insert volume number (I: or II:) into index file.
81 elisp1med-fn-vol-added
: elisp1med-init
82 cp vol1.fn elisp1med-fn
83 sed
's/}{/}{I:/' elisp1med-fn
>$@
85 elisp2med-fn-vol-added
: elisp2med-init
86 cp vol2.fn elisp2med-fn
87 sed
's/}{/}{II:/' elisp2med-fn
>$@
89 # -----------------------------------------------------------------------------
90 # everything above is essentially a duplicate of everything below. sorry.
91 # -----------------------------------------------------------------------------
93 # \f intermediate TeX runs.
95 # this generates what would be the final versions -- except the page
96 # numbers aren't right. The process of adding the I: and II: changes
97 # the page breaks, so a few index entries, at least are wrong. (In
98 # 2007, x-meta-keysym in vol.II ended up on page 374 when the index had
99 # it on page 375 from the initial run.)
101 # So, we start all over again, from these fns/aux/toc files.
103 elisp1med-init
: elisp1-fns-ready elisp1-aux-ready elisp1init-toc-ready
$(texinfodir
)/texinfo.
tex
104 @echo
-e
"\f Intermediate TeX run for volume 1..."
105 cp elisp1init-toc-ready elisp1-toc-ready.toc
106 cp elisp1-fns-ready vol1.fns
107 cp elisp1-aux-ready vol1.aux
110 mv vol1.aux elisp1med-aux
111 mv vol1.toc elisp1med-toc
113 elisp2med-init
: elisp2-fns-ready elisp2-aux-ready elisp2init-toc-ready
$(texinfodir
)/texinfo.
tex
114 @echo
"Final TeX run for volume 2..."
115 cp elisp2init-toc-ready elisp2-toc-ready.toc
116 cp elisp2-fns-ready vol2.fns
117 cp elisp2-aux-ready vol2.aux
120 mv vol2.aux elisp2med-aux
121 mv vol2.toc elisp2med-toc
124 # \f initial toc files.
126 # vol1 toc: volume 1, page break, volume 2 (with II: prepended).
127 elisp1init-toc-ready
: elisp1-init elisp2-init
128 echo
'@unnchapentry{@b{Volume 1}}{10001}{vol1}{}' >$@
131 echo
'@unnchapentry{@b{Volume 2}}{10001}{vol2}{}' >>$@
132 sed
's/{\([^}]*\)}$$/{II:\1}/' elisp2-toc
>>$@
134 # vol2 toc: volume 1 (with I: prepended), page break, volume 2.
135 elisp2init-toc-ready
: elisp1-init elisp2-init
136 echo
'@unnchapentry{@b{Volume 1}}{10001}{vol1}{}' >$@
137 sed
's/{\([^}]*\)}$$/{I:\1}/' elisp1-toc
>>$@
139 echo
'@unnchapentry{@b{Volume 2}}{10001}{vol2}{}' >>$@
143 # \f initial aux files.
145 # append vol2's fixed aux to normal vol1. The initial runs saved
146 # elisp1-aux and elisp2-aux.
147 elisp1-aux-ready
: elisp2-aux-vol-added
148 cat elisp1-aux
$< >$@
150 # prepend vol1's fixed aux to vol2.
151 elisp2-aux-ready
: elisp1-aux-vol-added
152 cat
$< elisp2-aux
>$@
154 # on -pg entries, append volume number after page number.
155 elisp1-aux-vol-added
: elisp1-init
156 sed
's/-pg}{\(.*\)}$$/-pg}{\1, vol.@tie1}/' elisp1-aux
>$@
158 elisp2-aux-vol-added
: elisp2-init
159 sed
's/-pg}{\(.*\)}$$/-pg}{\1, vol.@tie2}/' elisp2-aux
>$@
161 # \f initial index (fns) file.
163 # Append other volume's index entries to this one's.
164 # Index entries in this volume will then take precedence.
165 elisp1-fns-ready
: elisp1-fn-vol-added elisp2-fn-vol-added
166 cat elisp2-fn-vol-added
>>vol1.fn
170 elisp2-fns-ready
: elisp1-fn-vol-added elisp2-fn-vol-added
171 cat elisp1-fn-vol-added
>>vol2.fn
175 # Insert volume number (I: or II:) into index file.
176 elisp1-fn-vol-added
: elisp1-init
178 sed
's/}{/}{I:/' elisp1-fn
>$@
180 elisp2-fn-vol-added
: elisp2-init
182 sed
's/}{/}{II:/' elisp2-fn
>$@
185 # \f initial TeX runs.
187 # We use the .fn, .aux, and .toc files created here in subsequent
188 # processing. The page numbers generated here will not be correct yet,
189 # but we run texindex and TeX a second time just to get them closer.
190 # Otherwise it might take even longer for them to converge.
192 elisp1-init
: vol1.texi
193 @echo
-e
"\f Initial TeX run for volume 1..."
194 rm -f vol1.aux vol1.toc
197 mv vol1.aux elisp1-aux
198 mv vol1.toc elisp1-toc
201 elisp2-init
: vol2.texi
202 @echo
"Initial TeX run for volume 2..."
203 rm -f vol2.aux vol2.toc
206 mv vol2.aux elisp2-aux
207 mv vol2.toc elisp2-toc
212 # This file is free software: you can redistribute it and/or modify
213 # it under the terms of the GNU General Public License as published by
214 # the Free Software Foundation, either version 3 of the License, or
215 # (at your option) any later version.
217 # This file is distributed in the hope that it will be useful,
218 # but WITHOUT ANY WARRANTY; without even the implied warranty of
219 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
220 # GNU General Public License for more details.
222 # You should have received a copy of the GNU General Public License
223 # along with this file. If not, see <http://www.gnu.org/licenses/>.