Here is the installed TeX & Metafont hierarchy (as of 31dec93) that
we have been working on.  Please send comments to mackay@cs.washington.edu,
elisabet@u.washington.edu, and kb@cs.umb.edu.
(Especially if you try to actually install TeX like this!)

First, pick a root directory for the library files:
TEXMFROOT = /usr/local/lib/texmf

(Or, in make variable terms: $(datadir)/texmf.)

All the files are installed relative to $TEXMFROOT.  Top-level directories:
bibtex		-- see below
fonts 		   for these
tex		   three
mf		-- utility MF sources
                   ({plain, expr, null, io, slant, modes, ...}.mf)
formats		-- .base and .fmt (is there a better name than `formats'?)
pool		-- tex.pool and mf.pool
dvips		-- only if you want it, naturally
(Maybe pool and formats should be combined into `sys' or something?)

In general, where possible, the same setup as ctan is clearly a win.

Under bibtex:
bib	(xampl.bib & some of Nelson's bib files)
bst	(at least standard and semi-standard)
doc	(btxbst.doc, btxdoc.*, btxhak.tex)

Under dvips, have the .pro/.ps/psfonts.map files.

Under tex, at least:
plain	({plain, manmac, null, plain, story, testfont, webmac}.tex,
	 perhaps also texinfo.tex, eplain.tex, other single-file sources)
latex	(with subdirectories base/ for M&S's files, and contrib/ for
	 other people's styles)
tugboat	(tugboat.cmn, tugboat.sty, etc.)
mft	(*.mft)

Also under tex/ would go many other things:
dvips	(rotate.tex, epsf.sty, etc.)
texdraw
musictex
...

Having a whole separate tree for the utility MF sources seems pointless,
since there are so few of them. Most .mf files go under fonts/.


Under fonts:
<source>/<typeface>/
  for <source> in public, adobe, ams, bitstream, urw, ...
  for public/<typeface> in cm, concrete, punk, ...
  for ams/<typeface> in euler, msym, ...
  for adobe/<typeface> in times, palatino, avantgarde, ...

Under .../<source>/<typeface>/
src/*.mf
tfm/*.tfm
vf/*.vf
afm/*.afm
pk/<mode> (including pseudo-modes for gsrenderfont, pstopk, gsfrenderfont)
type1/*.{pfa,pfb,gsf}
truetype/whatever

For example:
/usr/local/lib/texmf/fonts/public/cm/pk/cx/cmr10.300pk
/usr/local/lib/texmf/fonts/public/sauter/src/b-cmbx.mf
/usr/local/lib/texmf/fonts/adobe/utopia/type1/putr.pfa

All filenames within the tree must be unique.
I don't see any way around this.


Here are default variable values that go with the above:

TEXMFROOT = /usr/local/lib/texmf

BIBINPUTS = $TEXMFROOT/bibtex/bib
BSTINPUTS = $TEXMFROOT/bibtex/bst

TEXFORMATS = $TEXMFROOT/formats
MFBASES    = $TEXMFROOT/formats

TEXPOOL = $TEXMFROOT/pool
MFPOOL  = $TEXMFROOT/pool

# An assumption here that all MF fonts are under `public'; this is true
# as of today ...
MFINPUTS  = .:$TEXMFROOT/mf:$TEXMFROOT/fonts/public//src//
TEXINPUTS = .:$TEXMFROOT/tex//

TFMFONTS = .:$TEXMFROOT/fonts//tfm
VFFONTS = .:$TEXMFROOT/fonts//vf
PKFONTS = .:$TEXMFROOT/fonts//pk//
