2999
|
1 Contents: |
|
2 |
|
3 Installation |
|
4 Simple installation |
|
5 Custom installation |
|
6 Disk space |
|
7 Kpathsea application distributions |
|
8 Changing search paths |
|
9 Default path features |
|
10 Default path generation |
|
11 Running `configure' |
|
12 `configure' shells |
|
13 `configure' options |
|
14 `configure' environment |
|
15 `configure' scenarios |
|
16 Shared library |
|
17 Running `make' |
|
18 Installing files |
|
19 Cleaning up |
|
20 Filename database generation |
3172
|
21 `mktex' scripts |
|
22 `mktex' configuration |
|
23 `mktex' script names |
|
24 `mktex' script arguments |
2999
|
25 Installation testing |
|
26 Security |
|
27 |
|
28 |
|
29 Installation |
|
30 ************ |
|
31 |
|
32 The procedure for Kpathsea (and Web2c, etc.) configuration and |
3172
|
33 installation follows. If you encounter trouble, see *Note Common |
|
34 problems::, a copy of which is in the file `kpathsea/BUGS'. |
2999
|
35 |
|
36 Simple installation |
|
37 =================== |
|
38 |
|
39 Installing TeX and friends for the first time can be a daunting |
|
40 experience. Thus, you may prefer to skip this whole thing and just get |
3172
|
41 precompiled executables: see *Note unixtex.ftp::. |
2999
|
42 |
|
43 This section explains what to do if you wish to take the defaults for |
3172
|
44 everything, and generally to install in the simplest possible way. Most |
|
45 steps here refer to corresponding subsection in the next section which |
|
46 explains how to override defaults and generally gives more details. |
|
47 |
|
48 By default everything will be installed under `/usr/local' and the |
|
49 following discussion assumes this. However, if you already have TeX |
|
50 installed, its location is used to derive the directory under which |
|
51 everything is to be installed. |
2999
|
52 |
|
53 1. Be sure you have enough disk space: approximately 8 megabytes for |
|
54 the compressed archives, 15MB for sources, 45MB for compilation, |
|
55 40MB for the (initial) installed system (including library files). |
|
56 *Note Disk space::. |
|
57 |
|
58 2. Retrieve these two distribution archives: |
|
59 `ftp://ftp.tug.org/tex/texk.tar.gz' |
|
60 These are the sources, which you will be compiling. |
|
61 |
|
62 `ftp://ftp.tug.org/tex/texmflib.tar.gz' |
|
63 This is a basic set of input files. You should unpack it in |
|
64 the directory `/usr/local/share'; doing so will create a |
|
65 `texmf' subdirectory there. |
|
66 |
|
67 *Note Kpathsea application distributions::. |
|
68 |
|
69 3. When using the default search paths, there is no need to edit any |
|
70 distribution files. *Note Changing search paths::. |
|
71 |
|
72 4. At the top level of the distribution, run `sh configure'. (If you |
3172
|
73 have the GNU Bash shell installed, run `bash configure'.) *Note |
2999
|
74 Running configure::. |
|
75 |
3172
|
76 5. `make'. *Note Running make::. If you are using a BSD 4.4 system |
|
77 such as FreeBSD or NetBSD, use GNU make (often installed in |
|
78 `/usr/local/bin'), not the BSD make. |
|
79 |
|
80 If you are using a HP-UX 10 system and the native compiler, |
|
81 specify the `+u' flag in `XCFLAGS'. |
2999
|
82 |
|
83 6. `make install'. *Note Installing files::. |
|
84 |
|
85 7. `make distclean'. *Note Cleaning up::. |
|
86 |
|
87 8. Set up a cron job to rebuild the filename database that makes |
|
88 searching faster. This line will rebuild it every midnight: |
3172
|
89 0 0 * * * cd /usr/local/share/texmf && /BINDIR/mktexlsr |
2999
|
90 *Note Filename database generation::, and *Note Filename |
|
91 database::. |
|
92 |
|
93 9. If you're installing Dvips, you also need to set up configuration |
|
94 files for your printers and make any additional PostScript fonts |
|
95 available. *Note Installation: (dvips)Installation. If you have |
3172
|
96 any color printers, see *Note Color device configuration: |
|
97 (dvips)Color device configuration. |
2999
|
98 |
|
99 10. The first time you run a DVI driver, a bunch of PK fonts will be |
3172
|
100 built by Metafont via `mktexpk' (and added to the filename |
2999
|
101 database). This will take some time. Don't be alarmed; they will |
|
102 created only this first time (unless something is wrong with your |
|
103 path definitions). |
|
104 |
3172
|
105 By default, `mktexpk' will create these fonts in a hierarchy under |
|
106 `/var/tmp/texfonts'; it simply assumes that `/var/tmp' exists and |
|
107 is globally writable. If you need a different arrangement, see |
|
108 *Note mktex configuration::. |
2999
|
109 |
3172
|
110 *Note mktex scripts::. |
2999
|
111 |
3172
|
112 11. For some simple tests, try `tex story \\bye' and `latex sample2e'. |
|
113 Then run `xdvi story' or `dvips sample2e' on the resulting DVI |
|
114 files to preview/print the documents. *Note Installation |
|
115 testing::. |
2999
|
116 |
|
117 Custom installation |
|
118 =================== |
|
119 |
|
120 Most sites need to modify the default installation procedure in some |
|
121 way, perhaps merely changing the prefix from `/usr/local', perhaps |
|
122 adding extra compiler or loader options to work around `configure' |
|
123 bugs. This section explains how to override default choices. For |
|
124 additional distribution-specific information: |
|
125 * `dviljk/INSTALL'. |
|
126 |
|
127 * *Note Installation: (dvips)Installation. |
|
128 |
|
129 * *Note Installation: (web2c)Installation. |
|
130 |
|
131 * `xdvik/INSTALL'. |
|
132 |
|
133 These instructions are for Unix systems. Other operating-system |
|
134 specific distributions have their own instructions. The code base |
|
135 itself supports Amiga, DOS, OS/2, and VMS. |
|
136 |
|
137 Following are the same steps as in the previous section (which |
|
138 describes the simplest installation), but with much more detail. |
|
139 |
|
140 Disk space |
|
141 ---------- |
|
142 |
|
143 Here is a table showing the disk space needed for each distribution |
|
144 (described in the next section). The `(totals)' line reflects the |
|
145 `texk' source distribution and `texmflib'; the individual distributions |
|
146 don't enter into it. Sizes are in megabytes. All numbers are |
|
147 approximate. |
|
148 |
3172
|
149 Distribution .tar.gz Unpacked Compiled Installed |
2999
|
150 dviljk .9 3.8 |
|
151 dvipsk .9 3.2 |
|
152 xdvik .7 2.5 |
|
153 web2c 1.3 5.0 |
|
154 web 1.9 6.5 - - |
|
155 texk 3.8 14.1 43.1 23.5 |
|
156 texmflib 3.8 15.0 - 15.0 |
|
157 (totals) 7.6 29.1 43.1 38.5 |
|
158 |
|
159 Kpathsea application distributions |
|
160 ---------------------------------- |
|
161 |
|
162 The archive `ftp://ftp.tug.org/tex/texk.tar.gz' contains all of the |
|
163 Kpathsea applications I maintain, and the library itself. For example, |
|
164 since NeXT does not generally support X11, you'd probably want to skip |
|
165 `xdvik' (or simply remove it after unpacking `texk.tar.gz'. If you are |
|
166 not interested in all of them, you can also retrieve them separately: |
|
167 |
|
168 `dviljk.tar.gz' |
|
169 DVI to PCL, for LaserJet printers. |
|
170 |
|
171 `dvipsk.tar.gz' |
|
172 DVI to PostScript, for previewers, printers, or PDF generation. |
|
173 |
|
174 `web2c.tar.gz' |
|
175 The software needed to compile TeX and friends. |
|
176 |
|
177 `web.tar.gz' |
|
178 The original WEB source files, also used in compilation. |
|
179 |
|
180 `xdvik.tar.gz' |
|
181 DVI previewing under the X window system. |
|
182 |
|
183 If you want to use the Babel LaTeX package for support of non-English |
|
184 typesetting, you may need to retrieve additional files. See the file |
|
185 `install.txt' in the Babel distribution. |
|
186 |
|
187 Changing search paths |
|
188 --------------------- |
|
189 |
|
190 If the search paths for your installation differ from the standard |
|
191 TeX directory structure (*note Introduction: (tds)Top.), edit the file |
3172
|
192 `kpathsea/texmf.in' as desired, before running `configure'. For |
2999
|
193 example, if you have all your fonts or macros in one big directory. |
|
194 |
3172
|
195 You may also wish to edit the file `mktex.cnf', either before or |
|
196 after installation, to control various aspects of `mktexpk' and |
|
197 friends. *Note mktex configuration::. |
2999
|
198 |
3172
|
199 You do not need to edit `texmf.in' to change the default top-level or |
|
200 other installation *directories* (only the paths). You can and should |
|
201 do that when you run `configure' (next step). |
2999
|
202 |
3172
|
203 You also do not need to edit `texmf.in' if you are willing to rely on |
|
204 `texmf.cnf' at runtime to define the paths, and let the compile-time |
|
205 default paths be incorrect. Usually there is no harm in doing this. |
2999
|
206 |
|
207 The section below explains default generation in more detail. |
|
208 |
|
209 Default path features |
|
210 ..................... |
|
211 |
|
212 The purpose of having all the different files described in the section |
|
213 above is to avoid having the same information in more than one place. If |
|
214 you change the installation directories or top-level prefix at |
|
215 `configure'-time, those changes will propagate through the whole |
3172
|
216 sequence. And if you change the default paths in `texmf.in', those |
2999
|
217 changes are propagated to the compile-time defaults. |
|
218 |
|
219 The Make definitions are all repeated in several Makefile's; but |
|
220 changing the top-level `Makefile' should suffice, as it passes down all |
|
221 the variable definitions, thus overriding the submakes. (The |
|
222 definitions are repeated so you can run Make in the subdirectories, if |
|
223 you should have occasion to.) |
|
224 |
|
225 By default, the bitmap font paths end with `/$MAKETEX_MODE', thus |
|
226 including the device name (usually a Metafont mode name such as |
|
227 `ljfour'). This distinguishes two different devices with the same |
|
228 resolution--a write/white from a write/black 300dpi printer, for |
|
229 example. |
|
230 |
|
231 However, since most sites don't have this complication, Kpathsea |
|
232 (specifically, the `kpse_init_prog' function in `kpathsea/proginit.c') |
|
233 has a special case: if the mode has not been explicitly set by the user |
|
234 (or in a configuration file), it sets `MAKETEX_MODE' to `/'. This |
|
235 makes the default PK path, for example, expand into `.../pk//', so |
|
236 fonts will be found even if there is no subdirectory for the mode (if |
|
237 you arranged things that way because your site has only one printer, |
|
238 for example) or if the program is mode-independent (e.g., `pktype'). |
|
239 |
3172
|
240 To make the paths independent of the mode, simply edit `texmf.in' |
2999
|
241 before installation, or the installed `texmf.cnf', and remove the |
|
242 `$MAKETEX_MODE'. |
|
243 |
3172
|
244 *Note mktex script arguments::, for how this interacts with `mktexpk'. |
2999
|
245 |
|
246 *Note TeX directory structure: TeX directory structure, for a |
|
247 description of the default arrangement of the input files that comprise |
|
248 the TeX system. The file `kpathsea/HIER' is a copy of that section. |
|
249 |
|
250 Default path generation |
|
251 ....................... |
|
252 |
|
253 This section describes how the default paths are constructed. |
|
254 |
|
255 You may wish to ignore the whole mess and simply edit `texmf.cnf' |
|
256 after it is installed, perhaps even copying it into place beforehand so |
|
257 you can complete the installation, if it seems necessary. |
|
258 |
|
259 To summarize the chain of events that go into defining the default |
|
260 paths: |
|
261 |
|
262 1. `configure' creates a `Makefile' from each `Makefile.in'. |
|
263 |
|
264 2. When Make runs in the `kpathsea' directory, it creates a file |
|
265 `texmf.sed' that substitutes the Make value of `$(var)' for a |
|
266 string `@var@'. The variables in question are the one that define |
|
267 the installation directories. |
|
268 |
|
269 3. `texmf.sed' (together with a little extra magic--see |
3172
|
270 `kpathsea/Makefile') is applied to `texmf.in' to generate |
2999
|
271 `texmf.cnf'. This is the file that will eventually be installed |
|
272 and used. |
|
273 |
|
274 4. The definitions in `texmf.cnf' are recast as C `#define''s in |
|
275 `paths.h'. These values will be the compile-time defaults; they |
|
276 are not used at runtime unless no `texmf.cnf' file can be found. |
|
277 |
|
278 (That's a lie: the compile-time defaults are what any extra :'s in |
|
279 `texmf.cnf' expand into; but the paths as distributed have no extra |
|
280 :'s, and there's no particular reason for them to.) |
|
281 |
|
282 Running `configure' |
|
283 ------------------- |
|
284 |
|
285 Run `sh configure OPTIONS' (in the top-level directory, the one |
|
286 containing `kpathsea/'), possibly using a shell other than `sh' (*note |
|
287 configure shells::.). |
|
288 |
|
289 `configure' adapts the source distribution to the present system via |
|
290 `#define''s in `*/c-auto.h', which are created from the corresponding |
3172
|
291 `c-auto.in'. It also creates a `Makefile' from the corresponding |
2999
|
292 `Makefile.in', doing `@VAR@' and `ac_include' substitutions). |
|
293 |
|
294 `configure' is the best place to control the configuration, |
|
295 compilation, and installed location of the software, either via |
|
296 command-line options, or by setting environment variables before |
3172
|
297 invoking it. For example, you can disable `mktexpk' by default with |
|
298 the option `--disable-mktexpk'. *Note configure options::. |
2999
|
299 |
|
300 `configure' shells |
|
301 .................. |
|
302 |
|
303 If you have Bash, the GNU shell, use it if `sh' runs into trouble |
|
304 (*note Top: (features)Top.). |
|
305 |
|
306 Most Bourne shell variants other than Bash cannot handle `configure' |
|
307 scripts as generated by GNU Autoconf (*note Introduction: |
|
308 (autoconf)Top.). Specifically: |
|
309 `ksh' |
|
310 The Korn shell may be installed as `/bin/sh' on AIX. `/bin/bsh' |
|
311 may serve instead. |
|
312 |
|
313 `ash' |
|
314 Ash is sometimes installed as `/bin/sh' on NetBSD, FreeBSD, and |
|
315 Linux systems. `/bin/bash' should be available. |
|
316 |
|
317 `Ultrix /bin/sh' |
|
318 `/bin/sh' under Ultrix is a DEC-grown shell that is notably |
|
319 deficient in many ways. `/bin/sh5' may be necessary. |
|
320 |
|
321 `configure' options |
|
322 ................... |
|
323 |
|
324 For a complete list of all `configure' options, run `configure |
3172
|
325 --help' or see *Note Running `configure' scripts: (autoconf)Invoking |
|
326 configure, (a copy is in the file `kpathsea/README.CONFIGURE'). The |
|
327 generic options are listed first in the `--help' output, and the |
2999
|
328 package-specific options come last. The environment variables |
|
329 `configure' pays attention to are listed below. |
|
330 |
|
331 Options particularly likely to be useful are `--prefix', `--datadir', |
3172
|
332 and the like; see *Note configure scenarios::. |
2999
|
333 |
|
334 This section gives pointers to descriptions of the `--with' and |
|
335 `--enable' options to `configure' that Kpathsea-using programs accept. |
|
336 |
3172
|
337 `--without-mktexmf-default' |
|
338 `--without-mktexpk-default' |
|
339 `--without-mktextfm-default' |
|
340 `--with-mktextex-default' |
|
341 Enable or disable the dynamic generation programs. *Note mktex |
2999
|
342 configuration::. |
|
343 |
|
344 `--enable-shared' |
|
345 Build Kpathsea as a shared library, and link against it. Also |
|
346 build the usual static library. *Note Shared library::. |
|
347 |
|
348 `--disable-static' |
3172
|
349 Build only the shared library. Implies `--enable-shared'. |
|
350 |
|
351 `--enable-maintainer-mode' |
|
352 Enables make targets that are useful for the maintainer and likely |
|
353 to be a pain for anyone else; the makefiles created when this |
|
354 option is enabled may not work at all for you. You have been |
|
355 warned. |
2999
|
356 |
|
357 `configure' environment |
|
358 ....................... |
|
359 |
|
360 `configure' uses the value of the following environment variables in |
|
361 determining your system's characteristics, and substitutes for them in |
|
362 Makefile's: |
|
363 |
|
364 `CC' |
|
365 The compiler to use: default is `gcc' if it's installed, otherwise |
|
366 `cc'. |
|
367 |
|
368 `CFLAGS' |
|
369 Options to give the compiler: default is `-g -O2' for `gcc', `-g' |
|
370 otherwise. `CFLAGS' comes after any other options. You may need |
|
371 to include `-w' here if your compilations commonly have useless |
|
372 warnings (e.g., `NULL redefined'), or `configure' may fail to |
|
373 detect the presence of header files (it takes the messages on |
|
374 standard error to mean the header file doesn't exist). |
|
375 |
|
376 `CPPFLAGS' |
|
377 Options to pass to the compiler preprocessor; this matters most for |
|
378 configuration, not the actual source compilation. The `configure' |
|
379 script often does only preprocessing (e.g., to check for the |
|
380 existence of #include files), and `CFLAGS' is not used for this. |
|
381 You may need to set this to something like |
|
382 `-I/usr/local/include/wwwhatever' if you have the libwww library |
|
383 installed for hyper-xdvik (see `xdvik/INSTALL'). |
|
384 |
|
385 `DEFS' |
|
386 Additional preprocessor options, but not used by `configure'. |
|
387 Provided for enabling or disabling program features, as documented |
|
388 in the various program-specific installation instructions. `DEFS' |
|
389 comes before any compiler options included by the distribution |
|
390 `Makefile's or by `configure'. |
|
391 |
|
392 `LDFLAGS' |
|
393 Additional options to give to the loader. `LDFLAGS' comes before |
|
394 any other linker options. |
|
395 |
|
396 `LIBS' |
|
397 Additional libraries to link with. |
|
398 |
|
399 `configure' scenarios |
|
400 ..................... |
|
401 |
|
402 Here are some common installation scenarios: |
|
403 |
|
404 * Including X support in Metafont. This is disabled by default, |
|
405 since many sites have no use for it, and it's a leading cause of |
|
406 configuration problems. |
|
407 configure --with-x-toolkit |
|
408 |
|
409 * Putting the binaries, TeX files, GNU info files, etc. into a single |
3172
|
410 TeX hierarchy, say `/texmf', requires overriding defaults in both |
2999
|
411 `configure' and `make': |
3172
|
412 configure --prefix=`/texmf' --datadir=`/texmf' |
|
413 make texmf=`/texmf' |
2999
|
414 |
|
415 * You can compile on multiple architectures simultaneously either by |
|
416 building symbolic link trees with the `lndir' script from the X11 |
|
417 distribution, or with the `--srcdir' option: |
|
418 configure --srcdir=SRCDIR |
|
419 |
|
420 * If you are installing binaries for multiple architectures into a |
|
421 single hierarchy, you will probably want to override the default |
|
422 `bin' and `lib' directories, something like this: |
|
423 configure --prefix=TEXMF --datadir=TEXMF \ |
|
424 --bindir=TEXMF/ARCH/bin --libdir=TEXMF/ARCH/lib |
|
425 make texmf=TEXMF |
|
426 (Unless you make provisions for architecture-specific files in |
|
427 other ways, e.g., with Depot or an automounter.) |
|
428 |
|
429 * To compile with optimization (to compile without debugging, remove |
|
430 the `-g'): |
|
431 env CFLAGS="-g -O" sh configure ... |
|
432 For a potential problem if you optimize, see *Note TeX or |
|
433 Metafont failing: TeX or Metafont failing. |
|
434 |
|
435 Shared library |
|
436 .............. |
|
437 |
|
438 You can compile Kpathsea as a shared library on a few systems, by |
|
439 specifying the option `--enable-shared' when you run `configure'. |
|
440 |
|
441 The main advantage in doing this is that the executables can then |
|
442 share the code, thus decreasing memory and disk space requirements. |
|
443 |
|
444 On some systems, you can record the location of shared libraries in a |
|
445 binary, usually by giving certain options to the linker. Then |
|
446 individual users do not need to set their system's environment variable |
|
447 (e.g., `LD_LIBRARY_PATH') to find shared libraries. If you want to do |
|
448 this, you will need to add the necessary options to `LDFLAGS' yourself; |
3172
|
449 for example, on Solaris, include something like `-R${prefix}/lib', on |
|
450 IRIX or Linux, use `-rpath${prefix}/lib'. (Unfortunately, making this |
|
451 happen by default is very difficult, because of interactions with an |
|
452 existing installed shared library.) |
2999
|
453 |
3172
|
454 Currently, shared library support is implemented only on Linux, SunOS |
|
455 4 (Solaris 1), SunOS 5 (Solaris 2), IRIX 5, and IRIX 6. If you're |
|
456 interested and willing in adding support for other systems, please see |
|
457 the `configure' mode in the `klibtool' script, especially the |
|
458 host-specific case statement around line 250. |
2999
|
459 |
|
460 Running `make' |
|
461 -------------- |
|
462 |
|
463 `make' (still in the top-level directory). This also creates the |
|
464 `texmf.cnf' and `paths.h' files that define the default search paths, |
|
465 and (by default) the `plain' and `latex' TeX formats. |
|
466 |
|
467 You can override directory names and other values at `make'-time. |
|
468 `make/paths.make' lists the variables most commonly reset. For |
|
469 example, `make default_texsizes=600' changes the list of fallback |
|
470 resolutions. |
|
471 |
|
472 You can also override each of `configure''s environment variables |
|
473 (*note configure environment::.). The Make variables have the same |
|
474 names. |
|
475 |
|
476 Finally, you can supply additional options via the following |
|
477 variables. (`configure' does not use these.) |
|
478 |
|
479 `XCPPFLAGS' |
|
480 `XDEFS' |
|
481 Preprocessor options. |
|
482 |
|
483 `XCFLAGS' |
|
484 Compiler options. |
|
485 |
|
486 `XLDFLAGS' |
|
487 Loader options (included at beginning of link commands). |
|
488 |
|
489 `XLOADLIBES' |
|
490 More loader options (included at end of link commands). |
|
491 |
|
492 `XMAKEARGS' |
|
493 Additional Make arguments passed to all sub-`make''s. You may need |
|
494 to include assignments to the other variables here via `XMAKEARGS'; |
|
495 for example: `make XMAKEARGS="CFLAGS=-O XDEFS=-DA4"'. |
|
496 |
|
497 It's generally a bad idea to use a different compiler (`CC') or |
|
498 libraries (`LIBS') for compilation than you did for configuration, |
|
499 since the values `configure' determined may then be incorrect. |
|
500 |
|
501 Adding compiler options to change the "universe" you are using |
|
502 (typically BSD vs. system V) is generally a cause of trouble. It's |
|
503 best to use the native environment, whatever that is; `configure' and |
|
504 the software usually adapt best to that. In particular, under Solaris |
|
505 2.x, you should not use the BSD-compatibility library (`libucb') or |
|
506 include files (`ucbinclude'). |
|
507 |
|
508 If you want to use the Babel LaTeX package for support of non-English |
|
509 typesetting, you need to modify some files before making the LaTeX |
|
510 format. See the file `install.txt' in the Babel distribution. |
|
511 |
|
512 Installing files |
|
513 ---------------- |
|
514 |
|
515 The basic command is the usual `make install'. For security issues, |
|
516 *note Security::.. |
|
517 |
|
518 The first time you install any manual in the GNU Info system, you |
|
519 should add a line (you choose where) to the file `dir' in your |
|
520 `$(infodir)' directory. Sample text for this is given near the top of |
|
521 the Texinfo source files (`kpathsea/kpathsea.texi', |
|
522 `dvipsk/dvips.texi', and `web2c/doc/web2c.texi'). If you have a recent |
|
523 version of the GNU Texinfo distribution installed |
3285
|
524 (`ftp://ftp.gnu.org/pub/gnu/texinfo/texinfo-3.9.tar.gz' or later), this |
2999
|
525 should happen automatically. |
|
526 |
|
527 On the offchance that this is your first Info installation, the `dir' |
|
528 file I use is included in the distribution as `etc/dir-example'. |
|
529 |
|
530 You may wish to use one of the following targets, especially if you |
|
531 are installing on multiple architectures: |
|
532 * `make install-exec' to install in architecture-dependent |
|
533 directories, i.e., ones that depend on the `$(exec_prefix)' Make |
|
534 variable. This includes links to binaries, libraries, etc., not |
|
535 just "executables". |
|
536 |
|
537 * `make install-data' to install in architecture-independent |
|
538 directories, such as documentation, configuration files, pool |
|
539 files, etc. |
|
540 |
|
541 If you use the Andrew File System, the normal path (e.g., PREFIX/bin) |
|
542 only gets you to a read-only copy of the files, and you must specify a |
|
543 different path for installation. The best way to do this is by setting |
|
544 the `prefix' variable on the `make' command line. The sequence becomes |
|
545 something like this: |
|
546 configure --prefix=/whatever |
|
547 make |
|
548 make install prefix=/afs/.SYSTEM.NAME/system/1.3/@sys/whatever |
|
549 With AFS, you will definitely want to use relative filenames in |
|
550 `ls-R' (*note Filename database::.), not absolute filenames. This is |
|
551 done by default, but check anyway. |
|
552 |
|
553 Cleaning up |
|
554 ----------- |
|
555 |
|
556 The basic command is `make distclean'. This removes all files created |
|
557 by the build. |
|
558 |
|
559 Alternatively, |
|
560 * `make mostlyclean' if you intend to compile on another |
3172
|
561 architecture. For Web2C, since the generated C files are portable, |
2999
|
562 they are not removed. If the `lex' vs. `flex' situation is going |
|
563 to be different on the next machine, `rm web2c/lex.yy.c'. |
|
564 |
|
565 * `make clean' to remove files created by compiling, but leave |
|
566 configuration files and Makefiles. |
|
567 |
|
568 * `make maintainer-clean' to remove everything that the Makefiles can |
|
569 rebuild. This is more than `distclean' removes, and you should |
|
570 only use it if you are thoroughly conversant with (and have the |
|
571 necessary versions of) Autoconf. |
|
572 |
|
573 * `make extraclean' to remove other junk, e.g., core files, log |
|
574 files, patch rejects. This is independent of the other `clean' |
|
575 targets. |
|
576 |
|
577 Filename database generation |
|
578 ---------------------------- |
|
579 |
|
580 You will probably want to set up a `cron' entry on the appropriate |
|
581 machine(s) to rebuild the filename database nightly or so, as in: |
3172
|
582 0 0 * * * cd TEXMF && /BINDIR/mktexlsr |
2999
|
583 *Note Filename database::. |
|
584 |
3172
|
585 Although the `mktex...' scripts make every effort to add newly-created |
|
586 files on the fly, it can't hurt to make sure you get a fresh version |
|
587 every so often. |
2999
|
588 |
3172
|
589 `mktex' scripts |
|
590 --------------- |
2999
|
591 |
|
592 If Kpathsea cannot otherwise find a file, for some file types it is |
|
593 configured by default to invoke an external program to create it |
3172
|
594 dynamically (*note mktex configuration::.). This is most useful for |
2999
|
595 fonts (bitmaps, TFM's, and arbitrarily-sizable Metafont sources such as |
3172
|
596 the Sauter and EC fonts), since any given document can use fonts never |
2999
|
597 before referenced. Trying to build all fonts in advance is therefore |
|
598 impractical, if not impossible. |
|
599 |
|
600 The script is passed the name of the file to create and possibly other |
|
601 arguments, as explained below. It must echo the full pathname of the |
|
602 file it created (and nothing else) to standard output; it can write |
|
603 diagnostics to standard error. |
|
604 |
3172
|
605 `mktex' configuration |
|
606 ..................... |
2999
|
607 |
|
608 The following file types can run an external program to create missing |
3172
|
609 files: `pk', `tfm', `mf', `tex'; the scripts are named `mktexpk', |
|
610 `mktextfm', `mktexmf', and `mktextex'. |
2999
|
611 |
|
612 In the absence of `configure' options specifying otherwise, |
3172
|
613 everything but `mktextex' will be enabled by default. The `configure' |
2999
|
614 options to change the defaults are: |
|
615 |
3172
|
616 --without-mktexmf-default |
|
617 --without-mktexpk-default |
|
618 --without-mktextfm-default |
|
619 --with-mktextex-default |
2999
|
620 |
|
621 The `configure' setting is overridden if the environment variable or |
3172
|
622 configuration file value named for the script is set; e.g., `MKTEXPK' |
|
623 (*note mktex script arguments::.). |
2999
|
624 |
3172
|
625 As distributed, all the scripts source a file `texmf/web2c/mktex.cnf' |
|
626 if it exists, so you can override various defaults. See `mktex.opt', |
|
627 for instance, which defines the default mode, resolution, some special |
|
628 directory names, etc. If you prefer not to change the distributed |
|
629 scripts, you can simply create `mktex.cnf' with the appropriate |
|
630 definitions (you do not need to create it if you have nothing to put in |
|
631 it). `mktex.cnf' has no special syntax; it's an arbitrary Bourne shell |
|
632 script. The distribution contains a sample `mktex.cnf' for you to copy |
|
633 and modify as you please (it is not installed anywhere). |
2999
|
634 |
|
635 In addition, you can configure a number of features with the |
|
636 `MT_FEATURES' variable, which you can define: |
3172
|
637 * in `mktex.opt', as just mentioned; |
2999
|
638 |
3172
|
639 * by editing the file `mktex.opt', either before `make install' (in |
|
640 the source hierarchy) or after (in the installed hierarchy); |
2999
|
641 |
|
642 * or in the environment. |
|
643 |
3172
|
644 If none of the options below are enabled, `mktexpk', `mktextfm', and |
|
645 `mktexmf' follow the following procedure to decide where fonts should |
|
646 be installed. Find the tree where the font's sources are, and test the |
|
647 permissions of the `fonts' directory of that tree to determine whether |
|
648 it is writable. If it is, put the files in the tree in appropriate |
|
649 locations. If it isn't writable, see whether the tree is a system tree |
|
650 (named in `SYSTEXMF'). If so, the `VARTEXFONTS' tree is used. In all |
|
651 other cases the working directory is used. |
|
652 |
|
653 The `appendonlydir' option is enabled by default. |
2999
|
654 |
|
655 `appendonlydir' |
3172
|
656 Tell `mktexdir' to create directories append-only, i.e., set their |
|
657 sticky bit (*note Mode Structure: (fileutils)Mode Structure.). |
|
658 This feature is silently ignored on non-Unix platforms (e.g. |
|
659 Windows/NT and MS-DOS) which don't support similar functionality. |
|
660 This feature is enabled by default. |
2999
|
661 |
|
662 `dosnames' |
|
663 Use 8.3 names; e.g., `dpi600/cmr10.pk' instead of `cmr10.600pk'. |
3172
|
664 Note that this feature only affects filenames that would otherwise |
|
665 clash with other TeX-related filenames; `mktex' scripts do nothing |
|
666 about filenames which exceed the 8+3 MS-DOS limits but remain |
|
667 unique when truncated (by the OS) to these limits, and nether do |
|
668 the scripts care about possible clashes with files which aren't |
|
669 related with TeX. For example, `cmr10.600pk' would clash with |
|
670 `cmr10.600gf' and is therefore changed when `dosnames' is in |
|
671 effect, but `mf.pool' and `mp.base' don't clash with any |
|
672 TeX-related files and are therefore unchanged. |
|
673 |
|
674 This feature is turned on by default on MS-DOS. If you do not wish |
|
675 `dosnames' to be set on an MS-DOS platform, you need to set the |
|
676 `MT_FEATURES' environment variable to a value that doesn't include |
|
677 `dosnames'. You can also change the default setting by editing |
|
678 `mktex.opt', but only if you use the `mktex' shell scripts; the |
|
679 emulation programs don't consult `mktex.opt'. |
|
680 |
|
681 `fontmaps' |
|
682 Instead of deriving the location of a font in the destination tree |
|
683 from the location of the sources, the aliases and directory names |
|
684 from the Fontname distribution are used. (*note Introduction: |
|
685 (fontname)Top.). |
2999
|
686 |
|
687 `nomode' |
|
688 Omit the directory level for the mode name; this is fine as long as |
|
689 you generate fonts for only one mode. |
|
690 |
3172
|
691 `stripsupplier' |
|
692 Omit the font supplier name directory level. |
|
693 |
|
694 `striptypeface' |
|
695 Omit the font typeface name directory level. |
|
696 |
2999
|
697 `strip' |
3172
|
698 Omit the font supplier and typeface name directory levels. This |
|
699 feature is deprecated in favour of `stripsupplier' and |
|
700 `striptypeface'. |
2999
|
701 |
|
702 `varfonts' |
3172
|
703 When this option is enabled, fonts that would otherwise be written |
|
704 in system texmf tree go to the `VARTEXFONTS' tree instead. The |
|
705 default value in `kpathsea/Makefile.in' is `/var/tmp/texfonts'. |
|
706 The `Linux File System Standard' recommends `/var/tex/fonts'. |
2999
|
707 |
|
708 The `varfonts' setting in `MT_FEATURES' is overridden by the |
|
709 `USE_VARTEXFONTS' environment variable: if set to `1', the feature |
|
710 is enabled, and if set to `0', the feature is disabled. |
|
711 |
3172
|
712 `mktex' script names |
|
713 .................... |
2999
|
714 |
|
715 The following table shows the default name of the script for each |
|
716 possible file types. (The source is the variable `kpse_make_specs' in |
|
717 `kpathsea/tex-make.c'.) |
|
718 |
3172
|
719 `mktexpk' |
2999
|
720 Glyph fonts. |
|
721 |
3172
|
722 `mktextex' |
2999
|
723 TeX input files. |
|
724 |
3172
|
725 `mktexmf' |
2999
|
726 Metafont input files. |
|
727 |
3172
|
728 `mktextfm' |
2999
|
729 TFM files. |
|
730 |
|
731 These names are overridden by an environment variable specific to the |
|
732 program--for example, `DVIPSMAKEPK' for Dvipsk. |
|
733 |
3172
|
734 If a `mktex...' script fails, the invocation is appended to a file |
2999
|
735 `missfont.log' (by default) in the current directory. You can then |
|
736 execute the log file to create the missing files after fixing the |
|
737 problem. |
|
738 |
|
739 If the current directory is not writable and the environment variable |
|
740 or configuration file value `TEXMFOUTPUT' is set, its value is used. |
|
741 Otherwise, nothing is written. The name `missfont.log' is overridden |
|
742 by the `MISSFONT_LOG' environment variable or configuration file value. |
|
743 |
3172
|
744 `mktex' script arguments |
|
745 ........................ |
2999
|
746 |
3172
|
747 The first argument to a `mktex' script is always the name of the file |
|
748 to be created. |
2999
|
749 |
3172
|
750 In the default `mktexpk' implementation, additional arguments may |
|
751 also be passed: |
2999
|
752 |
3172
|
753 `--dpi NUM' |
|
754 Sets the resolution of the generated font to NUM. |
2999
|
755 |
3172
|
756 `--mfmode NAME' |
|
757 Sets the Metafont mode to NAME. |
2999
|
758 |
3172
|
759 `--bdpi NUM' |
|
760 Sets the the "base dpi" for the font. This must match the mode |
|
761 being used. |
2999
|
762 |
3172
|
763 `--mag STRING' |
|
764 A "magstep" string suitable for the Metafont `mag' variable. This |
|
765 must match the combination of BDPI and DPI being used. |
2999
|
766 |
3172
|
767 `--destdir STRING' |
|
768 A directory name. If the directory is absolute, it is used as-is. |
|
769 Otherwise, it is appended to the root destination directory set in |
|
770 the script. |
2999
|
771 |
|
772 Installation testing |
|
773 -------------------- |
|
774 |
|
775 Besides the tests listed in *Note Simple installation::, you can try |
|
776 running `make check'. This includes the torture tests (trip, trap, and |
3172
|
777 mptrap) that come with Web2c (*note Triptrap: (web2c)Triptrap.). |
2999
|
778 |
|
779 Security |
|
780 ======== |
|
781 |
|
782 None of the programs in the TeX system require any special system |
|
783 privileges, so there's no first-level security concern of people gaining |
|
784 illegitimate root access. |
|
785 |
|
786 A TeX document, however, can write to arbitrary files, e.g., |
|
787 `~/.rhosts', and thus an unwitting user who runs TeX on a random |
|
788 document is vulnerable to a trojan horse attack. This loophole is |
|
789 closed by default, but you can be permissive if you so desire in |
|
790 `texmf.cnf'. *Note tex invocation: (web2c)tex invocation. MetaPost has |
|
791 the same issue. |
|
792 |
|
793 Dvips, Xdvi, and TeX can also execute shell commands under some |
|
794 circumstances. To disable this, see the `-R' option in *Note Option |
|
795 details: (dvips)Option details, the xdvi man page, and *Note tex |
|
796 invocation: (web2c)tex invocation, respectively. |
|
797 |
|
798 Another security issue arises because it's very useful--almost |
3172
|
799 necessary--to make arbitrary fonts on user demand with `mktexpk' and |
2999
|
800 friends. Where do these files get installed? By default, the |
3172
|
801 `mktexpk' distributed with Kpathsea assumes a world-writable `/var/tmp' |
|
802 directory; this is a simple and convenient approach, but it may not |
|
803 suit your situation because it means that a local cache of fonts is |
|
804 created on every machine. |
|
805 |
|
806 To avoid this duplication, many people consider a shared, globally |
|
807 writable font tree desirable, in spite of the potential security |
|
808 problems. To do this you should change the value of `VARTEXFONTS' in |
|
809 `texmf.cnf' to refer to some globally known directory. *Note mktex |
|
810 configuration::. |
2999
|
811 |
|
812 The first restriction you can apply is to make newly-created |
3172
|
813 directories under `texmf' be append-only with an option in `mktex.cnf'. |
|
814 *Note mktex configuration::. |
2999
|
815 |
|
816 Another approach is to establish a group (or user) for TeX files, |
|
817 make the `texmf' tree writable only to that group (or user), and make |
3172
|
818 `mktexpk' et al. setgid to that group (or setuid to that user). Then |
2999
|
819 users must invoke the scripts to install things. (If you're worried |
|
820 about the inevitable security holes in scripts, then you could write a |
|
821 C wrapper to exec the script.) |
|
822 |
3172
|
823 The `mktex...' scripts install files with the same read and write |
|
824 permissions as the directory they are installed in. The executable, |
|
825 sgid, suid, and sticky bits are always cleared. |
2999
|
826 |
3172
|
827 Any directories created by the `mktex...' scripts have the same |
|
828 permissions as their parent directory, unless the `appendonlydir' |
|
829 feature is used, in which case the sticky bit is always set. |
|
830 |