# This file makes TeX in its various incarnations.
#
# The file ../common/texmf.h uses the symbol `TeX' to define certain
# things that are different for TeX and Metafont, hence the addition to
# CFLAGS.
# Routines used in both TeX and Metafont.
#
extrac=../common/texmf.c
extrah=../common/texmf.h ../common/endian.h
extrao=texmf.o
# Routines used in TeX, Metafont, and BibTeX.
#
fileioc=../common/fileio.c
fileioh=../common/fileio.h
fileioo=fileio.o
# We don't add `$(commono)' here, since it doesn't depend on anything in
# this directory, and we write a dependency for `$(objs)' below.
#
objs=$(fileioo) tex0.o tex1.o tex2.o tex3.o tex4.o tex5.o tex6.o tex7.o tex8.o tex9.o
iobjs=iextra.o initex.o $(objs)
vobjs=tex-extra.o itex.o $(objs)
etex.fmt: tex.fmt
touch eplain.aux # Makes cross-reference warnings work right.
./initex \&./tex eplain \\dump
mv eplain.fmt etex.fmt
mv eplain.log etex.log
# Until LaTeX and SLiTeX are updated, we must use a hacked version, that
# sets the new parameters to reasonable values.
#
latex.fmt:
./initex lplain \\dump
mv lplain.fmt latex.fmt
mv lplain.log latex.log
# texinfo changes the escape character from `\' to `@'.
#
texinfo.fmt: tex.fmt
./initex \&./tex texinfo @dump
# The `ini_to_trip' script changes texd.h, instead of the change file, so
# retangling is not necessary. After changing constants, making a
# triptex means making an initex.
#
triptex: stamp-trip $(iobjs) $(commono)
make $(makeargs) initex
mv initex triptex
# The convert script produces tex[0-8].c, itex.c, coerce.h, and texd.h.
# The (hand-coded) memory.h is included in one of tex?.c files; it isn't
# really necessary to `convert' again if it changes, only to recompile
# those files, but describing that relationship is ugly to do.
# (Furthermore, memory.h is stable.)
#
stamp-convert: tex.p memory.h fixcoerce.h $(commondefines)
$(SHELL) ./convert
touch stamp-convert
# The (hand-coded) file $(extrac) and the (generated) file itex.c have
# #ifdefs for INITEX, so we compile them differently.
#
iextra.o: $(extrac) texd.h $(extrah) $(commonh)
$(CC) $(CFLAGS) -I. -DINITEX -DINI -c $(extrac)
mv $(extrao) iextra.o