summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-03-19 13:59:30 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-03-19 13:59:30 +0000
commit0b7b2c69ec83497d9accab064da0f4ad07662d42 (patch)
treee8f22a2acecbf3035850f56beb1c8161c53cdf2d /Build/source/texk/web2c
parentee507bbd1fc483c58acb33cca25509a4dd81df9b (diff)
prepare for new build system
git-svn-id: svn://tug.org/texlive/trunk@12429 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/Makefile.in.orig1144
-rw-r--r--Build/source/texk/web2c/ac/web2c.ac62
-rw-r--r--Build/source/texk/web2c/ac/withenable.ac4
-rw-r--r--Build/source/texk/web2c/alephdir/am/aleph.am102
-rw-r--r--Build/source/texk/web2c/am/bootstrap.am110
-rw-r--r--Build/source/texk/web2c/am/cweb.am30
-rw-r--r--Build/source/texk/web2c/am/texmf.am108
-rw-r--r--Build/source/texk/web2c/am/web.am166
-rw-r--r--Build/source/texk/web2c/cftests/cftest.ch7
-rw-r--r--Build/source/texk/web2c/cftests/cftest.p2
-rw-r--r--Build/source/texk/web2c/cftests/cftest.web15
-rw-r--r--Build/source/texk/web2c/cftests/lcftest.p2
-rw-r--r--Build/source/texk/web2c/cftests/ocftest.p2
-rw-r--r--Build/source/texk/web2c/configure.in.orig502
-rw-r--r--Build/source/texk/web2c/doc/Makefile.in.orig64
-rw-r--r--Build/source/texk/web2c/etexdir/am/etex.am77
-rw-r--r--Build/source/texk/web2c/luatexdir/am/luatex.am564
-rw-r--r--Build/source/texk/web2c/mpdir/Makefile.in.orig41
-rw-r--r--Build/source/texk/web2c/mpdir/am/mp.am59
-rw-r--r--Build/source/texk/web2c/mpware/Makefile.in.orig63
-rw-r--r--Build/source/texk/web2c/omegadir/am/omega.am88
-rw-r--r--Build/source/texk/web2c/omegafonts/Makefile.in.orig73
-rw-r--r--Build/source/texk/web2c/omegaware/am/omegaware.am106
-rwxr-xr-xBuild/source/texk/web2c/omegaware/otangle.test7
-rw-r--r--Build/source/texk/web2c/otps/Makefile.in.orig53
-rw-r--r--Build/source/texk/web2c/pdftexdir/Makefile.in.orig71
-rw-r--r--Build/source/texk/web2c/pdftexdir/am/pdftex.am163
-rw-r--r--Build/source/texk/web2c/synctexdir/am/synctex.am172
-rw-r--r--Build/source/texk/web2c/synctexdir/am/synctex.mk42
-rwxr-xr-xBuild/source/texk/web2c/tiedir/tie.test12
-rw-r--r--Build/source/texk/web2c/web2c/native/config.h119
-rw-r--r--Build/source/texk/web2c/web2c/native/kpathsea/c-auto.in181
-rw-r--r--Build/source/texk/web2c/xetexdir/am/xetex.am71
33 files changed, 4282 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/Makefile.in.orig b/Build/source/texk/web2c/Makefile.in.orig
new file mode 100644
index 00000000000..3ac474b9c7a
--- /dev/null
+++ b/Build/source/texk/web2c/Makefile.in.orig
@@ -0,0 +1,1144 @@
+# $Id$
+# @configure_input@
+# Makefile for web2c --kb@mail.tug.org. Public domain.
+version = @WEB2CVERSION@
+
+# This makefile uses static rules with many targets (to be compatible to
+# non-gnu make) and will not work correctly when parallelized.
+# So we switch off parallel makes with gnu make.
+.NOTPARALLEL:
+
+# These lines define the memory dumps that fmts/bases/mems will make and
+# install-fmts/install-bases/install-mems will install.
+# See the Formats node in doc/web2c.texi for more details.
+fmts = olatex.fmt # amstex.fmt eplain.fmt texinfo.fmt
+efmts = latex.fmt
+pdffmts = pdfolatex.fmt
+pdfefmts = pdflatex.fmt
+afmts = lamed.fmt
+ofmts = lambda.fmt
+eofmts = elambda.fmt
+bases = # no good reason to build cmmf.base.
+mems = # mfplain.mem is probably not generally useful.
+
+# The name of the file that defines your local devices for Metafont.
+# (Only relevant during `make bases'.) I recommend `modes.mf', which
+# defines all known modes, plus useful definitions for all fonts. It's
+# available from ftp://ftp.tug.org/tex/modes.mf, among other places.
+localmodes = modes
+
+kpse_include ../make/paths.mk
+
+# Used for triptrap.
+DIFF = diff
+DIFFFLAGS =
+
+.SUFFIXES: # get rid of .p.o
+kpse_include ../make/common.mk
+kpse_include ../make/programs.mk
+
+XCPPFLAGS = $(PDFXCPPFLAGS)
+
+CXX = @CXX@
+CXXLD = $(CXX)
+cxx_link_command = $(CXXLD) -o $@ $(LDFLAGS)
+kpathsea_cxx_link = $(LIBTOOL) --mode=link $(cxx_link_command)
+
+@MAINT@ifeq ($(CC), gcc)
+@MAINT@XDEFS = -Wimplicit -Wreturn-type -Wcomment -Wformat
+@MAINT@endif
+
+# Make `#include <X11/...>' and `-lX...' work.
+# This matches xdvik.
+# wlibs is substituted by web2c's configure, LIBS by general configure
+# routines, and the others by AC_PATH_XTRA.
+# All the x_... variables will be empty if we aren't supporting X.
+x_cppflags = @X_CFLAGS@
+x_ldflags = @X_LIBS@
+x_pre_libs = @X_PRE_LIBS@
+x_extra_libs = @X_EXTRA_LIBS@
+x_tool_libs = @x_tool_libs@
+x_ext_lib = @x_ext_lib@
+wlibs = @wlibs@
+# Follow the library order used in X11R6 itself:
+# -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 (some may not be present).
+windowlink = $(windowlib) $(x_ldflags) $(x_tool_libs) $(x_pre_libs) $(x_ext_lib) $(wlibs) $(x_extra_libs)
+
+# With --enable-ipc, TeX may need to link with -lsocket.
+socketlibs = @socketlibs@
+
+common_makeargs = $(MFLAGS) CC='$(CC)' CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' $(XMAKEARGS)
+window_makeargs = x_cppflags='$(x_cppflags)' $(common_makeargs)
+install_makeargs = $(makevars) $(common_makeargs)
+
+proglib = lib/lib.a
+windowlib = window/window.a
+
+#
+# The sh script that does the conversion. The "." is the directory with
+# native tools; we don't attempt cross-compiling a la luatex. The
+# $(native) variable is used in luatex.mk.
+native = .
+web2c = srcdir=$(srcdir) $(SHELL) $(srcdir)/web2c/convert $(native)
+
+# We put this in the web2c directory for lack of a better place, but it
+# is separate from (and simpler than) the actual web-to-C conversion programs.
+makecpool = $(native)/web2c/makecpool
+
+# Additional dependencies:
+web2c_common = web2c/convert web2c/common.defines
+web2c_programs = web2c/fixwrites web2c/splitup web2c/web2c $(makecpool)
+web2c_texmf = $(web2c_common) $(web2c_programs) \
+ web2c/texmf.defines web2c/coerce.h
+
+# The helper programs:
+TANGLEBOOT = @TANGLEBOOT@
+CTANGLEBOOT = @CTANGLEBOOT@
+TANGLE = @TANGLE@
+CTANGLE = @CTANGLE@
+TIE = @TIE@
+
+# Calling tangle
+tangle = WEBINPUTS=.:$(srcdir) $(TANGLE)
+ctangle = $(CTANGLE)
+tie = $(TIE)
+
+# The environment for making dumps.
+# No need to specify TEXMF, as ../kpathsea/texmf.cnf should contain
+# suitable absolute paths at this point. Those are converted to
+# SELFAUTO* paths on installation.
+dumpenv = TEXMFCNF=../kpathsea
+
+# Unfortunately, suffix rules can't have dependencies, or multiple
+# targets, and we can't assume all makes supports pattern rules.
+#.SUFFIXES: .p .c .ch .p
+#.p.c: # really depends on $(web2c_programs), and generates .h.
+# $(web2c) $*
+#.ch.p: # really depends on tangle; for mf/mp/tex, also generates .pool
+# ./tangle $(srcdir)/$*.web $<
+
+# These definitions have to come before the rules that expand them.
+# The *{ini,[0-2]}.c files are created by splitup, run as part of convert.
+# {mf,mp,tex}extra.c are created from lib/texmfmp.c, below.
+
+# Prevent Make from deleting the intermediate forms.
+.PRECIOUS: %.ch %.p %.c
+
+tex = tex
+mf = mf
+@MFN@mfn = mf-nowin
+#
+default all: programs manpages doc/web2c.info @FMU@
+check: dumps
+
+bibtex: bibtex.o
+ $(kpathsea_link) bibtex.o $(LOADLIBES)
+bibtex.c bibtex.h: $(web2c_common) $(web2c_programs) web2c/cvtbib.sed bibtex.p
+ $(web2c) bibtex
+bibtex.p: tangle bibtex.web bibtex.ch
+ $(tangle) bibtex bibtex
+check: bibtex-check
+bibtex-check: bibtex
+ test -f tests/exampl.aux || \
+ cp $(srcdir)/tests/exampl.aux tests/exampl.aux
+ TEXMFCNF=../kpathsea \
+ BSTINPUTS=$(srcdir)/tests \
+ BIBINPUTS=$(srcdir)/tests \
+ ./bibtex tests/exampl
+clean:: bibtex-clean
+bibtex-clean:
+ $(LIBTOOL) --mode=clean rm -f bibtex
+ rm -f bibtex.o bibtex.c bibtex.h bibtex.p
+ rm -f tests/exampl.blg tests/exampl.bbl
+
+ctie: ctie.o
+ $(kpathsea_link) ctie.o $(LOADLIBES)
+ctie.c: ctangle ctiedir/ctie.w ctiedir/ctie-k.ch
+ CWEBINPUTS=$(srcdir)/ctiedir $(ctangle) ctie.w ctie-k.ch
+clean:: ctie-clean
+ctie-clean:
+ $(LIBTOOL) --mode=clean rm -f ctie
+ rm -f ctie.o ctie.c
+
+cweave: cweave.o cweb.o
+ $(kpathsea_link) cweave.o cweb.o $(LOADLIBES)
+cweave.c: ctangle cwebdir/cweave.w cwebdir/cweav-w2c.ch
+ CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) cweave cweav-w2c
+check: cweave-check
+cweave-check: cweave
+ CWEBINPUTS=$(srcdir)/cwebdir ./cweave common.w
+clean:: cweave-clean
+cweave-clean:
+ $(LIBTOOL) --mode=clean rm -f cweave
+ rm -f cweave.o cweave.c
+ rm -f common.tex common.scn common.idx
+
+dvicopy: dvicopy.o
+ $(kpathsea_link) dvicopy.o $(LOADLIBES)
+dvicopy.c dvicopy.h: $(web2c_common) $(web2c_programs) dvicopy.p
+ $(web2c) dvicopy
+dvicopy.p: tangle dvicopy.web dvicopy.ch
+ $(tangle) dvicopy dvicopy
+check: dvicopy-check
+dvicopy-check: dvicopy
+ TEXMFCNF=../kpathsea \
+ ./dvicopy $(srcdir)/tests/story tests/xstory.dvi
+# Redirect stderr so the terminal output will end up in the log file.
+ (TFMFONTS=$(srcdir)/tests VFFONTS=$(srcdir)/tests ./dvicopy \
+ <$(srcdir)/tests/pplr.dvi \
+ >tests/xpplr.dvi) 2>&1
+clean:: dvicopy-clean
+dvicopy-clean:
+ $(LIBTOOL) --mode=clean rm -f dvicopy
+ rm -f dvicopy.o dvicopy.c dvicopy.h dvicopy.p
+ rm -f tests/xstory.dvi tests/xpplr.dvi
+
+## dvitomp is a special case
+kpse_include dvitomp.mk
+##
+
+dvitype: dvitype.o
+ $(kpathsea_link) dvitype.o $(LOADLIBES)
+dvitype.c dvitype.h: $(web2c_common) $(web2c_programs) dvitype.p
+ $(web2c) dvitype
+dvitype.p: tangle dvitype.web dvitype.ch
+ $(tangle) dvitype dvitype
+check: dvitype-check
+dvitype-check: dvitype
+ ./dvitype -show-opcodes $(srcdir)/tests/story >tests/xstory.dvityp
+ ./dvitype --p=\*.\*.2 $(srcdir)/tests/pagenum.dvi >tests/xpagenum.typ
+clean:: dvitype-clean
+dvitype-clean:
+ $(LIBTOOL) --mode=clean rm -f dvitype
+ rm -f dvitype.o dvitype.c dvitype.h dvitype.p
+ rm -f tests/xstory.dvityp tests/xpagenum.typ
+
+gftodvi: gftodvi.o
+ $(kpathsea_link) gftodvi.o $(LOADLIBES)
+gftodvi.c gftodvi.h: $(web2c_common) $(web2c_programs) gftodvi.p
+ $(web2c) gftodvi
+gftodvi.p: tangle gftodvi.web gftodvi.ch
+ $(tangle) gftodvi gftodvi
+check: gftodvi-check
+gftodvi-check: gftodvi
+ TFMFONTS=$(srcdir)/tests ./gftodvi -verbose \
+ $(srcdir)/tests/cmr10.600gf
+ mv cmr10.dvi tests/xcmr10.dvi
+clean:: gftodvi-clean
+gftodvi-clean:
+ $(LIBTOOL) --mode=clean rm -f gftodvi
+ rm -f gftodvi.o gftodvi.c gftodvi.h gftodvi.p
+ rm -f tests/xcmr10.dvi
+
+gftopk: gftopk.o
+ $(kpathsea_link) gftopk.o $(LOADLIBES)
+gftopk.c gftopk.h: $(web2c_common) $(web2c_programs) gftopk.p
+ $(web2c) gftopk
+gftopk.p: tangle gftopk.web gftopk.ch
+ $(tangle) gftopk gftopk
+check: gftopk-check
+gftopk-check: gftopk
+ ./gftopk -verbose $(srcdir)/tests/cmr10.600gf tests/xcmr10.pk
+ ./gftopk $(srcdir)/tests/cmr10.600gf cmr10.pk && rm cmr10.pk
+clean:: gftopk-clean
+gftopk-clean:
+ $(LIBTOOL) --mode=clean rm -f gftopk
+ rm -f gftopk.o gftopk.c gftopk.h gftopk.p
+ rm -f tests/xcmr10.pk
+
+gftype: gftype.o
+ $(kpathsea_link) gftype.o $(LOADLIBES)
+gftype.c gftype.h: $(web2c_common) $(web2c_programs) gftype.p
+ $(web2c) gftype
+gftype.p: tangle gftype.web gftype.ch
+ $(tangle) gftype gftype
+check: gftype-check
+gftype-check: gftype
+ ./gftype $(srcdir)/tests/cmr10.600gf >tests/xcmr10.gft1
+ ./gftype -m -i $(srcdir)/tests/cmr10.600gf >tests/xcmr10.gft2
+clean:: gftype-clean
+gftype-clean:
+ $(LIBTOOL) --mode=clean rm -f gftype
+ rm -f gftype.o gftype.c gftype.h gftype.p
+ rm -f tests/xcmr10.gft1 tests/xcmr10.gft2
+
+mft: mft.o
+ $(kpathsea_link) mft.o $(LOADLIBES)
+mft.c mft.h: $(web2c_common) $(web2c_programs) mft.p
+ $(web2c) mft
+mft.p: tangle mft.web mft.ch
+ $(tangle) mft mft
+check: mft-check
+mft-check: mft
+ ./mft $(srcdir)/tests/io; mv io.tex tests/io.tex
+clean:: mft-clean
+mft-clean:
+ $(LIBTOOL) --mode=clean rm -f mft
+ rm -f mft.o mft.c mft.h mft.p
+ rm -f tests/io.tex
+
+patgen: patgen.o
+ $(kpathsea_link) patgen.o $(LOADLIBES)
+patgen.c patgen.h: $(web2c_common) $(web2c_programs) patgen.p
+ $(web2c) patgen
+patgen.p: tangle patgen.web patgen.ch
+ $(tangle) patgen patgen
+check: patgen-check
+patgen-check: patgen
+ ./patgen $(srcdir)/tests/dict $(srcdir)/tests/patterns tests/xpatout \
+ $(srcdir)/tests/translate <$(srcdir)/tests/patgen.in
+clean:: patgen-clean
+patgen-clean:
+ $(LIBTOOL) --mode=clean rm -f patgen
+ rm -f patgen.o patgen.c patgen.h patgen.p
+ rm -f tests/xpatout pattmp.4
+
+pktogf: pktogf.o
+ $(kpathsea_link) pktogf.o $(LOADLIBES)
+pktogf.c pktogf.h: $(web2c_common) $(web2c_programs) pktogf.p
+ $(web2c) pktogf
+pktogf.p: tangle pktogf.web pktogf.ch
+ $(tangle) pktogf pktogf
+check: pktogf-check
+pktogf-check: pktogf
+ ./pktogf -verbose $(srcdir)/tests/cmr10.pk tests/xcmr10.600gf
+ ./pktogf $(srcdir)/tests/cmr10.pk && rm cmr10.gf
+clean:: pktogf-clean
+pktogf-clean:
+ $(LIBTOOL) --mode=clean rm -f pktogf
+ rm -f pktogf.o pktogf.c pktogf.h pktogf.p
+ rm -f tests/xcmr10.600gf
+
+pktype: pktype.o
+ $(kpathsea_link) pktype.o $(LOADLIBES)
+pktype.c pktype.h: $(web2c_common) $(web2c_programs) pktype.p
+ $(web2c) pktype
+pktype.p: tangle pktype.web pktype.ch
+ $(tangle) pktype pktype
+check: pktype-check
+pktype-check: pktype
+ ./pktype $(srcdir)/tests/cmr10.pk >tests/xcmr10.pktyp
+clean:: pktype-clean
+pktype-clean:
+ $(LIBTOOL) --mode=clean rm -f pktype
+ rm -f pktype.o pktype.c pktype.h pktype.p
+ rm -f tests/xcmr10.pktyp
+
+pltotf: pltotf.o
+ $(kpathsea_link) pltotf.o $(LOADLIBES)
+pltotf.c pltotf.h: $(web2c_common) $(web2c_programs) pltotf.p
+ $(web2c) pltotf
+pltotf.p: tangle pltotf.web pltotf.ch
+ $(tangle) pltotf pltotf
+check: pltotf-check
+pltotf-check: pltotf
+ ./pltotf -verbose $(srcdir)/tests/cmr10 tests/xcmr10
+clean:: pltotf-clean
+pltotf-clean:
+ $(LIBTOOL) --mode=clean rm -f pltotf
+ rm -f pltotf.o pltotf.c pltotf.h pltotf.p
+ rm -f tests/xcmr10.tfm
+
+pooltype: pooltype.o
+ $(kpathsea_link) pooltype.o $(LOADLIBES)
+pooltype.c pooltype.h: $(web2c_common) $(web2c_programs) pooltype.p
+ $(web2c) pooltype
+pooltype.p: tangle pooltype.web pooltype.ch
+ $(tangle) pooltype pooltype
+check: pooltype-check
+pooltype-check: tex.pool
+pooltype-check: pooltype
+ ./pooltype tex.pool >tests/xtexpool.typ
+clean:: pooltype-clean
+pooltype-clean:
+ $(LIBTOOL) --mode=clean rm -f pooltype
+ rm -f pooltype.o pooltype.c pooltype.h pooltype.p
+ rm -f tests/xtexpool.typ
+
+tie: tie.o
+ $(kpathsea_link) tie.o $(LOADLIBES)
+tie.c: ctangle tiedir/tie.w tiedir/tie-w2c.ch
+ CWEBINPUTS=$(srcdir)/tiedir $(ctangle) tie.w tie-w2c.ch
+clean:: tie-clean
+tie-clean:
+ $(LIBTOOL) --mode=clean rm -f tie
+ rm -f tie.o tie.c
+
+tftopl: tftopl.o
+ $(kpathsea_link) tftopl.o $(LOADLIBES)
+tftopl.c tftopl.h: $(web2c_common) $(web2c_programs) tftopl.p
+ $(web2c) tftopl
+tftopl.p: tangle tftopl.web tftopl.ch
+ $(tangle) tftopl tftopl
+check: tftopl-check
+tftopl-check: tftopl
+ ./tftopl -verbose $(srcdir)/tests/cmr10 tests/xcmr10
+clean:: tftopl-clean
+tftopl-clean:
+ $(LIBTOOL) --mode=clean rm -f tftopl
+ rm -f tftopl.o tftopl.c tftopl.h tftopl.p
+ rm -f tests/xcmr10.pl
+
+vftovp: vftovp.o
+ $(kpathsea_link) vftovp.o $(LOADLIBES)
+vftovp.c vftovp.h: $(web2c_common) $(web2c_programs) vftovp.p
+ $(web2c) vftovp
+vftovp.p: tangle vftovp.web vftovp.ch
+ $(tangle) vftovp vftovp
+check: vftovp-check
+vftovp-check: vftovp
+ TFMFONTS=$(srcdir)/tests ./vftovp -verbose $(srcdir)/tests/ptmr ptmr tests/xptmr
+clean:: vftovp-clean
+vftovp-clean:
+ $(LIBTOOL) --mode=clean rm -f vftovp
+ rm -f vftop.o vftovp.c vftovp.h vftovp.p
+ rm -f tests/xptmr.vpl
+
+vptovf: vptovf.o
+ $(kpathsea_link) vptovf.o $(LOADLIBES)
+vptovf.c vptovf.h: $(web2c_common) $(web2c_programs) vptovf.p
+ $(web2c) vptovf
+vptovf.p: tangle vptovf.web vptovf.ch
+ $(tangle) vptovf vptovf
+check: vptovf-check
+vptovf-check: vptovf
+ ./vptovf $(srcdir)/tests/ptmr tests/xptmr tests/xptmr
+clean:: vptovf-clean
+vptovf-clean:
+ $(LIBTOOL) --mode=clean rm -f vptovf
+ rm -f vptovf.o vptovf.c vptovf.h vptovf.p
+ rm -f tests/xptmr.vf tests/xptmr.tfm
+
+weave: weave.o
+ $(kpathsea_link) weave.o $(LOADLIBES)
+weave.c weave.h: $(web2c_common) $(web2c_programs) weave.p
+ $(web2c) weave
+weave.p: tangle weave.web weave.ch
+ $(tangle) weave weave
+check: weave-check
+weave-check: weave
+ ./weave $(srcdir)/pooltype
+clean:: weave-clean
+weave-clean:
+ $(LIBTOOL) --mode=clean rm -f weave
+ rm -f weave.o weave.c weave.h weave.p
+ rm -f pooltype.tex
+
+#
+# Defines that are common to the texmf programs.
+
+triptrap: trip trap mptrap
+testdir = $(srcdir)/triptrap
+testenv = TEXMFCNF=$(testdir)
+dvitype_args = -output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'
+
+#
+# Metafont
+mf_c = mfini.c mf0.c mf1.c
+mf_o = mfini.o mf0.o mf1.o mf-pool.o mfextra.o
+mfn_o = mfini.o mf0.o mf1.o mf-pool.o mfnowin.o
+mf: $(mf_o) $(windowlib)
+ $(kpathsea_link) $(mf_o) $(windowlink) $(LOADLIBES)
+mf-nowin: $(mfn_o) window/trap.o
+ $(kpathsea_link) $(mfn_o) window/trap.o $(LOADLIBES)
+mfnowin.o: mfnowin.c
+ $(compile) -DMFNOWIN -c $< -o $@
+$(mf_c) mfcoerce.h mfd.h: mf.p $(web2c_texmf) web2c/cvtmf1.sed web2c/cvtmf2.sed
+ $(web2c) mf
+mfextra.c: lib/texmfmp.c
+ sed s/TEX-OR-MF-OR-MP/mf/ $(srcdir)/lib/texmfmp.c >$@
+mfnowin.c: lib/texmfmp.c
+ sed s/TEX-OR-MF-OR-MP/mf/ $(srcdir)/lib/texmfmp.c >$@
+mf.p mf.pool: tangle mf.web mf-final.ch
+ $(tangle) $(srcdir)/mf.web mf-final.ch
+mf-final.ch: $(TIE) mf.web mf.ch mf-binpool.ch
+ $(TIE) -c $@ $(srcdir)/mf.web $(srcdir)/mf.ch $(srcdir)/mf-binpool.ch
+check: mf-check
+mf-check: trap mf.base
+ ./mf --progname=mf '&./mf \tracingstats:=1; end.'
+ ./mf --progname=mf $(srcdir)/tests/online
+ ./mf --progname=mf $(srcdir)/tests/one.two
+ ./mf --progname=mf $(srcdir)/tests/uno.dos
+clean:: mf-clean
+mf-clean: trap-clean
+ $(LIBTOOL) --mode=clean rm -f mf
+ $(LIBTOOL) --mode=clean rm -f mf-nowin
+ rm -f $(mf_c) mfcoerce.h mfd.h mf.p mf.pool
+ rm -f $(mf_o) mfextra.c
+ rm -f $(mfn_o) mfnowin.c
+ rm -f mf.base mf.log
+ rm -f mfput.log online.2602gf online.log one.two.log uno.log
+
+# Can't run trap and mptrap in parallel, because both write trap.{log,tfm}.
+trap: mf tftopl gftype trap-clean
+ @echo ">>> See $(testdir)/mftrap.diffs for example of acceptable diffs." >&2
+ $(LN) $(testdir)/trap.mf . # get same filename in log
+ -$(SHELL) -c '$(testenv) ./mf --progname=inimf <$(testdir)/mftrap1.in >mftrapin.fot'
+ mv trap.log mftrapin.log
+ -diff $(testdir)/mftrapin.log mftrapin.log
+ -$(SHELL) -c '$(testenv) ./mf --progname=inimf <$(testdir)/mftrap2.in >mftrap.fot'
+ mv trap.log mftrap.log
+ mv trap.tfm mftrap.tfm
+ -diff $(testdir)/mftrap.fot mftrap.fot
+ -diff $(testdir)/mftrap.log mftrap.log
+ ./tftopl ./mftrap.tfm mftrap.pl
+ -diff $(testdir)/mftrap.pl mftrap.pl
+ $(SHELL) -c '$(testenv) ./gftype -m -i ./trap.72270gf >trap.typ'
+ -diff $(testdir)/trap.typ trap.typ
+
+trap-clean:
+ rm -f trap.mf trap.base
+ rm -f mftrapin.fot mftrapin.log
+ rm -f mftrap.fot mftrap.log mftrap.tfm
+ rm -f mftrap.pl trap.72270gf trap.typ
+#
+# MetaPost
+kpse_include mpdir/mpostlib.mk
+kpse_include metapost.mk
+#
+# TeX
+tex_c = texini.c tex0.c tex1.c tex2.c
+tex_o = texini.o tex0.o tex1.o tex2.o tex-pool.o texextra.o
+tex: $(tex_o)
+ $(kpathsea_link) $(tex_o) $(socketlibs) $(LOADLIBES)
+$(tex_c) texcoerce.h texd.h: tex.p $(web2c_texmf)
+ $(web2c) tex
+texextra.c: lib/texmfmp.c
+ sed s/TEX-OR-MF-OR-MP/tex/ $(srcdir)/lib/texmfmp.c >$@
+tex.p tex.pool: tangle tex.web tex-final.ch
+ $(tangle) $(srcdir)/tex.web tex-final.ch
+tex-final.ch: $(TIE) tex.web tex.ch tex-binpool.ch
+ $(TIE) -c $@ $(srcdir)/tex.web $(srcdir)/tex.ch $(srcdir)/tex-binpool.ch
+
+# tools to load pool for tex and mf.
+#
+tex-pool.c: tex.pool $(makecpool) tmf-pool.h
+ $(makecpool) tex.pool $(srcdir)/tmf-pool.h >$@ || rm -f $@
+mf-pool.c: mf.pool $(makecpool) tmf-pool.h
+ $(makecpool) mf.pool $(srcdir)/tmf-pool.h >$@ || rm -f $@
+mf-pool.o: mf-pool.c tmf-pool.h mfd.h
+# we include mfd.h, so need lots more includes.
+ $(CC) $(CFLAGS) -I. -I.. -I$(srcdir) -I$(srcdir)/.. -DMETA_FONT -c -o $@ mf-pool.c
+
+check: tex-check
+tex-check: trip tex.fmt
+# Test truncation (but don't bother showing the warning msg).
+ ./tex --progname=tex --output-comment="`cat $(srcdir)/PROJECTS`" \
+ $(srcdir)/tests/hello 2>/dev/null \
+ && ./dvitype hello.dvi | grep olaf@infovore.xs4all.nl >/dev/null
+# \openout should show up in \write's.
+ ./tex --progname=tex $(srcdir)/tests/openout && grep xfoo openout.log
+# one.two.tex -> one.two.log
+ ./tex --progname=tex $(srcdir)/tests/one.two && ls -l one.two.log
+# uno.dos -> uno.log
+ ./tex --progname=tex $(srcdir)/tests/uno.dos && ls -l uno.log
+ ./tex --progname=tex $(srcdir)/tests/just.texi && ls -l just.log
+ -./tex --progname=tex $(srcdir)/tests/batch.tex
+ ./tex --progname=tex --shell $(srcdir)/tests/write18 | grep echo
+ TEXMFCNF=../kpathsea \
+ ./tex --mltex --progname=initex --ini $(srcdir)/tests/mltextst
+ -./tex </dev/null
+ -PATH=`pwd`:$(kpathsea_dir):$(kpathsea_srcdir):$$PATH \
+ WEB2C=$(kpathsea_srcdir) TMPDIR=.. \
+ ./tex --progname=tex '\nonstopmode\font\foo=nonesuch\end'
+clean:: tex-clean
+tex-clean: trip-clean
+ $(LIBTOOL) --mode=clean rm -f tex
+ rm -f $(tex_o) $(tex_c) texextra.c texcoerce.h texd.h
+ rm -f tex.p tex.pool
+ rm -f tex.fmt tex.log
+ rm -f hello.dvi hello.log xfoo.out openout.log on.two.log uno.log
+ rm -f just.log batch.log write18.log mltextst.log texput.log
+ rm -f missfont.log
+ rm -rf tfm
+
+trip: dvitype pltotf tftopl tex trip-clean
+ @echo ">>> See $(testdir)/trip.diffs for example of acceptable diffs." >&2
+ ./pltotf $(testdir)/trip.pl trip.tfm
+ ./tftopl ./trip.tfm trip.pl
+ -diff $(testdir)/trip.pl trip.pl
+ $(LN) $(testdir)/trip.tex . # get same filename in log
+ -$(SHELL) -c '$(testenv) ./tex --progname=initex --ini <$(testdir)/trip1.in >tripin.fot'
+ mv trip.log tripin.log
+ -diff $(testdir)/tripin.log tripin.log
+# May as well test non-ini second time through.
+ -$(SHELL) -c '$(testenv) ./tex --progname=tex <$(testdir)/trip2.in >trip.fot'
+ -diff $(testdir)/trip.fot trip.fot
+# We use $(DIFF) instead of `diff' only for those files where there
+# might actually be legitimate numerical differences.
+ -$(DIFF) $(DIFFFLAGS) $(testdir)/trip.log trip.log
+ $(SHELL) -c '$(testenv) ./dvitype $(dvitype_args) trip.dvi >trip.typ'
+ -$(DIFF) $(DIFFFLAGS) $(testdir)/trip.typ trip.typ
+
+trip-clean:
+ rm -f trip.tfm trip.pl trip.tex trip.fmt tripin.fot tripin.log
+ rm -f trip.fot trip.log trip.dvi trip.typ tripos.tex 8terminal.tex
+ rm -rf tfm
+#
+# Helper makefile fragments for pdf*tex and luatex.
+kpse_include libsluapdf.mk
+kpse_include pdftexdir/pdftexlib.mk
+kpse_include luatexdir/luatexlib.mk
+#
+# Makefile fragments:
+kpse_include synctexdir/synctex.mk
+kpse_include etexdir/etex.mk
+kpse_include omegadir/omega.mk
+kpse_include alephdir/aleph.mk
+kpse_include pdftexdir/pdftex.mk
+kpse_include xetexdir/xetex.mk
+kpse_include luatexdir/luatex.mk
+
+#
+# non-engine programs.
+programs = bibtex ctangle ctie cweave dvicopy dvitomp dvitype gftodvi gftopk \
+ gftype mft $(odvicopy) $(odvitype) $(otangle) patgen $(pdftosrc) \
+ pktogf pktype pltotf pooltype synctex tangle tftopl tie $(ttf2afm) \
+ vftovp vptovf weave
+
+# basic_engines are the binaries we build and install directly here in
+# the webdir/ directory.
+# include $(metapost) from metapost.mk even though it also includes
+# dvitomp. Hopefully that doesn't hurt.
+basic_engines = $(tex) $(mf) $(mfn) $(metapost)
+
+# engines includes the ones built in subdirectories.
+engines = $(basic_engines) $(etex) \
+ $(omega) $(aleph) \
+ $(pdftex) $(pdfetex) \
+ $(xetex) $(luatex)
+
+programs: $(programs) $(engines) $(mpware_programs) \
+ $(omegafonts_programs) $(otps_programs) $(pdftosrc)
+
+# Additional dependencies for relinking.
+# Each program and engine already depends on $(web2c_programs).
+$(web2c_programs) tangleboot ctangleboot: $(kpathsea) $(proglib)
+
+#
+# Bootstrapping tangle requires making it with itself. We use the opportunity
+# to create an up-to-date tangleboot as well.
+tangle: tangle.o
+ $(kpathsea_link) tangle.o $(LOADLIBES)
+ $(MAKE) $(common_makeargs) tangleboot.p
+tangle.c tangle.h: tangle.p
+ $(web2c) tangle
+# tangle.p is a special case, since it is needed to compile itself. We
+# convert and compile the (distributed) tangleboot.p to make a tangle
+# which we use to make the other programs. We depend on tangleboot, even
+# though we might not use it.
+tangle.p: tangleboot tangle.web tangle.ch
+ WEBINPUTS=.:$(srcdir) $(TANGLEBOOT) tangle tangle
+tangle.web:
+ @echo "You seem to be missing tangle.web, perhaps because you" >&2
+ @echo "didn't retrieve web.tar.gz, only web2c.tar.gz." >&2
+ @echo "You need both." >&2
+ @echo >&2
+ @echo "web.tar.gz should be available from the" >&2
+ @echo "same place that you got web2c.tar.gz." >&2
+ @echo "In any case, you can get it from" >&2
+ @echo "ftp://ftp.tug.org/tex/web.tar.gz." >&2
+ false
+clean:: tangle-clean
+tangle-clean:
+ $(LIBTOOL) --mode=clean rm -f tangle
+ rm -f tangle.o tangle.c tangle.h tangle.p
+
+tangleboot: tangleboot.o
+ $(kpathsea_link) tangleboot.o $(LOADLIBES)
+tangleboot.c tangleboot.h: stamp-tangle $(web2c_programs) $(web2c_common)
+ $(web2c) tangleboot
+# tangleboot.p is in the distribution
+stamp-tangle: tangleboot.p
+ date >stamp-tangle
+# This is not run unless tangle.web or tangle.ch is changed.
+# Only try to run ./tangle if it actually exists, otherwise
+# just touch tangleboot.p and build tangle.
+tangleboot.p: tangle.web tangle.ch
+ if [ -r $(TANGLE) ] || [ -r $(TANGLE).exe ]; then \
+ $(tangle) tangle tangle; \
+ mv tangle.p tangleboot.p; \
+ elif [ -r tangleboot.p ]; then \
+ touch tangleboot.p; \
+ else \
+ cp $(srcdir)/tangleboot.p .; \
+ fi
+ date >stamp-tangle
+ $(MAKE) $(common_makeargs) tangle
+clean:: tangleboot-clean
+tangleboot-clean:
+ $(LIBTOOL) --mode=clean rm -f tangleboot
+ rm -f tangleboot.o tangleboot.c tangleboot.h
+
+# Bootstrapping ctangle requires making it with itself. We use the opportunity
+# to create an up-to-date ctangleboot as well.
+ctangle: ctangle.o cweb.o
+ $(kpathsea_link) ctangle.o cweb.o $(LOADLIBES)
+ $(MAKE) $(common_makeargs) ctangleboot.c cwebboot.c
+# ctangle.c is a special case, since it is needed to compile itself.
+ctangle.c: ctangleboot cwebdir/ctangle.w cwebdir/ctang-w2c.ch
+ CWEBINPUTS=$(srcdir)/cwebdir $(CTANGLEBOOT) ctangle ctang-w2c
+cweb.c: ctangleboot cwebdir/common.w cwebdir/comm-w2c.ch
+ CWEBINPUTS=$(srcdir)/cwebdir $(CTANGLEBOOT) common comm-w2c cweb.c
+clean:: ctangle-clean
+clean:: cweb-clean
+ctangle-clean:
+ $(LIBTOOL) --mode=clean rm -f ctangle
+ rm -f ctangle.o ctangle.c
+cweb-clean:
+ rm -f cweb.o cweb.c
+
+ctangleboot: ctangleboot.o cwebboot.o
+ $(kpathsea_link) ctangleboot.o cwebboot.o $(LOADLIBES)
+# ctangleboot.c is in the distribution
+stamp-ctangle: ctangleboot.c cwebboot.c
+ctangleboot.c: cwebdir/ctangle.w cwebdir/ctang-w2c.ch
+ if [ -r $(CTANGLE) ] || [ -r $(CTANGLE).exe ]; then \
+ CWEBINPUTS=$(srcdir)/cwebdir $(CTANGLE) ctangle ctang-w2c; \
+ mv ctangle.c ctangleboot.c; \
+ elif [ -r ctangleboot.c ]; then \
+ touch ctangleboot.c; \
+ else \
+ cp $(srcdir)/ctangleboot.c .; \
+ fi
+ date >stamp-ctangle
+ $(MAKE) $(common_makeargs) ctangle
+cwebboot.c: cwebdir/common.w cwebdir/comm-w2c.ch
+ if [ -r $(CTANGLE) ] || [ -r $(CTANGLE).exe ]; then \
+ CWEBINPUTS=$(srcdir)/cwebdir $(CTANGLE) common comm-w2c cweb.c; \
+ mv cweb.c cwebboot.c; \
+ elif [ -r cwebboot.c ]; then \
+ touch cwebboot.c; \
+ else \
+ cp $(srcdir)/cwebboot.c .; \
+ fi
+ date >stamp-ctangle
+ $(MAKE) $(common_makeargs) ctangle
+clean:: ctangleboot-clean
+clean:: cwebboot-clean
+ctangleboot-clean:
+ $(LIBTOOL) --mode=clean rm -f ctangleboot
+ rm -f ctangleboot.o
+cwebboot-clean:
+ rm -f cwebboot.o
+
+# Even web2c itself uses the library.
+lib_sources = lib/alloca.c lib/basechsuffix.c lib/chartostring.c \
+ lib/eofeoln.c lib/fprintreal.c lib/input2int.c lib/inputint.c lib/main.c \
+ lib/openclose.c lib/printversion.c lib/uexit.c lib/usage.c lib/version.c \
+ lib/zround.c
+$(proglib): $(lib_sources) stamp-auto
+ cd lib && $(MAKE) $(common_makeargs)
+
+# No exceptions in this library.
+window_sources = $(srcdir)/window/*.c
+$(windowlib): mfd.h $(window_sources)
+ cd window && $(MAKE) $(window_makeargs)
+window/trap.o: $(srcdir)/window/trap.c
+ cd window && $(MAKE) $(common_makeargs) trap.o
+
+# The web2c program consists of several executables.
+web2c/fixwrites: web2c/fixwrites.c web2c/kps.c
+ cd web2c && $(MAKE) $(common_makeargs) fixwrites
+web2c/splitup: web2c/splitup.c web2c/kps.c
+ cd web2c && $(MAKE) $(common_makeargs) splitup
+web2c/web2c: web2c/main.c web2c/web2c.h web2c/web2c.l web2c/web2c.y web2c/kps.c
+ cd web2c && $(MAKE) $(common_makeargs) web2c
+$(makecpool): web2c/makecpool.c
+ cd web2c && $(MAKE) $(common_makeargs) makecpool
+
+kpse_include ../make/tkpathsea.mk
+
+#
+# Making dumps.
+all_fmts = tex.fmt $(fmts)
+all_bases = mf.base $(bases)
+all_mems = mpost.mem $(mems)
+
+# We used to build these by default, but nowadays the dumps are created
+# completely separately, e.g., at runtime by mktexfmt. So just leave it
+# as an optional extra target.
+dumps: fmts bases mems
+fmts: $(all_fmts)
+bases: $(all_bases)
+mems: $(all_mems)
+
+tex.fmt: tex
+ $(dumpenv) $(MAKE) progname=tex files="plain.tex cmr10.tfm" prereq-check
+ $(dumpenv) ./tex --progname=tex --jobname=tex --ini \\input plain \\dump </dev/null
+
+olatex.fmt: tex
+ $(dumpenv) $(MAKE) progname=olatex files="latex.ltx" prereq-check
+ $(dumpenv) ./tex --progname=olatex --jobname=olatex --ini \\input latex.ltx </dev/null
+
+mltex.fmt: tex
+ $(dumpenv) $(MAKE) progname=mltex files="plain.tex cmr10.tfm" prereq-check
+ $(dumpenv) ./tex --mltex --progname=mltex --jobname=mltex --ini \\input plain \\dump </dev/null
+
+mf.base: mf
+ $(dumpenv) $(MAKE) progname=mf files="plain.mf cmr10.mf $(localmodes).mf" prereq-check
+ $(dumpenv) ./mf --progname=mf --jobname=mf --ini \\input plain input $(localmodes) dump </dev/null
+
+mpost.mem: mpost
+ $(dumpenv) $(MAKE) progname=mpost files=plain.mp prereq-check
+ $(dumpenv) ./mpost --progname=mpost --jobname=mpost --ini \\input plain dump </dev/null
+
+# This is meant to be called recursively, with $(files) set.
+prereq-check: $(kpathsea_dir)/kpsewhich
+ $(kpathsea_dir)/kpsewhich --progname=$(progname) $(files) >/dev/null || $(MAKE) prereq-lose >/dev/null
+
+prereq-lose:
+ @echo "You seem to be missing input files necessary to make the" >&2
+ @echo "basic formats (some or all of: $(files))." >&2
+ @echo "Perhaps you've defined the default paths incorrectly, or" >&2
+ @echo "perhaps you have environment variables set pointing" >&2
+ @echo "to an incorrect location. See ../kpathsea/BUGS." >&2
+ @echo >&2
+ @echo "If you simply do not have the files, you can" >&2
+ @echo "retrieve a minimal set of input files from CTAN hosts." >&2
+ false
+
+$(kpathsea_dir)/kpsewhich: $(kpathsea)
+
+amstex.fmt: tex
+ $(dumpenv) ./tex --progname=amstex --jobname=amstex --ini amstex.ini </dev/null
+
+# Texinfo changes the escape character from `\' to `@'.
+texinfo.fmt: tex.fmt
+ $(dumpenv) ./tex --progname=texinfo --jobname=texinfo --ini texinfo @dump </dev/null
+
+eplain.fmt: tex.fmt
+ touch eplain.aux # Makes cross-reference warnings work right.
+ $(dumpenv) ./tex --progname=eplain --jobname=eplain --ini \&./tex eplain \\dump </dev/null
+
+#
+install: install-exec install-data
+install-exec:: install-programs
+
+# Installation directories.
+$(bindir)::
+ $(SHELL) $(top_srcdir)/../mkinstalldirs $(bindir)
+$(texpooldir)::
+ $(SHELL) $(top_srcdir)/../mkinstalldirs $(texpooldir)
+$(mfpooldir)::
+ $(SHELL) $(top_srcdir)/../mkinstalldirs $(mfpooldir)
+$(mppooldir)::
+ $(SHELL) $(top_srcdir)/../mkinstalldirs $(mppooldir)
+$(fmtdir)::
+ $(SHELL) $(top_srcdir)/../mkinstalldirs $(fmtdir)
+$(basedir)::
+ $(SHELL) $(top_srcdir)/../mkinstalldirs $(basedir)
+$(memdir)::
+ $(SHELL) $(top_srcdir)/../mkinstalldirs $(memdir)
+$(web2cdir)::
+ $(SHELL) $(top_srcdir)/../mkinstalldirs $(web2cdir)
+
+# Installing the binaries. Each of the *dir/*.mk files (except etex)
+# add to this target via a dependency-only rule, to install their
+# respective engines.
+install-programs: $(programs) $(basic_engines) $(bindir)
+ for p in $(programs) $(basic_engines); do \
+ $(INSTALL_LIBTOOL_PROG) $$p $(bindir); done
+
+# We do not attempt to install any of the per-format symlinks, leaving
+# that to a separate run of texlinks.
+
+# Always do plain.*, so examples from the TeXbook (etc.) will work.
+# This target is not called, since it depends on the whole texmf tree,
+# but we leave it for posterity.
+install-fmts: install-tex-fmts
+install-tex-fmts: fmts $(fmtdir)
+ fmts="$(all_fmts)"; \
+ for f in $$fmts; do $(INSTALL_DATA) $$f $(fmtdir)/$$f; done
+ cd $(fmtdir) && (rm -f plain.fmt; $(LN) tex.fmt plain.fmt)
+ fmts="$(fmts)"; \
+ for f in $$fmts; do base=`basename $$f .fmt`; \
+ (cd $(bindir) && (rm -f $$base; $(LN) tex $$base)); done
+
+install-bases: install-mf-bases
+install-mf-bases: bases $(basedir)
+ bases="$(all_bases)"; \
+ for f in $$bases; do $(INSTALL_DATA) $$f $(basedir)/$$f; done
+ cd $(basedir) && (rm -f plain.base; $(LN) mf.base plain.base)
+ bases="$(bases)"; \
+ for f in $$bases; do base=`basename $$f .base`;\
+ (cd $(bindir) && (rm -f $$base; $(LN) mf $$base)); done
+
+install-mems: install-mpost-mems
+install-mpost-mems: mems $(memdir)
+ mems="$(all_mems)"; \
+ for f in $$mems; do $(INSTALL_DATA) $$f $(memdir)/$$f; done
+ cd $(memdir) && (rm -f plain.mem; $(LN) mpost.mem plain.mem)
+ mems="$(mems)"; \
+ for f in $$mems; do base=`basename $$f .mem`; \
+ (cd $(bindir) && (rm -f $$base; $(LN) mpost $$base)); done
+
+# Auxiliary files.
+install-data:: $(web2cdir)
+ cd doc && $(MAKE) $(install_makeargs) install-data
+ cd man && $(MAKE) $(install_makeargs) install-data
+ $(SHELL) $(top_srcdir)/../mkinstalldirs $(man1dir) $(man5dir)
+ $(INSTALL_DATA) $(srcdir)/tiedir/tie.1 $(man1dir)/tie.$(manext)
+ $(INSTALL_DATA) $(srcdir)/ctiedir/ctie.1 $(man1dir)/ctie.$(manext)
+ $(INSTALL_DATA) $(srcdir)/synctexdir/man1/synctex.1 $(man1dir)/synctex.$(manext)
+ $(INSTALL_DATA) $(srcdir)/synctexdir/man5/synctex.5 $(man5dir)/synctex.5
+
+# Dummy target.
+uninstall uninstall-exec uninstall-data:
+ @echo "*** Warning: uninstall is a dummy target in web2c/Makefile"
+
+# The distribution comes with up-to-date .info* files,
+# so this should never be used unless something goes wrong
+# with the unpacking, or you modify the manual.
+doc/web2c.info:
+ cd doc && $(MAKE) info
+info dvi:
+ cd doc && $(MAKE) $@
+
+# Manual pages
+manpages:
+ cd man && $(MAKE) all
+
+#
+# make dist won't work for anyone but me. Sorry.
+
+@MAINT@all-dist: dist web-dist etex-dist omega-dist aleph-dist pdftex-dist libs-dist
+@MAINT@
+@MAINT@distname = web2c
+@MAINT@program_files = PROJECTS *.ac *.ch tangleboot.p
+@MAINT@# The files that omega places in the main directory.
+@MAINT@omega_files = omegamem.h {odvicopy,odvitype,otangle}.{web,ch}
+@MAINT@
+@MAINT@triptrapdiffs: triptrap/trip.diffs triptrap/mftrap.diffs triptrap/mptrap.diffs
+@MAINT@triptrap/trip.diffs: tex
+@MAINT@ $(MAKE) trip | tail +1 >triptrap/trip.diffs
+@MAINT@triptrap/mftrap.diffs: mf
+@MAINT@ $(MAKE) trap | tail +1 >triptrap/mftrap.diffs
+@MAINT@triptrap/mptrap.diffs: mpost
+@MAINT@ $(MAKE) mptrap | tail +1 >triptrap/mptrap.diffs
+@MAINT@
+@MAINT@tests/check.log: $(programs) $(engines)
+@MAINT@ $(MAKE) check | tail +1 >tests/check.log
+@MAINT@
+@MAINT@dist_subdirs = doc lib $(mpware) tests web2c window
+@MAINT@pre-dist-$(distname): depend triptrapdiffs tests/check.log tangleboot.p
+@MAINT@ cd web2c && $(MAKE) lex.yy.c y_tab.c
+@MAINT@ cd doc && $(MAKE) doc dvi
+@MAINT@
+@MAINT@post-dist-$(distname):
+@MAINT@# Make the subdirectories.
+@MAINT@ for d in $(dist_subdirs); do \
+@MAINT@ mkdir -p $(texk_distdir)/$(distname)/$$d; done
+@MAINT@# Link files in subdirectories.
+@MAINT@ for f in `find $(dist_subdirs) \
+@MAINT@ \( -name README \
+@MAINT@ -o -name convert \
+@MAINT@ -o -name ChangeLog \
+@MAINT@ -o -name 'coerce.*' \
+@MAINT@ -o -name ref.aux \
+@MAINT@ -o -name ref.bbl \
+@MAINT@ -o -name ref.tex \
+@MAINT@ -o -name ref.txi \
+@MAINT@ -o -name texinfo.bst \
+@MAINT@ -o -name web2c.cps \
+@MAINT@ -o -name web2c.aux \
+@MAINT@ -o -name '*.asm' \
+@MAINT@ -o -name '*.[chly]' \
+@MAINT@ -o -name '*.defines' \
+@MAINT@ -o -name '*.in' \
+@MAINT@ -o -name '*.info*' \
+@MAINT@ -o -name '*.map' \
+@MAINT@ -o -name '*.sed' \
+@MAINT@ -o -name '*.tcx' \
+@MAINT@ -o -name '*.texi' \
+@MAINT@ \) -print`; do \
+@MAINT@ ln $$f $(distdir)/`dirname $$f`; done
+@MAINT@# Handle the dependeny files in the subdirectories.
+@MAINT@ for d in lib $(mpware) web2c window; do \
+@MAINT@ cp -p $$d/depend.mk $(texk_distdir)/$(distname)/$$d; done
+@MAINT@# Other subdirectories.
+@MAINT@ mkdir $(distdir)/triptrap && cd $(distdir)/triptrap && \
+@MAINT@ for i in ../../../../triptrap/*; do \
+@MAINT@ if test -f $$i; then ln -s $$i .; fi; done
+@MAINT@ mkdir $(distdir)/tiedir && cd $(distdir)/tiedir && \
+@MAINT@ for i in ../../../../tiedir/*; do \
+@MAINT@ if test -f $$i; then ln -s $$i .; fi; done
+@MAINT@ mkdir $(distdir)/ctiedir && cd $(distdir)/ctiedir && \
+@MAINT@ for i in ../../../../ctiedir/*; do \
+@MAINT@ if test -f $$i; then ln -s $$i .; fi; done
+@MAINT@ mkdir $(distdir)/cwebdir && cd $(distdir)/cwebdir && \
+@MAINT@ for i in ../../../../cwebdir/*; do \
+@MAINT@ if test -f $$i; then ln -s $$i .; fi; done
+@MAINT@ mkdir $(distdir)/cwebdir/examples && cd $(distdir)/cwebdir/examples && \
+@MAINT@ for i in ../../../../cwebdir/examples/*; do \
+@MAINT@ if test -f $$i; then ln -s $$i .; fi; done
+@MAINT@ mkdir $(distdir)/man && cd $(distdir)/man && \
+@MAINT@ for i in ../../../../man/*; do \
+@MAINT@ if test -f $$i; then ln -s $$i .; fi; done;
+@MAINT@ cd $(distdir)/man && rm -f *.1 Makefile sedscript
+@MAINT@ rm -f $(distdir)/window/x11.c
+@MAINT@ rm -f $(distdir)/tests/patgen.in
+@MAINT@ cd $(distdir)/tests && (rm just.texi; ln -s ../../../../tests/* .; rm -f x* CVS)
+@MAINT@ cd $(distdir)/tests && rm -f missfont.log ptmr.mpx io.tex exampl.b??
+@MAINT@# We supply the flex/bison output in case the user can't generate them.
+@MAINT@ cd $(distdir)/web2c; ../../../../../rename 's/$$/-dist/' lex.yy.c y_tab.[ch]
+@MAINT@# Remove cruft.
+@MAINT@ cd $(distdir); rm -f $(addsuffix .c, $(programs) tangleboot)
+@MAINT@ cd $(distdir); rm -f $(addsuffix .h, $(programs) tangleboot)
+@MAINT@ cd $(distdir); rm -f etex.ch omega.ch aleph.ch
+@MAINT@ cd $(distdir); rm -f pdftex.ch
+@MAINT@ cd $(distdir); bash -c "rm -f tests/x* tests/allbib.{bbl,blg,dvi,log}"
+@MAINT@ cd $(distdir)/tests && ln -s ../../../../tests/xampl.bib .
+@MAINT@ cd $(distdir); bash -c "rm -f $(omega_files) alephmem.h"
+@MAINT@ cd $(distdir); bash -c "rm -f cweb.c *{coerce,d}.h"
+@MAINT@ cd $(distdir); bash -c "rm -f omega*.c aleph*.c"
+@MAINT@ cd $(distdir); bash -c "rm -f tex*.c etex*.c"
+@MAINT@ cd $(distdir); bash -c "rm -f pdftex*.c"
+@MAINT@ cd $(distdir); bash -c "rm -f mf*.c mp*.c"
+@MAINT@ cd $(distdir); bash -c "rm -f macnames.c *extra.c"
+@MAINT@ touch $(distdir)/doc/*.info*
+@MAINT@
+@MAINT@web-dist:
+@MAINT@ rm -rf $(top_distdir)
+@MAINT@ mkdir -p $(distdir)
+@MAINT@ for f in *.web; do ln $$f $(distdir); done
+@MAINT@ rm -f $(distdir)/etex.web $(distdir)/omega.web $(distdir)/aleph.web
+@MAINT@ rm -f $(distdir)/pdfetex.web
+@MAINT@ cd $(distdir); bash -c "rm -f $(omega_files)"
+@MAINT@ chmod -w $(distdir)/*
+@MAINT@ GZIP=-9 tar czf web-$(version).tar.gz $(top_distdir)
+@MAINT@ rm -rf $(top_distdir)
+@MAINT@
+@MAINT@etex-dist: etexdir/etex.version
+@MAINT@ rm -rf $(top_distdir)
+@MAINT@ mkdir -p $(distdir)/etexdir
+@MAINT@ cp -rp etexdir/* $(distdir)/etexdir
+@MAINT@ rm -rf $(distdir)/etexdir/CVS $(distdir)/etexdir/*/CVS
+@MAINT@ rm -f $(distdir)/etexdir/etexextra.h $(distdir)/etexdir/etex.version
+@MAINT@ GZIP=-9 tar czf web2c-$(version)-etex-`cat etexdir/etex.version`.tar.gz $(top_distdir)
+@MAINT@ rm -rf $(top_distdir)
+@MAINT@
+@MAINT@omega-dist:
+@MAINT@ rm -rf $(top_distdir)
+@MAINT@ mkdir -p $(distdir)/omegadir
+@MAINT@ mkdir -p $(distdir)/omegaware $(distdir)/omegafonts $(distdir)/otps
+@MAINT@ cp -p omegadir/* $(distdir)/omegadir
+@MAINT@ cd omegafonts && $(MAKE) lex.yy.c y_tab.c
+@MAINT@ for f in omegafonts/*.[chly] omegafonts/*.in; do cp -p $$f $(distdir)/omegafonts; done
+@MAINT@ cp -p omegaware/* $(distdir)/omegaware
+@MAINT@ cd otps && $(MAKE) lex.yy.c y_tab.c
+@MAINT@ for f in otps/*.[chly] otps/*.in; do cp -p $$f $(distdir)/otps; done
+@MAINT@ cp -p otps/mkocp otps/mkofm $(distdir)/otps
+@MAINT@# We supply the flex/bison output in case the user can't generate them.
+@MAINT@ cd $(distdir)/omegafonts; ../../../../../rename 's/$$/-dist/' lex.yy.c y_tab.[ch]
+@MAINT@ cd $(distdir)/otps; ../../../../../rename 's/$$/-dist/' lex.yy.c y_tab.[ch]
+@MAINT@ GZIP=-9 tar czf web2c-$(version)-omega-`cat omegadir/omega.version`.tar.gz $(top_distdir)
+@MAINT@ rm -rf $(top_distdir)
+@MAINT@
+@MAINT@aleph-dist: alephdir/aleph.version
+@MAINT@ rm -rf $(top_distdir)
+@MAINT@ mkdir -p $(distdir)/alephdir
+@MAINT@ cp -p alephdir/* $(distdir)/alephdir
+@MAINT@ @echo "*** Removing generated files ***"
+@MAINT@ rm -f $(distdir)/alephdir/alephextra.h
+@MAINT@ GZIP=-9 tar czf web2c-$(version)-aleph-`cat alephdir/aleph.version`.tar.gz $(top_distdir)
+@MAINT@ rm -rf $(top_distdir)
+@MAINT@
+@MAINT@pdfetex-dist: pdfetexdir/pdfetex.version
+@MAINT@ rm -rf $(top_distdir)
+@MAINT@ mkdir -p $(distdir)/pdfetexdir
+@MAINT@ cp -rp pdfetexdir/* $(distdir)/pdfetexdir
+@MAINT@ rm -rf $(distdir)/pdf*texdir/CVS $(distdir)/pdf*texdir/*/CVS
+@MAINT@ rm -f $(distdir)/pdf*texdir/Makefile
+@MAINT@ rm -f $(distdir)/pdf*texdir/*.[oa]
+@MAINT@ rm -f $(distdir)/pdf*texdir/*/config.*
+@MAINT@ rm -f $(distdir)/pdf*texdir/*/Makefile
+@MAINT@ rm -f $(distdir)/pdf*texdir/*/*.[oa]
+@MAINT@ rm -f $(distdir)/pdf*texdir/*/*/Makefile
+@MAINT@ rm -f $(distdir)/pdf*texdir/*/*/*.[ao]
+@MAINT@ rm -f $(distdir)/pdf*texdir/*/*/pdftoepdf.cc
+@MAINT@ rm -f $(distdir)/pdf*texdir/*/*/epdf.h
+@MAINT@ rm -f $(distdir)/pdf*texdir/pdf*texextra.h
+@MAINT@ rm -f $(distdir)/pdf*texdir/pdf*tex.version
+@MAINT@ mkdir -p $(top_distdir)/libs/xpdf
+@MAINT@ cp -rp $(top_srcdir)/../../libs/xpdf/* $(top_distdir)/libs/xpdf
+@MAINT@ rm -rf $(top_distdir)/libs/xpdf/CVS $(top_distdir)/libs/xpdf/*/CVS
+@MAINT@ rm -f $(top_distdir)/libs/xpdf/Makefile
+@MAINT@ rm -f $(top_distdir)/libs/xpdf/config.*
+@MAINT@ rm -f $(top_distdir)/libs/xpdf/aconf.h
+@MAINT@ rm -f $(top_distdir)/libs/xpdf/*/Makefile
+@MAINT@ rm -f $(top_distdir)/libs/xpdf/*/*.[oa]
+@MAINT@ rm -f $(top_distdir)/libs/xpdf/*/c-auto.h
+@MAINT@ GZIP=-9 tar czf web2c-$(version)-pdftex-`cat pdfetexdir/pdfetex.version`.tar.gz $(top_distdir)
+@MAINT@ rm -rf $(top_distdir)
+@MAINT@
+@MAINT@libs-dist:
+@MAINT@ rm -rf $(top_distdir)
+@MAINT@ mkdir -p $(libs_distdir)/zlib
+@MAINT@ cp -rp $(top_srcdir)/../../libs/zlib/* $(libs_distdir)/zlib
+@MAINT@ mkdir -p $(libs_distdir)/libpng
+@MAINT@ cp -rp $(top_srcdir)/../../libs/libpng/* $(libs_distdir)/libpng
+@MAINT@ mkdir -p $(libs_distdir)/md5
+@MAINT@ cp -rp $(top_srcdir)/../../libs/md5/* $(libs_distdir)/md5
+@MAINT@ rm -f $(libs_distdir)/*/Makefile
+@MAINT@ rm -f $(libs_distdir)/*/config.*
+@MAINT@ rm -f $(libs_distdir)/*/c-auto.h
+@MAINT@ rm -f $(libs_distdir)/*/*.[oa]
+@MAINT@ GZIP=-9 tar czf web2c-$(version)-pdfetexlibs.tar.gz $(top_distdir)
+@MAINT@ rm -rf $(top_distdir)
+
+kpse_include ../make/dist.mk
+
+kpse_include ../make/config.mk
+
+@MAINT@$(srcdir)/configure: $(srcdir)/withenable.ac
+
+#
+
+installcheck:
+ cd $(srcdir)/tests && bibtex allbib
+ mf '\mode:=ljfour; input logo10' && tftopl logo10.tfm >/dev/null
+ tex '\nonstopmode \tracingstats=1 \input story \bye'
+
+#
+# Cleaning.
+all_subdirs = doc lib man $(mpware) web2c window $(omegafonts) $(otps) \
+ $(pdftexdir) $(mpostdir) $(luatexdir)
+
+# Having a multiple-target rule with the subdir loop fails because of
+# the dependencies introduced by clean.mk. Yet, we want the
+# dependencies here at the top level so that distclean will run the
+# clean rules, etc. So, sigh, put the subdir loop in each target and
+# only run it if we have a Makefile. Alternatively, we could do as
+# Automake does.
+
+mostlyclean:: tangleboot-clean ctangleboot-clean
+ test ! -r lib/Makefile \
+ || for d in $(all_subdirs); do (cd $$d && $(MAKE) $@); done
+clean::
+ test ! -r lib/Makefile \
+ || for d in $(all_subdirs); do (cd $$d && $(MAKE) $@); done
+ rm -f *.log *.fmt *.base *.mem *.fls *.ofl *.aux
+distclean::
+ test ! -r lib/Makefile \
+ || for d in $(all_subdirs); do (cd $$d && $(MAKE) $@); done
+extraclean::
+ test ! -r lib/Makefile \
+ || for d in $(all_subdirs); do (cd $$d && $(MAKE) $@); done
+maintainer-clean::
+ test ! -r lib/Makefile \
+ || for d in $(all_subdirs); do (cd $$d && $(MAKE) $@); done
+
+kpse_include ../make/clean.mk
+
+@MAINT@depend::
+@MAINT@ for d in lib $(mpware) web2c window $(otps); do \
+@MAINT@ (cd $$d && $(MAKE) depend); done
+
+kpse_include ../make/rdepend.mk
+kpse_include depend.mk
+
+#
+# Local variables:
+# page-delimiter: "^# \f"
+# End:
diff --git a/Build/source/texk/web2c/ac/web2c.ac b/Build/source/texk/web2c/ac/web2c.ac
new file mode 100644
index 00000000000..e5f0d273d1f
--- /dev/null
+++ b/Build/source/texk/web2c/ac/web2c.ac
@@ -0,0 +1,62 @@
+## texk/web2c/ac/web2c.ac
+## configure options for TeX and MF
+AC_ARG_WITH([editor],
+ [AS_HELP_STRING([--with-editor=CMD],
+ [invoke CMD from the `e' option @<:@vi +%d %s@:>@])])[]dnl
+AC_ARG_ENABLE([auto-core],
+ [AS_HELP_STRING([--enable-auto-core],
+ [cause TeX&MF to dump core, given a certain filename])])[]dnl
+AC_ARG_ENABLE([dump-share],
+ [AS_HELP_STRING([--disable-dump-share],
+ [make fmt/base/mem files architecture-dependent])])[]dnl
+AC_ARG_ENABLE([fmtutil],
+ [AS_HELP_STRING([--enable-fmtutil],
+ [use fmtutil for build dumps])])[]dnl
+## configure options for TeX
+AC_ARG_ENABLE([ipc],
+ [AS_HELP_STRING([--enable-ipc],
+ [enable TeX's --ipc option, i.e., pipe to a program])])[]dnl
+m4_define([kpse_tex_progs], [dnl
+[[tex], [yes], [no], [TeX], []],
+[[etex], [no], [yes], [e-TeX], []],
+[[omega], [no], [no], [Omega], []],
+[[aleph], [yes], [no], [Aleph], []],
+[[pdftex], [yes], [yes], [pdfTeX], [xpdf libpng obsdcompat]],
+[[luatex], [yes], [no], [luaTeX], [xpdf libpng obsdcompat]],
+[[xetex], [no], [yes], [XeTeX], [xpdf libpng freetype2]],
+])[]dnl
+m4_foreach([Kpse_Prog], [kpse_tex_progs],
+ [m4_ifset([Kpse_Prog],
+ [KPSE_WITH_XTEX(Kpse_Prog)])])[]dnl
+## configure options for MF
+AC_ARG_ENABLE([mf],
+ [AS_HELP_STRING([--disable-mf],
+ [do not build METAFONT])])[]dnl
+AC_ARG_ENABLE([mf-nowin],
+ [AS_HELP_STRING([--enable-mf-nowin],
+ [build a separate non-windows-capable METAFONT],
+ [30])])[]dnl
+AC_ARG_WITH([mf-x-toolkit],
+ [AS_HELP_STRING([--with-mf-x-toolkit],
+ [Use X toolkit for METAFONT])])[]dnl
+m4_define([kpse_mf_win], [dnl
+[[epsf], [EPSF], [EPSF pseudo]],
+[[hp2627], [HP2627], [HP 2627]],
+[[mftalk], [MFTALK], [mftalk (generic server)]],
+[[next], [NEXT], [NeXT]],
+[[regis], [REGIS], [Regis]],
+[[suntools], [SUN], [old Suntools (this is not X)]],
+[[tektronix], [TEKTRONIX], [Tektronix]],
+[[uniterm], [UNITERM], [Uniterm]],
+])[]dnl
+m4_foreach([Kpse_Win], [kpse_mf_win],
+ [m4_ifset([Kpse_Win],
+ [KPSE_WITH_MFWIN(Kpse_Win)])])[]dnl
+## configure options for MP
+AC_ARG_ENABLE([mp],
+ [AS_HELP_STRING([--disable-mp],
+ [do not build METAPOST])])[]dnl
+## configure options for WEB programs
+AC_ARG_ENABLE([web-progs],
+ [AS_HELP_STRING([--disable-web-progs],
+ [do not build WEB programs bibtex ... weave])])[]dnl
diff --git a/Build/source/texk/web2c/ac/withenable.ac b/Build/source/texk/web2c/ac/withenable.ac
new file mode 100644
index 00000000000..be83880a3e5
--- /dev/null
+++ b/Build/source/texk/web2c/ac/withenable.ac
@@ -0,0 +1,4 @@
+## texk/web2c/ac/withenable.ac
+## configure options and TL libraries required for web2c
+KPSE_WITH_PROG([web2c], [kpathsea zlib], , [TeX & Co.])
+m4_include(kpse_TL[texk/web2c/ac/web2c.ac])
diff --git a/Build/source/texk/web2c/alephdir/am/aleph.am b/Build/source/texk/web2c/alephdir/am/aleph.am
new file mode 100644
index 00000000000..1643770a4d0
--- /dev/null
+++ b/Build/source/texk/web2c/alephdir/am/aleph.am
@@ -0,0 +1,102 @@
+## texk/web2c/alephdir/am/aleph.am: Makefile fragment for Aleph.
+
+## Aleph
+##
+if ALEPH
+bin_PROGRAMS += aleph
+endif ALEPH
+
+## With --enable-ipc, Aleph may need to link with -lsocket.
+aleph_LDADD = $(LDADD) $(socketlibs)
+
+aleph_CPPFLAGS = -I$(srcdir)/alephdir $(AM_CPPFLAGS)
+aleph_c_h = alephini.c aleph0.c aleph1.c aleph2.c aleph3.c alephcoerce.h alephd.h
+nodist_aleph_SOURCES = $(aleph_c_h) aleph-pool.c alephextra.c
+aleph_SOURCES = \
+ alephdir/aleph.c \
+ alephdir/alephbis.c \
+ alephdir/alephextra.h \
+ alephdir/alephmem.h \
+ alephdir/aleph-pool.h
+## We must create alephd.h before compiling the aleph_SOURCES,
+## but certainly don't want to create alephd.h if Aleph is not built.
+if ALEPH
+$(aleph_SOURCES): alephd.h
+endif ALEPH
+$(aleph_c_h): aleph-web2c
+aleph-web2c: aleph.p $(web2c_texmf) alephdir/aleph.defines
+ $(web2c) aleph
+ echo timestamp >$@
+ touch $(aleph_c_h)
+alephextra.c: lib/texmfmp.c alephdir/alephextra.h alephd.h
+ sed s/TEX-OR-MF-OR-MP/aleph/ $(srcdir)/lib/texmfmp.c >$@
+aleph.p aleph.pool: aleph-tangle
+aleph-tangle: otangle aleph.web aleph.ch
+ $(otangle) aleph aleph
+ echo timestamp >$@
+ touch aleph.p aleph.pool
+aleph-pool.c: aleph.pool $(makecpool) alephdir/aleph-pool.h
+ $(makecpool) aleph.pool $(srcdir)/alephdir/aleph-pool.h >$@ || rm -f $@
+## Generate aleph.web
+aleph_web_srcs = \
+ tex.web \
+ alephdir/om16bit.ch \
+ alephdir/omstr.ch \
+ alephdir/omfont.ch \
+ alephdir/omchar.ch \
+ alephdir/omfi.ch \
+ alephdir/ompar.ch \
+ alephdir/omocp.ch \
+ alephdir/omfilter.ch \
+ alephdir/omtrans.ch \
+ alephdir/omdir.ch \
+ alephdir/eobase.ch \
+ alephdir/eofmt.ch \
+ alephdir/eomem.ch \
+ alephdir/eo16bit.ch \
+ alephdir/eoext.ch \
+ alephdir/eoeqtb.ch \
+ alephdir/eofix.ch \
+ alephdir/eocprt.ch \
+ alephdir/eonewdir.ch \
+ alephdir/eover.ch \
+ alephdir/eopage.ch \
+ alephdir/eochar.ch
+aleph.web: $(TIE) $(aleph_web_srcs)
+ $(tie) -m aleph.web $(aleph_web_srcs)
+## Generate aleph.ch
+aleph_ch_srcs = \
+ alephdir/com16bit.ch \
+ alephdir/comstr.ch \
+ alephdir/comfont.ch \
+ alephdir/comchar.ch \
+ alephdir/comfi.ch \
+ alephdir/compar.ch \
+ alephdir/comocp.ch \
+ alephdir/comfilter.ch \
+ alephdir/comtrans.ch \
+ alephdir/comdir.ch \
+ alephdir/comsrcspec.ch \
+ alephdir/ceostuff.ch
+aleph.ch: $(TIE) aleph.web $(aleph_ch_srcs)
+ $(tie) -c aleph.ch aleph.web $(aleph_ch_srcs)
+EXTRA_DIST += $(aleph_web_srcs) $(aleph_ch_srcs) lib/texmfmp.c
+DISTCLEANFILES += $(nodist_aleph_SOURCES) aleph.web aleph.ch aleph-web2c \
+ aleph.p aleph.pool aleph-tangle
+
+EXTRA_DIST += \
+ alephdir/ChangeLog \
+ alephdir/Makefile \
+ alephdir/aleph.defines \
+ alephdir/aleph.version \
+ alephdir/eomega.ech \
+ alephdir/etex.ch \
+ alephdir/omega.ch0 \
+ alephdir/omega.ch1 \
+ alephdir/omega.ch2 \
+ alephdir/omxml.ch
+
+## Eventually delete these files
+##
+EXTRA_DIST += alephdir/aleph.mk
+
diff --git a/Build/source/texk/web2c/am/bootstrap.am b/Build/source/texk/web2c/am/bootstrap.am
new file mode 100644
index 00000000000..ad01159d6f1
--- /dev/null
+++ b/Build/source/texk/web2c/am/bootstrap.am
@@ -0,0 +1,110 @@
+## texk/web2c/am/bootstrap.am: Makefile fragment for tangle and ctangle.
+
+## Bootstrapping tangle requires making it with itself. We use the opportunity
+## to create an up-to-date tangleboot as well.
+bin_PROGRAMS += tangle
+nodist_tangle_SOURCES = tangle.c tangle.h
+tangle.c tangle.h: tangle-web2c
+tangle-web2c: tangle.p
+ $(web2c) tangle
+ echo timestamp >$@
+ touch tangle.c tangle.h
+## tangle.p is a special case, since it is needed to compile itself. We
+## convert and compile the (distributed) tangleboot.p to make a tangle
+## which we use to make the other programs. We depend on tangleboot, even
+## though we might not use it.
+EXTRA_DIST += tangle.web tangle.ch
+tangle.p: tangleboot tangle.web tangle.ch
+ WEBINPUTS=.:$(srcdir) $(tangleboot) tangle tangle
+tangle.web:
+ @echo "You seem to be missing tangle.web, perhaps because you" >&2
+ @echo "didn't retrieve web.tar.gz, only web2c.tar.gz." >&2
+ @echo "You need both." >&2
+ @echo >&2
+ @echo "web.tar.gz should be available from the" >&2
+ @echo "same place that you got web2c.tar.gz." >&2
+ @echo "In any case, you can get it from" >&2
+ @echo "ftp://ftp.tug.org/tex/web.tar.gz." >&2
+ false
+DISTCLEANFILES += tangle.c tangle.h tangle.p tangle-web2c
+
+noinst_PROGRAMS += tangleboot
+nodist_tangleboot_SOURCES = tangleboot.c tangleboot.h
+tangleboot.c tangleboot.h: stamp-tangle $(web2c_programs) $(web2c_common)
+ $(web2c) tangleboot
+## tangleboot.p is in the distribution
+EXTRA_DIST += tangleboot.p
+stamp-tangle: tangleboot.p
+ date >stamp-tangle
+## This is not run unless tangle.web or tangle.ch is changed.
+## Only try to run ./tangle if it actually exists, otherwise
+## just touch tangleboot.p and build tangle.
+tangleboot.p: tangle.web tangle.ch
+ if [ -r $(TANGLE) ] || [ -r $(TANGLE).exe ]; then \
+ $(tangle) tangle tangle; \
+ mv tangle.p tangleboot.p; \
+ elif [ -r tangleboot.p ]; then \
+ touch tangleboot.p; \
+ else \
+ cp $(srcdir)/tangleboot.p .; \
+ fi
+ date >stamp-tangle
+ $(MAKE) $(AM_MAKEFLAGS) tangle
+DISTCLEANFILES += stamp-tangle tangleboot.c tangleboot.h
+
+## Bootstrapping ctangle requires making it with itself. We use the opportunity
+## to create an up-to-date ctangleboot as well.
+bin_PROGRAMS += ctangle
+nodist_ctangle_SOURCES = ctangle.c cweb.c
+## ctangle.c is a special case, since it is needed to compile itself.
+## We depend on ctangleboot, even though we might not use it.
+EXTRA_DIST += cwebdir
+## We install man/cweb.man, not cwebdir/cweb.1
+## nodist_man_MANS += cwebdir/cweb.1
+ctangle.c: ctangleboot cwebdir/ctangle.w cwebdir/ctang-w2c.ch
+ CWEBINPUTS=$(srcdir)/cwebdir $(ctangleboot) ctangle ctang-w2c
+cweb.c: ctangleboot cwebdir/common.w cwebdir/comm-w2c.ch
+ CWEBINPUTS=$(srcdir)/cwebdir $(ctangleboot) common comm-w2c cweb.c
+DISTCLEANFILES += ctangle.c cweb.c
+
+noinst_PROGRAMS += ctangleboot
+nodist_ctangleboot_SOURCES = ctangleboot.c cwebboot.c
+## ctangleboot.c and cwebboot.c are in the distribution
+EXTRA_DIST += ctangleboot.c cwebboot.c
+stamp-ctangle: ctangleboot.c cwebboot.c
+ date >stamp-ctangle
+## This is not run unless one of the cwebdir/* files is changed.
+## Only try to run ./ctangle if it actually exists, otherwise
+## just touch ctangleboot.c and/or cwebboot.c and build ctangle.
+ctangleboot.c: cwebdir/ctangle.w cwebdir/ctang-w2c.ch
+ if [ -r $(CTANGLE) ] || [ -r $(CTANGLE).exe ]; then \
+ CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) ctangle ctang-w2c; \
+ mv ctangle.c ctangleboot.c; \
+ elif [ -r ctangleboot.c ]; then \
+ touch ctangleboot.c; \
+ else \
+ cp $(srcdir)/ctangleboot.c .; \
+ fi
+ date >stamp-ctangle
+ $(MAKE) $(AM_MAKEFLAGS) ctangle
+cwebboot.c: cwebdir/common.w cwebdir/comm-w2c.ch
+ if [ -r $(CTANGLE) ] || [ -r $(CTANGLE).exe ]; then \
+ CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) common comm-w2c cweb.c; \
+ mv cweb.c cwebboot.c; \
+ elif [ -r cwebboot.c ]; then \
+ touch cwebboot.c; \
+ else \
+ cp $(srcdir)/cwebboot.c .; \
+ fi
+ date >stamp-ctangle
+ $(MAKE) $(AM_MAKEFLAGS) ctangle
+DISTCLEANFILES += stamp-ctangle
+
+## Tests
+
+dist_check_SCRIPTS += tangle.test
+
+TESTS += tangle.test
+
+DISTCLEANFILES += cftest.p
+
diff --git a/Build/source/texk/web2c/am/cweb.am b/Build/source/texk/web2c/am/cweb.am
new file mode 100644
index 00000000000..7bdbde25a19
--- /dev/null
+++ b/Build/source/texk/web2c/am/cweb.am
@@ -0,0 +1,30 @@
+## texk/web2c/am/cweb.am: Makefile fragment for cweb programs (except ctangle).
+
+bin_PROGRAMS += ctie
+nodist_ctie_SOURCES = ctie.c
+EXTRA_DIST += ctiedir
+nodist_man_MANS += ctiedir/ctie.1
+ctie.c: ctangle ctiedir/ctie.w ctiedir/ctie-k.ch
+ CWEBINPUTS=$(srcdir)/ctiedir $(ctangle) ctie.w ctie-k.ch
+DISTCLEANFILES += ctie.c
+
+bin_PROGRAMS += cweave
+nodist_cweave_SOURCES = cweave.c cweb.c
+cweave.c: ctangle cwebdir/cweave.w cwebdir/cweav-w2c.ch
+ CWEBINPUTS=$(srcdir)/cwebdir $(ctangle) cweave cweav-w2c
+DISTCLEANFILES += cweave.c
+
+bin_PROGRAMS += tie
+nodist_tie_SOURCES = tie.c
+EXTRA_DIST += tiedir
+nodist_man_MANS += tiedir/tie.1
+tie.c: ctangle tiedir/tie.w tiedir/tie-w2c.ch
+ CWEBINPUTS=$(srcdir)/tiedir $(ctangle) tie.w tie-w2c.ch
+DISTCLEANFILES += tie.c
+
+## Tests
+
+TESTS += tiedir/tie.test
+
+DISTCLEANFILES += tie.outc tie.outm
+
diff --git a/Build/source/texk/web2c/am/texmf.am b/Build/source/texk/web2c/am/texmf.am
new file mode 100644
index 00000000000..8d65e7bd065
--- /dev/null
+++ b/Build/source/texk/web2c/am/texmf.am
@@ -0,0 +1,108 @@
+## texk/web2c/am/texmf.am: Makefile fragment for TeX and MF.
+
+## Common for MF and TeX
+EXTRA_DIST += \
+ lib/mfmpi386.asm \
+ lib/mfmpw32.c \
+ lib/texmfmp.c \
+ texmfmem.h \
+ texmfmp-help.h \
+ texmfmp.h
+
+## TeX
+##
+if TEX
+bin_PROGRAMS += tex
+endif TEX
+
+tex_CPPFLAGS =
+
+## With --enable-ipc, TeX may need to link with -lsocket.
+tex_LDADD = $(LDADD) $(socketlibs)
+
+tex_c_h = texini.c tex0.c tex1.c tex2.c texcoerce.h texd.h
+nodist_tex_SOURCES = $(tex_c_h) tex-pool.c texextra.c
+$(tex_c_h): tex-web2c
+tex-web2c: tex.p $(web2c_texmf)
+ $(web2c) tex
+ : $(synctex_convert_tex)
+ echo timestamp >$@
+ touch $(tex_c_h)
+texextra.c: lib/texmfmp.c texd.h
+ sed s/TEX-OR-MF-OR-MP/tex/ $(srcdir)/lib/texmfmp.c >$@
+tex.p tex.pool: tex-tangle
+tex-tangle: $(TANGLE) tex.web tex-final.ch
+ $(tangle) tex.web tex-final.ch
+ echo timestamp >$@
+ touch tex.p tex.pool
+tex-pool.c: tex.pool $(makecpool) tmf-pool.h
+ $(makecpool) tex.pool $(srcdir)/tmf-pool.h >$@ || rm -f $@
+## Generate tex-final.ch
+tex-final.ch: $(TIE) $(tex_ch_srcs)
+ $(tie) -c $@ $(tex_ch_srcs)
+tex_ch_srcs = \
+ tex.web \
+ tex.ch \
+ $(tex_ch_synctex) \
+ tex-binpool.ch
+##
+EXTRA_DIST += $(tex_ch_srcs) lib/texmfmp.c tmf-pool.h
+
+DISTCLEANFILES += $(nodist_tex_SOURCES) tex-final.ch tex-web2c \
+ tex.p tex.pool tex-tangle
+
+## Metafont
+##
+if MF
+bin_PROGRAMS += mf
+endif MF
+
+nodist_mf_SOURCES = mfextra.c
+mf_CPPFLAGS = $(X_CFLAGS)
+mf_LDADD = libmf.a $(LDADD) $(windowlib) $(mf_x_libs)
+if MFN
+bin_PROGRAMS += mf-nowin
+nodist_mf_nowin_SOURCES = mfextra.c
+mf_nowin_CPPFLAGS = $(X_CFLAGS) -DMFNOWIN
+mf_nowin_LDADD = libmf.a $(LDADD) $(windowlib)
+endif MFN
+
+windowlib = window/libwindow.a
+$(windowlib): mfd.h $(srcdir)/window/*.c
+ cd window && $(MAKE) $(AM_MAKEFLAGS) libwindow.a
+## Make `#include <X11/...>' and `-lX...' work.
+## This matches xdvik.
+## wlibs is substituted by web2c's configure, LIBS by general configure
+## routines, and the others by AC_PATH_XTRA.
+## All the x_... and X_... variables will be empty if we aren't supporting X.
+## Follow the library order used in X11R6 itself:
+## -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 (some may not be present).
+mf_x_libs = $(X_LIBS) $(x_tool_libs) $(X_PRE_LIBS) $(x_ext_lib) $(wlibs) $(X_EXTRA_LIBS)
+
+## mf and mf-nowin compile mfextra.c with different CPPFLAGS.
+## Automake, however, does not support CPPFLAGS for individual source files.
+## To avoid compiling everything twice, the common objects are in a library.
+EXTRA_LIBRARIES += libmf.a
+mf_c_h = mfini.c mf0.c mf1.c mfcoerce.h mfd.h
+nodist_libmf_a_SOURCES = $(mf_c_h) mf-pool.c
+libmf_a_CPPFLAGS = -DMETA_FONT
+$(mf_c_h): mf-web2c
+mf-web2c: mf.p $(web2c_texmf) web2c/cvtmf1.sed web2c/cvtmf2.sed
+ $(web2c) mf
+ echo timestamp >$@
+ touch $(mf_c_h)
+EXTRA_DIST += mf.web mf-binpool.ch mf.ch mftalk.h lib/texmfmp.c tmf-pool.h
+mfextra.c: lib/texmfmp.c mfd.h
+ sed s/TEX-OR-MF-OR-MP/mf/ $(srcdir)/lib/texmfmp.c >$@
+mf.p mf.pool: mf-tangle
+mf-tangle: $(TANGLE) mf.web mf-final.ch
+ $(tangle) mf.web mf-final.ch
+ echo timestamp >$@
+ touch mf.p mf.pool
+mf-final.ch: $(TIE) mf.web mf.ch mf-binpool.ch
+ $(tie) -c $@ mf.web mf.ch mf-binpool.ch
+mf-pool.c: mf.pool $(makecpool) tmf-pool.h
+ $(makecpool) mf.pool $(srcdir)/tmf-pool.h >$@ || rm -f $@
+DISTCLEANFILES += $(nodist_libmf_a_SOURCES) mfextra.c mf-final.ch mf-web2c \
+ mf.p mf.pool mf-tangle
+
diff --git a/Build/source/texk/web2c/am/web.am b/Build/source/texk/web2c/am/web.am
new file mode 100644
index 00000000000..951e4fded6c
--- /dev/null
+++ b/Build/source/texk/web2c/am/web.am
@@ -0,0 +1,166 @@
+## texk/web2c/am/web.am: Makefile fragment for normal web programs (except tangle).
+
+web_programs = bibtex dvicopy dvitomp dvitype gftodvi gftopk gftype mft \
+ patgen pktogf pktype pltotf pooltype tftopl vftovp vptovf weave
+
+if WEB
+bin_PROGRAMS += $(web_programs)
+endif WEB
+
+EXTRA_DIST += $(web_programs:=.web) $(web_programs:=.ch)
+DISTCLEANFILES += $(web_programs:=.c) $(web_programs:=.h) \
+ $(web_programs:=.p) $(web_programs:=-web2c)
+
+nodist_bibtex_SOURCES = bibtex.c bibtex.h
+bibtex.c bibtex.h: bibtex-web2c
+bibtex-web2c: $(web2c_common) $(web2c_programs) web2c/cvtbib.sed bibtex.p
+ $(web2c) bibtex
+ echo timestamp >$@
+ touch bibtex.c bibtex.h
+bibtex.p: tangle bibtex.web bibtex.ch
+ $(tangle) bibtex bibtex
+
+nodist_dvicopy_SOURCES = dvicopy.c dvicopy.h
+dvicopy.c dvicopy.h: dvicopy-web2c
+dvicopy-web2c: $(web2c_common) $(web2c_programs) dvicopy.p
+ $(web2c) dvicopy
+ echo timestamp >$@
+ touch dvicopy.c dvicopy.h
+dvicopy.p: tangle dvicopy.web dvicopy.ch
+ $(tangle) dvicopy dvicopy
+
+nodist_dvitomp_SOURCES = dvitomp.c dvitomp.h
+dvitomp.c dvitomp.h: dvitomp-web2c
+dvitomp-web2c: $(web2c_common) $(web2c_programs) dvitomp.p
+ $(web2c) dvitomp
+ echo timestamp >$@
+ touch dvitomp.c dvitomp.h
+dvitomp.p: tangle dvitomp.web dvitomp.ch
+ $(tangle) dvitomp dvitomp
+
+nodist_dvitype_SOURCES = dvitype.c dvitype.h
+dvitype.c dvitype.h: dvitype-web2c
+dvitype-web2c: $(web2c_common) $(web2c_programs) dvitype.p
+ $(web2c) dvitype
+ echo timestamp >$@
+ touch dvitype.c dvitype.h
+dvitype.p: tangle dvitype.web dvitype.ch
+ $(tangle) dvitype dvitype
+
+nodist_gftodvi_SOURCES = gftodvi.c gftodvi.h
+gftodvi.c gftodvi.h: gftodvi-web2c
+gftodvi-web2c: $(web2c_common) $(web2c_programs) gftodvi.p
+ $(web2c) gftodvi
+ echo timestamp >$@
+ touch gftodvi.c gftodvi.h
+gftodvi.p: tangle gftodvi.web gftodvi.ch
+ $(tangle) gftodvi gftodvi
+gftodvi_SOURCES = gftodmem.h
+
+nodist_gftopk_SOURCES = gftopk.c gftopk.h
+gftopk.c gftopk.h: gftopk-web2c
+gftopk-web2c: $(web2c_common) $(web2c_programs) gftopk.p
+ $(web2c) gftopk
+ echo timestamp >$@
+ touch gftopk.c gftopk.h
+gftopk.p: tangle gftopk.web gftopk.ch
+ $(tangle) gftopk gftopk
+
+nodist_gftype_SOURCES = gftype.c gftype.h
+gftype.c gftype.h: gftype-web2c
+gftype-web2c: $(web2c_common) $(web2c_programs) gftype.p
+ $(web2c) gftype
+ echo timestamp >$@
+ touch gftype.c gftype.h
+gftype.p: tangle gftype.web gftype.ch
+ $(tangle) gftype gftype
+
+nodist_mft_SOURCES = mft.c mft.h
+mft.c mft.h: mft-web2c
+mft-web2c: $(web2c_common) $(web2c_programs) mft.p
+ $(web2c) mft
+ echo timestamp >$@
+ touch mft.c mft.h
+mft.p: tangle mft.web mft.ch
+ $(tangle) mft mft
+
+nodist_patgen_SOURCES = patgen.c patgen.h
+patgen.c patgen.h: patgen-web2c
+patgen-web2c: $(web2c_common) $(web2c_programs) patgen.p
+ $(web2c) patgen
+ echo timestamp >$@
+ touch patgen.c patgen.h
+patgen.p: tangle patgen.web patgen.ch
+ $(tangle) patgen patgen
+
+nodist_pktogf_SOURCES = pktogf.c pktogf.h
+pktogf.c pktogf.h: pktogf-web2c
+pktogf-web2c: $(web2c_common) $(web2c_programs) pktogf.p
+ $(web2c) pktogf
+ echo timestamp >$@
+ touch pktogf.c pktogf.h
+pktogf.p: tangle pktogf.web pktogf.ch
+ $(tangle) pktogf pktogf
+
+nodist_pktype_SOURCES = pktype.c pktype.h
+pktype.c pktype.h: pktype-web2c
+pktype-web2c: $(web2c_common) $(web2c_programs) pktype.p
+ $(web2c) pktype
+ echo timestamp >$@
+ touch pktype.c pktype.h
+pktype.p: tangle pktype.web pktype.ch
+ $(tangle) pktype pktype
+
+nodist_pltotf_SOURCES = pltotf.c pltotf.h
+pltotf.c pltotf.h: pltotf-web2c
+pltotf-web2c: $(web2c_common) $(web2c_programs) pltotf.p
+ $(web2c) pltotf
+ echo timestamp >$@
+ touch pltotf.c pltotf.h
+pltotf.p: tangle pltotf.web pltotf.ch
+ $(tangle) pltotf pltotf
+
+nodist_pooltype_SOURCES = pooltype.c pooltype.h
+pooltype.c pooltype.h: pooltype-web2c
+pooltype-web2c: $(web2c_common) $(web2c_programs) pooltype.p
+ $(web2c) pooltype
+ echo timestamp >$@
+ touch pooltype.c pooltype.h
+pooltype.p: tangle pooltype.web pooltype.ch
+ $(tangle) pooltype pooltype
+
+nodist_tftopl_SOURCES = tftopl.c tftopl.h
+tftopl.c tftopl.h: tftopl-web2c
+tftopl-web2c: $(web2c_common) $(web2c_programs) tftopl.p
+ $(web2c) tftopl
+ echo timestamp >$@
+ touch tftopl.c tftopl.h
+tftopl.p: tangle tftopl.web tftopl.ch
+ $(tangle) tftopl tftopl
+
+nodist_vftovp_SOURCES = vftovp.c vftovp.h
+vftovp.c vftovp.h: vftovp-web2c
+vftovp-web2c: $(web2c_common) $(web2c_programs) vftovp.p
+ $(web2c) vftovp
+ echo timestamp >$@
+ touch vftovp.c vftovp.h
+vftovp.p: tangle vftovp.web vftovp.ch
+ $(tangle) vftovp vftovp
+
+nodist_vptovf_SOURCES = vptovf.c vptovf.h
+vptovf.c vptovf.h: vptovf-web2c
+vptovf-web2c: $(web2c_common) $(web2c_programs) vptovf.p
+ $(web2c) vptovf
+ echo timestamp >$@
+ touch vptovf.c vptovf.h
+vptovf.p: tangle vptovf.web vptovf.ch
+ $(tangle) vptovf vptovf
+
+nodist_weave_SOURCES = weave.c weave.h
+weave.c weave.h: weave-web2c
+weave-web2c: $(web2c_common) $(web2c_programs) weave.p
+ $(web2c) weave
+ echo timestamp >$@
+ touch weave.c weave.h
+weave.p: tangle weave.web weave.ch
+ $(tangle) weave weave
diff --git a/Build/source/texk/web2c/cftests/cftest.ch b/Build/source/texk/web2c/cftests/cftest.ch
new file mode 100644
index 00000000000..220bf25a756
--- /dev/null
+++ b/Build/source/texk/web2c/cftests/cftest.ch
@@ -0,0 +1,7 @@
+% Replace seven_bits by eight_bits.
+
+@x
+@!seven_bits=0..127; {seven-bit numbers, a subrange of the integers}
+@y
+@!eight_bits=0..255; {eight-bit numbers, a subrange of the integers}
+@z
diff --git a/Build/source/texk/web2c/cftests/cftest.p b/Build/source/texk/web2c/cftests/cftest.p
new file mode 100644
index 00000000000..197bae6e97a
--- /dev/null
+++ b/Build/source/texk/web2c/cftests/cftest.p
@@ -0,0 +1,2 @@
+{1:}program CFtest;type{2:}eightbits=0..255;
+{:2}{:1}{3:}begin writeln('This is CFtest');end.{:3}
diff --git a/Build/source/texk/web2c/cftests/cftest.web b/Build/source/texk/web2c/cftests/cftest.web
new file mode 100644
index 00000000000..a49ba6a1947
--- /dev/null
+++ b/Build/source/texk/web2c/cftests/cftest.web
@@ -0,0 +1,15 @@
+% This is not a real program, only to test if tangle works.
+
+@* Introduction.
+This is just a test.
+
+@p program CF_test;
+type @<Types in the outer block@>
+
+@ @<Types...@>=
+@!seven_bits=0..127; {seven-bit numbers, a subrange of the integers}
+
+@* Main program.
+
+@p begin write_ln('This is CFtest');
+end.
diff --git a/Build/source/texk/web2c/cftests/lcftest.p b/Build/source/texk/web2c/cftests/lcftest.p
new file mode 100644
index 00000000000..ab3074345bf
--- /dev/null
+++ b/Build/source/texk/web2c/cftests/lcftest.p
@@ -0,0 +1,2 @@
+{1:}program CFtest;type{2:}eightbits=0..255;{:2}{:1}{3:}
+begin writeln('This is CFtest');end.{:3}
diff --git a/Build/source/texk/web2c/cftests/ocftest.p b/Build/source/texk/web2c/cftests/ocftest.p
new file mode 100644
index 00000000000..ab3074345bf
--- /dev/null
+++ b/Build/source/texk/web2c/cftests/ocftest.p
@@ -0,0 +1,2 @@
+{1:}program CFtest;type{2:}eightbits=0..255;{:2}{:1}{3:}
+begin writeln('This is CFtest');end.{:3}
diff --git a/Build/source/texk/web2c/configure.in.orig b/Build/source/texk/web2c/configure.in.orig
new file mode 100644
index 00000000000..d1034db49ad
--- /dev/null
+++ b/Build/source/texk/web2c/configure.in.orig
@@ -0,0 +1,502 @@
+dnl Process this file with Autoconf to produce a configure script for Web2c.
+dnl
+dnl Some things are no longer configurable:
+dnl - SMALL{TeX,MF,BibTeX}: too painful to maintain the separate patch
+dnl files, and, for TeX, texmfmem.h would have to be fixed to support
+dnl more than 256 fonts.
+dnl - NONASCII: necessary for the character translation feature.
+dnl - REGFIX: modern compilers mostly ignore register declarations, anyway.
+dnl The code for these things remains (where applicable), so you can
+dnl get these features if you are willing to hack the sources. If not,
+dnl it'll take a good argument to convince me to invest the time to make
+dnl them configurable.
+dnl
+dnl We don't use (for example) tex/tex.web because people who only want
+dnl to build part of the distribution may not have any given program.
+dnl Even main.c isn't guaranteed, but then nothing is, really ...
+AC_INIT(web2c/main.c)
+
+WEB2CVERSION=7.5.7
+AC_SUBST(WEB2CVERSION)
+AC_DEFINE_UNQUOTED(WEB2CVERSION," (Web2C $WEB2CVERSION)")
+
+dnl Write output here, instead of putting a zillion -D's on the command line.
+AC_CONFIG_HEADERS([c-auto.h:c-auto.in],
+ [sed 's/^#define PACKAGE_/#define WEB2C_PACKAGE_/' c-auto.h >c-auto.tmp && mv -f c-auto.tmp c-auto.h
+ date >stamp-auto])
+
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+
+AC_PROG_YACC
+AC_PROG_LEX
+# Work around a problem with Flex Version 2.5.31 which needs -l flag.
+# Since all recent versions of flex support -l, don't check for the
+# specific version, but check that at least "--version" is supported.
+# We also want to catch LEX=/some/where/flex, so:
+case $LEX in
+ *flex) $LEX --version >/dev/null 2>&1 && LEX="$LEX -l" ;;
+esac
+AC_PROG_RANLIB
+AC_CHECK_HEADERS(sys/time.h sys/timeb.h locale.h)
+AC_CHECK_FUNCS(strerror gettimeofday ftime mkstemp mktemp setlocale strlcat strlcpy fmax)
+
+AC_TYPE_SIGNAL
+
+pb_AC_ASM_UNDERSCORE
+
+dnl pdfTeX likes inline functions in C code.
+AC_C_INLINE
+
+dnl These are standard among *NIX systems, but not when cross-compiling
+AC_DEFUN([CF_SUBST],
+[AC_MSG_CHECKING(for $1 (symbol $2))
+AC_CACHE_VAL(cf_cv_subst_$2,[
+test -z "[$]$2" && $2=$3
+cf_cv_subst_$2=[$]$2])
+$2=${cf_cv_subst_$2}
+AC_MSG_RESULT([$]$2)
+AC_SUBST($2)
+])dnl
+CF_SUBST(loader,LD,ld)
+CF_SUBST(archiver,AR,ar)
+CF_SUBST(archiver options,ARFLAGS,rc)
+
+# Needed on A/UX 3.0. I don't want to pull in other -lposix's, though.
+# From: bernt@weinberg.pop.bio.aau.dk (Bernt Guldbrandtsen)
+if test `(uname) 2>/dev/null` = aux; then
+ AC_CHECK_LIB(posix, sigemptyset)
+fi
+
+dnl These tests prevent reliable cross-compilation. Sigh.
+dnl Some special hacks are used to make cross-compilation
+dnl succeed in one special case.
+
+AC_UNSET_CC
+AC_C_CHAR_UNSIGNED
+AC_C_BIGENDIAN
+AC_CHECK_SIZEOF(long)
+AC_RESET_CC
+
+# --with and --enable options.
+test "x$with_x_toolkit" = xyes && with_x=yes
+test "x$with_x_toolkit" = xxt && with_x=yes
+test "x$with_x_toolkit" = xathena && with_x=yes
+test "x$with_x" = xno && with_x_toolkit=no
+
+: ${with_x=no} # tell PATH_XTRA no X by default, if not specified.
+
+sinclude(withenable.ac)
+sinclude(../kpathsea/withenable.ac)
+sinclude(../../libs/zlib/withenable.ac)
+sinclude(../../libs/libpng/withenable.ac)
+sinclude(../../libs/zlib/zlib.ac)
+sinclude(../../libs/libpng/libpng.ac)
+sinclude(../../libs/xpdf/libxpdf.ac)
+sinclude(../../libs/obsdcompat/libobsd-compat.ac)
+sinclude(../../libs/freetype2/withenable.ac)
+sinclude(../../libs/freetype2/freetype2.ac)
+sinclude(../../libs/teckit/withenable.ac)
+sinclude(../../libs/teckit/teckit.ac)
+sinclude(../../libs/icu-xetex/withenable.ac)
+sinclude(../../libs/icu-xetex/icu-xetex.ac)
+sinclude(../../libs/graphite-engine/withenable.ac)
+sinclude(../../libs/graphite-engine/graphite-engine.ac)
+
+# Whether to build mf-nowin.
+: ${with_mf_nowin=no} # Default.
+if test "x$with_mf_nowin" = xyes; then
+ MFN=
+else
+ MFN='#! '
+fi
+AC_SUBST(MFN)
+
+# For Omega.
+if test -d $srcdir/omegadir; then
+ test "${with_omega+set}" = set || with_omega=yes
+else
+ if test "x$with_omega" = xyes; then
+ AC_MSG_WARN(The Omega sources are not available.)
+ fi
+ with_omega=no
+fi
+if test "x$with_omega" = xyes; then
+ OMEGA=
+ KPSE_CONFIG_FILES([omegafonts/Makefile otps/Makefile])
+else
+ OMEGA='#! '
+fi
+AC_SUBST(OMEGA)
+
+# For Aleph
+if test -d $srcdir/alephdir && test -d $srcdir/omegadir; then
+ test "${with_aleph+set}" = set || with_aleph=yes
+else
+ if test "x$with_aleph" = xyes; then
+ AC_MSG_WARN(The Aleph sources are not available.)
+ fi
+ with_aleph=no
+fi
+if test "x$with_aleph" = xyes; then
+ ALEPH=
+else
+ ALEPH='#! '
+fi
+AC_SUBST(ALEPH)
+
+# For pdfTeX.
+if test -d $srcdir/pdftexdir; then
+ # Create build dir, if necessary.
+ test -d pdftexdir || mkdir pdftexdir
+ test "${with_pdftex+set}" = set || with_pdftex=yes
+else
+ if test "x$with_pdftex" = xyes; then
+ AC_MSG_WARN(The pdfTeX sources are not available.)
+ fi
+ with_pdftex=no
+fi
+
+# For pdfeTeX
+if test -d $srcdir/pdftexdir; then
+ test "${with_pdfetex+set}" = set || with_pdfetex=yes
+else
+ if test "x$with_pdfetex" = xyes; then
+ AC_MSG_WARN(Not all sources of pdfeTeX are available.)
+ fi
+ with_pdfetex=no
+fi
+
+# For luaTeX.
+if test -d $srcdir/luatexdir; then
+ # Create build dir, if necessary.
+ test -d luatexdir || mkdir luatexdir
+ test "${with_luatex+set}" = set || with_luatex=yes
+else
+ if test "x$with_luatex" = xyes; then
+ AC_MSG_WARN(The luaTeX sources are not available.)
+ fi
+ with_luatex=no
+fi
+
+# For XeTeX
+if test -d $srcdir/xetexdir \
+ && test -d $srcdir/etexdir; then
+ test "${with_xetex+set}" = set || with_xetex=yes
+else
+ if test "x$with_xetex" = xyes; then
+ AC_MSG_WARN(Not all sources of XeTeX are available.)
+ fi
+ with_xetex=no
+fi
+
+# Check whether C++ compiler works. Prevent exit if it doesn't.
+if test "x$with_pdftex" = xyes ||
+ test "x$with_luatex" = xyes ||
+ test "x$with_pdfetex" = xyes ||
+ test "x$with_xetex" = xyes
+then
+ # First test whether the compiler works in a subshell, and if so,
+ # do it again in the main shell so we see the result.
+(
+ AC_PROG_CXX
+) && {
+ AC_PROG_CXX
+} || {
+ test "x$with_pdftex" = xyes \
+ && AC_MSG_WARN(No C++ compiler: pdfTeX will not be compiled.)
+ test "x$with_pdfetex" = xyes \
+ && AC_MSG_WARN(No C++ compiler: pdfeTeX will not be compiled.)
+ test "x$with_luatex" = xyes \
+ && AC_MSG_WARN(No C++ compiler: luaTeX will not be compiled.)
+ test "x$with_xetex" = xyes \
+ && AC_MSG_WARN(No C++ compiler: XeTeX will not be compiled.)
+ with_pdftex=no
+ with_pdfetex=no
+ with_luatex=no
+ with_xetex=no
+ true
+}
+fi
+
+# Check if we can link the C++ runtime lib statically, if we're building
+# some binary that will need it. And, only try the magic hack, if C++ is
+# GNU C++ (i.e. if $ac_cv_prog_gxx=yes). The reason for using a static
+# C++ runtime is that binaries are more portable. That's important only
+# if you are distributing binaries, so it is disabled by default.
+#
+flags_try1='-nodefaultlibs -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lm -lgcc_eh -lgcc -lc -lgcc_eh -lgcc'
+flags_try2='-nodefaultlibs -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lm -lgcc -lc -lgcc'
+CXXLDEXTRA=
+CXXHACKLINK='$(kpathsea_cxx_link)'
+CXXHACKLDLIBS='$(LOADLIBES)'
+if test "x$with_cxx_runtime_hack" = xyes &&
+ { test "x$with_pdftex" = xyes ||
+ test "x$with_luatex" = xyes ||
+ test "x$with_pdfetex" = xyes ||
+ test "x$with_xetex" = xyes; }
+then
+ AC_MSG_CHECKING(for statically linking C++ runtime library)
+
+ cpp_link_hack=false
+ old_flags=$flags
+ old_ac_ext=$ac_ext
+ old_ac_link=$ac_link
+ if test "$ac_cv_prog_gxx" = yes; then
+
+ # New C++ compilers choke on <iostream.h>, thanks to the
+ # backward-incompatible standard. At this point, our code is
+ # using the new-style <iostream>, and so our test should follow suit.
+ #
+ ac_ext=C
+ cat > conftest.$ac_ext << EOF
+#include <iostream>
+ using namespace std;
+int main()
+{
+ cout <<"worksok\n";
+}
+EOF
+ for flags in "$flags_try1" "$flags_try2"; do
+ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS $flags 1>&5'
+ if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ case `(./conftest; exit) 2>/dev/null` in
+ worksok)
+ cpp_link_hack=true; break;;
+ esac
+ else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ done
+ fi
+
+ if $cpp_link_hack; then
+ CXXLDEXTRA=$flags
+ CXXHACKLINK='$(cxx_link_command)'
+ CXXHACKLDLIBS='$(proglib) $(kpathsea_dir)/.libs/libkpathsea.a $(LIBS) $(XLOADLIBES)'
+ AC_MSG_RESULT(ok using $flags)
+ else
+ AC_MSG_RESULT(not supported)
+ fi
+
+ flags=$old_flags
+ ac_ext=$old_ac_ext
+ ac_link=$old_ac_link
+fi
+AC_SUBST(CXXLDEXTRA)
+AC_SUBST(CXXHACKLINK)
+AC_SUBST(CXXHACKLDLIBS)
+
+if test "x$with_pdftex" = xyes; then
+ PTEX=
+else
+ PTEX='#! '
+fi
+AC_SUBST(PTEX)
+
+if test "x$with_pdfetex" = xyes; then
+ PETEX=
+else
+ PETEX='#! '
+fi
+AC_SUBST(PETEX)
+
+if test "x$with_luatex" = xyes; then
+ LTEX=
+else
+ LTEX='#! '
+fi
+AC_SUBST(LTEX)
+
+if test "x$with_xetex" = xyes; then
+ XETEX=
+else
+ XETEX='#! '
+fi
+AC_SUBST(XETEX)
+
+sinclude(xetexdir/withenable.ac)
+sinclude(xetexdir/tests.ac)
+
+sinclude(xetexdir/acx_pthread.m4)
+ACX_PTHREAD
+
+# the following is for OpenBSD, where the PTHREAD_CFLAGS setting is defeated by -nodefaultlibs in the xetex link;
+# similar hackery might be needed on other systems (groan) -- JK 2007-01-07
+case "${host}" in
+*-*-*bsd*)
+ if test "x$PTHREAD_LIBS" = "x"; then
+ PTHREAD_LIBS="-lpthread"
+ fi ;;
+esac
+
+if test "x$with_xetex" = xyes; then
+ AC_HAS_CARBON
+
+ if test "x$has_carbon" = "xyes"; then
+ XETEX_MACOSX=
+ XETEX_GENERIC='#! '
+ else
+ XETEX_MACOSX='#! '
+ XETEX_GENERIC=
+
+ AC_HAS_LIBFONTCONFIG
+ if test "x$LDFONTCONFIG" = "x"; then
+ AC_MSG_ERROR([
+Cannot build XeTeX without libfontconfig.
+Use the --with-fontconfig=DIR option to specify the prefix where
+fontconfig is installed.
+ ])
+ fi
+ AC_SUBST(FONTCONFIGCPPFLAGS)
+ AC_SUBST(FONTCONFIGLDFLAGS)
+ AC_SUBST(LDFONTCONFIG)
+ fi
+ AC_SUBST(XETEX_MACOSX)
+ AC_SUBST(XETEX_GENERIC)
+
+ if test "x$with_graphite" = xno; then
+ XETEX_GRAPHITE='#! '
+ else
+ XETEX_GRAPHITE=
+ fi
+ AC_SUBST(XETEX_GRAPHITE)
+fi
+
+
+# For e-TeX, three choices: no, yes, and tex. In the latter case, we
+# have to comment out the normal TeX build (TEX), as well as enable the
+# e-TeX build (ETEX) and the replacement of TeX with e-TeX in compatibilty
+# mode(CTEX).
+if test -d $srcdir/etexdir; then
+ # Create build dir, if necessary.
+ test -d etexdir || mkdir etexdir
+ test "${with_etex+set}" = set || with_etex=yes
+else
+ if test "x$with_etex" = xyes; then
+ AC_MSG_WARN(The e-TeX sources are not available.)
+ fi
+ with_etex=no
+fi
+if test "x$with_etex" = xyes; then
+ ETEX=
+else
+ ETEX='#! '
+fi
+AC_SUBST(ETEX)
+
+
+# --with-x* options: Distinguish no X at all, no toolkit, or toolkit.
+AC_PATH_XTRA
+if test "x$with_x" = xyes; then
+ if test -n "$x_libraries"; then
+ XLFLAG="-L$x_libraries"
+ wlibs="-lX11 $wlibs $XLFLAG"
+ else
+ wlibs="-lX11 $wlibs"
+ fi
+ if test -z "$x_ext_lib"; then # allow envvar override
+ AC_CHECK_LIB(Xext, XextCreateExtension,
+ x_ext_lib=-lXext, :, $wlibs $X_EXTRA_LIBS $XLFLAG)
+ fi
+ if test "x$with_mf_x_toolkit" = xno; then
+ wfile=x11-Xlib.c
+ else
+ # Effectively demote --with-x-toolkit=athena to xt since
+ # the code does not distinguish.
+ x_tool_libs="-lXt $x_tool_libs"
+ wfile=x11-Xt.c
+ fi
+ test -d window || mkdir window
+ case "$srcdir" in
+ /*) wfile=$srcdir/window/$wfile;;
+ .) ;;
+ *) wfile=../$srcdir/window/$wfile;;
+ esac
+ (cd window && (rm -f x11.c; $LN_S $wfile x11.c))
+ AC_DEFINE([X11WIN], 1, [Define to include X11 window in Metafont.])
+fi
+AC_SUBST(x_ext_lib)
+AC_SUBST(x_tool_libs)
+AC_SUBST(wlibs)
+
+if test "x$enable_fmtutil" = xyes; then
+ FMU='# '
+else
+ FMU=
+fi
+AC_SUBST(FMU)
+
+# Don't bother with pdflib unless pdf*TeX is requested.
+if test "$with_pdftex" = yes || \
+ test "$with_pdfetex" = yes
+then
+ KPSE_CONFIG_FILES([pdftexdir/Makefile])
+fi
+
+# Ditto luatex.
+if test "$with_luatex" = yes; then
+ KPSE_CONFIG_FILES([luatexdir/Makefile])
+fi
+
+dnl Create tests subdirectory.
+test -d tests || mkdir tests
+
+# Is libm present. FIXME: do we need it at all?
+AC_CHECK_LIB(m, main)
+
+# For cross-compilation. Put at the end so there is a fair chance
+# these are still visible when the configure script has finished.
+
+# The variables we need to build binaries that will run on the build
+# machine: BUILDCC, BUILDCFLAGS, BUILDCCLD.
+KPSE_CROSS_BUILD_VAR(CC, cc)
+KPSE_CROSS_BUILD_VAR(CFLAGS, $(BUILDXCFLAGS))
+KPSE_CROSS_BUILD_VAR(CPPFLAGS, $(BUILDXCPPFLAGS))
+KPSE_CROSS_BUILD_VAR(LDFLAGS, $(BUILDXLDFLAGS))
+KPSE_CROSS_BUILD_VAR(CCLD, $(BUILDCC))
+
+# And supporting programs we need to have available on the build
+# machine.
+KPSE_CROSS_PATH_PROG(TANGLEBOOT, tangle, ./tangleboot)
+KPSE_CROSS_PATH_PROG(TANGLE, tangle, ./tangle)
+KPSE_CROSS_PATH_PROG(CTANGLEBOOT, ctangle, ./ctangleboot)
+KPSE_CROSS_PATH_PROG(CTANGLE, ctangle, ./ctangle)
+KPSE_CROSS_PATH_PROG(TIE, tie, ./tie)
+if test "x$with_omega" = xyes || test "x$with_aleph" = xyes || test "x$with_xetex" = xyes; then
+KPSE_CROSS_PATH_PROG(OTANGLE, otangle, ./otangle)
+fi
+
+AH_TOP([/* c-auto.h: defines for web2c, as determined by configure.
+
+ Copyright 1994-97, 2008 Karl Berry.
+ Copyright 1997-99, 2002, 2005 Olaf Weber.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Guard against double inclusion. */
+#ifndef WEB2C_C_AUTO_H
+#define WEB2C_C_AUTO_H
+
+/* web2c: the version string. */
+#define WEB2CVERSION "REPLACE-WITH-WEB2CVERSION"])
+AH_BOTTOM([#endif /* !WEB2C_C_AUTO_H */])
+
+dnl Generate `Makefile's, `config.status', and our header file.
+KPSE_CONFIG_FILES([Makefile doc/Makefile lib/Makefile man/Makefile mpware/Makefile
+ mpdir/Makefile web2c/Makefile window/Makefile])
+AC_OUTPUT
diff --git a/Build/source/texk/web2c/doc/Makefile.in.orig b/Build/source/texk/web2c/doc/Makefile.in.orig
new file mode 100644
index 00000000000..f6ba92e8582
--- /dev/null
+++ b/Build/source/texk/web2c/doc/Makefile.in.orig
@@ -0,0 +1,64 @@
+# @configure_input@
+# Makefile for Web2c documentation.
+
+kpse_include ../make/paths.mk
+kpse_include ../make/common.mk
+kpse_include kpathsea.mk
+kpse_include ../make/texi.mk
+
+info: web2c.info
+dvi: web2c.dvi
+
+web2c.info: install.texi ref.txi
+all: web2c.info web2c.dvi
+
+@MAINT@INSTALL: install.texi
+@MAINT@ $(MAKEINFO) $(one_info) $(MAKEINFO_FLAGS) $< -o $@
+@MAINT@ $(SHELL) $(top_srcdir)/../add-info-toc $@
+@MAINT@doc: info INSTALL
+@MAINT@
+@MAINT@ref.txi: ref.bbl
+@MAINT@ sed -e 's/~/ /g' \
+@MAINT@ -e 's/\\[-`'\''"c^]//g' \
+@MAINT@ -e 's/\\emdash */---/g' \
+@MAINT@ -e 's/metapost/MetaPost/g' \
+@MAINT@ -e 's/\\MF/Metafont/g' \
+@MAINT@ -e 's/\\METAFONT/METAFONT/g' \
+@MAINT@ -e 's/\\TUB/TUGboat/g' \
+@MAINT@ -e 's/\\LaTeX/La@TeX/g' \
+@MAINT@ -e 's/\\AMSTEX/AMS@TeX/g' \
+@MAINT@ -e 's/\\AmSTeX/AMS@TeX/g' \
+@MAINT@ -e 's/\\TeX/@TeX/g' \
+@MAINT@ -e 's/\\noopsort{[^}]*}//g' \
+@MAINT@ -e 's/[{}\]//g' \
+@MAINT@ -e 's/@\[/{/g' \
+@MAINT@ -e 's/@\]/}/g' \
+@MAINT@ -e 's/@TeX/@TeX{}/g' \
+@MAINT@ $< >$@
+@MAINT@
+@MAINT@ref.bbl: ref.aux texinfo.bst
+@MAINT@ -bibtex ref
+@MAINT@
+@MAINT@ref.aux: ref.tex
+@MAINT@ rm -f ref.bbl
+@MAINT@ tex '\nonstopmode \input ref'
+
+Makefile: Makefile.in ../config.status
+ cd .. && $(SHELL) config.status
+
+install: install-exec install-data
+install-exec:
+install-data: web2c.info
+ $(SHELL) $(top_srcdir)/../mkinstalldirs $(infodir)
+ $(INSTALL_DATA) $(srcdir)/web2c.i* $(infodir)/
+#
+ $(POST_INSTALL)
+ if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
+ install-info --info-dir=$(infodir) $(infodir)/web2c.info; \
+ else true; fi
+
+check: all
+
+#html: texi2html -expandinfo -number -menu -split_chapter
+
+kpse_include ../make/clean.mk
diff --git a/Build/source/texk/web2c/etexdir/am/etex.am b/Build/source/texk/web2c/etexdir/am/etex.am
new file mode 100644
index 00000000000..e334bc23b3f
--- /dev/null
+++ b/Build/source/texk/web2c/etexdir/am/etex.am
@@ -0,0 +1,77 @@
+## texk/web2c/etexdir/am/etex.am: Makefile fragment for e-TeX.
+
+## e-TeX
+##
+if ETEX
+bin_PROGRAMS += etex
+endif ETEX
+
+etex_CPPFLAGS =
+
+## With --enable-ipc, e-TeX may need to link with -lsocket.
+etex_LDADD = $(LDADD) $(socketlibs)
+
+etex_c_h = etexini.c etex0.c etex1.c etex2.c etexcoerce.h etexd.h
+nodist_etex_SOURCES = $(etex_c_h) etex-pool.c etexextra.c etexdir/etexextra.h
+$(etex_c_h): etex-web2c
+etex-web2c: etex.p $(web2c_texmf)
+ $(web2c) etex
+ : $(synctex_convert_etex)
+ echo timestamp >$@
+ touch $(etex_c_h)
+etexextra.c: etexdir/etexextra.h lib/texmfmp.c etexd.h
+ sed s/TEX-OR-MF-OR-MP/etex/ $(srcdir)/lib/texmfmp.c >$@
+etex.p etex.pool: etex-tangle
+etex-tangle: tangle etex.web etex.ch
+ $(tangle) etex etex
+ echo timestamp >$@
+ touch etex.p etex.pool
+etex-pool.c: etex.pool $(makecpool) tmf-pool.h
+ $(makecpool) etex.pool $(srcdir)/tmf-pool.h >$@ || rm -f $@
+## Extract etex version
+etexdir/etex.version: etexdir/etex.ch
+ $(mkdir_p) etexdir
+ grep '^@d eTeX_version_string==' $(srcdir)/etexdir/etex.ch \
+ | sed "s/^.*'-//;s/'.*$$//" >etexdir/etex.version
+etexdir/etexextra.h: etexdir/etexextra.in etexdir/etex.version
+ sed s/ETEX-VERSION/`cat etexdir/etex.version`/ \
+ $(srcdir)/etexdir/etexextra.in >$@
+## Generate etex.web
+etex.web: $(TIE) $(etex_web_srcs)
+ $(tie) -m etex.web $(etex_web_srcs)
+etex_web_srcs = \
+ tex.web \
+ etexdir/etex.ch \
+ etexdir/etex.fix
+## Generate etex.ch
+etex.ch: $(TIE) etex.web $(etex_ch_srcs)
+ $(tie) -c etex.ch etex.web $(etex_ch_srcs)
+
+etex_ch_srcs = \
+ etexdir/tex.ch0 \
+ tex.ch \
+ $(etex_ch_synctex) \
+ etexdir/tex.ch1 \
+ etexdir/tex.ech \
+ etexdir/etex-binpool.ch
+##
+EXTRA_DIST += $(etex_web_srcs) $(etex_ch_srcs) etexdir/etexextra.in \
+ lib/texmfmp.c tmf-pool.h
+
+DISTCLEANFILES += $(nodist_etex_SOURCES) etex.web etex.ch etex-web2c \
+ etex.p etex.pool etex-tangle etexdir/etex.version
+
+EXTRA_DIST += \
+ etexdir/ChangeLog \
+ etexdir/INSTALL \
+ etexdir/README \
+ etexdir/etex_gen.tex
+
+## Not used
+##
+EXTRA_DIST += etexdir/etex.mak
+
+## Eventually delete these files
+##
+EXTRA_DIST += etexdir/etex.mk
+
diff --git a/Build/source/texk/web2c/luatexdir/am/luatex.am b/Build/source/texk/web2c/luatexdir/am/luatex.am
new file mode 100644
index 00000000000..6dbeee810fd
--- /dev/null
+++ b/Build/source/texk/web2c/luatexdir/am/luatex.am
@@ -0,0 +1,564 @@
+## texk/web2c/luatexdir/am/luatex.am: Makefile fragment for luaTeX.
+
+## luaTeX
+##
+if LUATEX
+bin_PROGRAMS += luatex
+endif LUATEX
+
+## Force Automake to use CXXLD for linking
+nodist_EXTRA_luatex_SOURCES = dummy.cxx
+
+luatex_tangle = WEBINPUTS=$(srcdir)/luatexdir $(buildenv) $(LUATANGLE)
+
+luatex_CPPFLAGS = $(ZLIB_INCLUDES) $(LIBPNG_INCLUDES) $(XPDF_INCLUDES)
+luatex_CPPFLAGS += $(OBSDCOMPAT_INCLUDES) -I$(srcdir)/libmd5
+luatex_CPPFLAGS += -Iluatexdir -I$(srcdir)/luatexdir -I$(srcdir)/luatexdir/lua51
+luatex_CPPFLAGS += -Dextra_version_info=`date +-%Y%m%d%H`
+
+luatex_ldadd = libluatex.a libff.a libluamisc.a libzzip.a liblua51.a
+luatex_ldadd += $(LIBPNG_LIBS) $(ZLIB_LIBS) $(XPDF_LIBS)
+luatex_ldadd += $(OBSDCOMPAT_LIBS) libmd5.a
+
+luatex_LDADD = $(luatex_ldadd) $(LDADD) $(socketlibs)
+
+luatex_DEPENDENCIES = $(proglib) libluatex.a
+luatex_DEPENDENCIES += $(LIBPNG_DEPEND) $(ZLIB_DEPEND) $(XPDF_DEPEND)
+luatex_DEPENDENCIES += $(OBSDCOMPAT_DEPEND) libmd5.a
+
+luatex_c_h = luatexini.c luatex0.c luatex1.c luatex2.c luatex3.c luatexcoerce.h luatexd.h
+nodist_luatex_SOURCES = $(luatex_c_h) luatex-pool.c luatexextra.c luatexdir/luatexextra.h
+$(luatex_c_h): luatex-web2c
+luatex-web2c: luatex.p $(web2c_texmf) luatexdir/luatex.defines
+ $(web2c) luatex
+ echo timestamp >$@
+ touch $(luatex_c_h)
+luatexextra.c: luatexd.h luatexdir/luatexextra.h lib/texmfmp.c
+ sed s/TEX-OR-MF-OR-MP/luatex/ $(srcdir)/lib/texmfmp.c >$@
+luatex_sources = luatexdir/luatex.web luatexdir/luatex.ch
+luatex.p luatex.pool: luatex-tangle
+luatex-tangle: luatangle $(luatex_sources)
+ $(luatex_tangle) --underlines luatex luatex
+ echo timestamp >$@
+ touch luatex.p luatex.pool
+luatex-pool.c: luatex.pool $(makecpool) luatexdir/ptexlib.h luatexd.h
+ $(makecpool) luatex.pool luatexdir/ptexlib.h >$@ || rm -f $@
+## Extract luatex version
+luatexdir/luatex.version: luatexdir/luatex.web
+ $(mkdir_p) luatexdir
+ grep '^@d luatex_version_string==' $(srcdir)/luatexdir/luatex.web \
+ | sed "s/^.*=='//;s/'.*$$//" >luatexdir/luatex.version
+luatexdir/luatexextra.h: luatexdir/luatexextra.in luatexdir/luatex.version
+ sed -e s/LUATEX-VERSION/`cat luatexdir/luatex.version`/ \
+ $(srcdir)/luatexdir/luatexextra.in >$@
+
+EXTRA_DIST += $(luatex_sources) \
+ luatexdir/luatex.defines \
+ luatexdir/luatexextra.in \
+ luatexdir/ptexlib.h
+
+DISTCLEANFILES += $(nodist_luatex_SOURCES) luatex-web2c \
+ luatex.p luatex.pool luatex-tangle luatexdir/luatex.version
+
+## luatangle
+##
+if LUATEX
+bin_PROGRAMS += luatangle
+endif LUATEX
+
+nodist_luatangle_SOURCES = luatangle.c luatangle.h
+luatangle.c luatangle.h: $(web2c_common) $(web2c_programs) luatangle.p
+ $(web2c) luatangle
+EXTRA_DIST += $(luatangle_sources)
+luatangle_sources = luatexdir/luatangle.web luatexdir/luatangle.ch
+luatangle.p: tangle $(luatangle_sources)
+ WEBINPUTS=$(srcdir)/luatexdir $(buildenv) $(TANGLE) luatangle luatangle
+DISTCLEANFILES += luatangle.c luatangle.h luatangle.p
+
+## liblua51
+##
+EXTRA_LIBRARIES += liblua51.a
+
+liblua51_a_CPPFLAGS = -I$(top_srcdir)/luatexdir/lua51
+if !MINGW32
+liblua51_a_CPPFLAGS += -DLUA_USE_POSIX
+endif !MINGW32
+
+liblua51_a_SOURCES = \
+ luatexdir/lua51/lapi.c \
+ luatexdir/lua51/lapi.h \
+ luatexdir/lua51/lauxlib.c \
+ luatexdir/lua51/lauxlib.h \
+ luatexdir/lua51/lbaselib.c \
+ luatexdir/lua51/lcoco.c \
+ luatexdir/lua51/lcoco.h \
+ luatexdir/lua51/lcode.c \
+ luatexdir/lua51/lcode.h \
+ luatexdir/lua51/ldblib.c \
+ luatexdir/lua51/ldebug.c \
+ luatexdir/lua51/ldebug.h \
+ luatexdir/lua51/ldo.c \
+ luatexdir/lua51/ldo.h \
+ luatexdir/lua51/ldump.c \
+ luatexdir/lua51/lfunc.c \
+ luatexdir/lua51/lfunc.h \
+ luatexdir/lua51/lgc.c \
+ luatexdir/lua51/lgc.h \
+ luatexdir/lua51/linit.c \
+ luatexdir/lua51/liolib.c \
+ luatexdir/lua51/llex.c \
+ luatexdir/lua51/llex.h \
+ luatexdir/lua51/llimits.h \
+ luatexdir/lua51/lmathlib.c \
+ luatexdir/lua51/lmem.c \
+ luatexdir/lua51/lmem.h \
+ luatexdir/lua51/loadlib.c \
+ luatexdir/lua51/lobject.c \
+ luatexdir/lua51/lobject.h \
+ luatexdir/lua51/lopcodes.c \
+ luatexdir/lua51/lopcodes.h \
+ luatexdir/lua51/loslib.c \
+ luatexdir/lua51/lparser.c \
+ luatexdir/lua51/lparser.h \
+ luatexdir/lua51/lstate.c \
+ luatexdir/lua51/lstate.h \
+ luatexdir/lua51/lstring.c \
+ luatexdir/lua51/lstring.h \
+ luatexdir/lua51/lstrlib.c \
+ luatexdir/lua51/ltable.c \
+ luatexdir/lua51/ltable.h \
+ luatexdir/lua51/ltablib.c \
+ luatexdir/lua51/ltm.c \
+ luatexdir/lua51/ltm.h \
+ luatexdir/lua51/lua.h \
+ luatexdir/lua51/luaconf.h \
+ luatexdir/lua51/lualib.h \
+ luatexdir/lua51/lundump.c \
+ luatexdir/lua51/lundump.h \
+ luatexdir/lua51/lvm.c \
+ luatexdir/lua51/lvm.h \
+ luatexdir/lua51/lzio.c \
+ luatexdir/lua51/lzio.h
+
+## Not used
+##
+EXTRA_DIST += \
+ luatexdir/lua51/Makefile \
+ luatexdir/lua51/lua.c \
+ luatexdir/lua51/luac.c \
+ luatexdir/lua51/print.c
+
+## zziplib
+##
+EXTRA_LIBRARIES += libzzip.a
+
+libzzip_a_DEPENDENCIES = liblua51.a
+
+libzzip_a_CPPFLAGS = \
+ $(KPSE_ZLIB_INCLUDES) \
+ -I$(top_srcdir)/luatexdir/zziplib
+
+libzzip_a_SOURCES = \
+ luatexdir/zziplib/zzip/__debug.h \
+ luatexdir/zziplib/zzip/__dirent.h \
+ luatexdir/zziplib/zzip/__fnmatch.h \
+ luatexdir/zziplib/zzip/__hints.h \
+ luatexdir/zziplib/zzip/__mmap.h \
+ luatexdir/zziplib/zzip/_config.h \
+ luatexdir/zziplib/zzip/conf.h \
+ luatexdir/zziplib/zzip/dir.c \
+ luatexdir/zziplib/zzip/err.c \
+ luatexdir/zziplib/zzip/fetch.c \
+ luatexdir/zziplib/zzip/fetch.h \
+ luatexdir/zziplib/zzip/file.c \
+ luatexdir/zziplib/zzip/file.h \
+ luatexdir/zziplib/zzip/format.h \
+ luatexdir/zziplib/zzip/info.c \
+ luatexdir/zziplib/zzip/info.h \
+ luatexdir/zziplib/zzip/lib.h \
+ luatexdir/zziplib/zzip/memdisk.c \
+ luatexdir/zziplib/zzip/memdisk.h \
+ luatexdir/zziplib/zzip/mmapped.c \
+ luatexdir/zziplib/zzip/mmapped.h \
+ luatexdir/zziplib/zzip/plugin.c \
+ luatexdir/zziplib/zzip/plugin.h \
+ luatexdir/zziplib/zzip/stdint.h \
+ luatexdir/zziplib/zzip/stat.c \
+ luatexdir/zziplib/zzip/types.h \
+ luatexdir/zziplib/zzip/write.c \
+ luatexdir/zziplib/zzip/zip.c \
+ luatexdir/zziplib/zzip/zzip.h
+
+EXTRA_DIST += \
+ luatexdir/zziplib/COPYING.LIB \
+ luatexdir/zziplib/ChangeLog \
+ luatexdir/zziplib/README \
+ luatexdir/zziplib/TODO \
+ luatexdir/zziplib/zziplib.spec
+
+## Not used
+##
+EXTRA_DIST += \
+ luatexdir/zziplib/Makefile.am \
+ luatexdir/zziplib/Makefile.in \
+ luatexdir/zziplib/Makefile.mk \
+ luatexdir/zziplib/SDL \
+ luatexdir/zziplib/aclocal.m4 \
+ luatexdir/zziplib/bins \
+ luatexdir/zziplib/config.h.in \
+ luatexdir/zziplib/configure \
+ luatexdir/zziplib/configure.ac \
+ luatexdir/zziplib/docs \
+ luatexdir/zziplib/m4 \
+ luatexdir/zziplib/msvc6 \
+ luatexdir/zziplib/msvc7 \
+ luatexdir/zziplib/msvc8 \
+ luatexdir/zziplib/test \
+ luatexdir/zziplib/uses \
+ luatexdir/zziplib/zzip/Makefile \
+ luatexdir/zziplib/zzip/Makefile.am \
+ luatexdir/zziplib/zzip/Makefile.in \
+ luatexdir/zziplib/zzip/_msvc.h \
+ luatexdir/zziplib/zzip/_msvc.sed \
+ luatexdir/zziplib/zzip/autoconf.h \
+ luatexdir/zziplib/zzip/fseeko.c \
+ luatexdir/zziplib/zzip/fseeko.h \
+ luatexdir/zziplib/zzip/zziplib.wpj \
+ luatexdir/zziplib/zzipback.sed \
+ luatexdir/zziplib/zzipwrap
+
+## libluamisc (luafilesystem, luamd5, luapeg, luazip, luazlib,
+## and slnunicode)
+EXTRA_LIBRARIES += libluamisc.a
+
+libluamisc_a_DEPENDENCIES = $(KPSE_ZLIB_DEPEND) libzzip.a
+
+libluamisc_a_CPPFLAGS = \
+ $(KPSE_ZLIB_INCLUDES) \
+ -I$(top_srcdir)/luatexdir/lua51 \
+ -I$(top_srcdir)/luatexdir/zziplib
+
+libluamisc_a_SOURCES = \
+ luatexdir/luafilesystem/src/lfs.c \
+ luatexdir/luafilesystem/src/lfs.h \
+ luatexdir/luamd5/md5.c \
+ luatexdir/luamd5/md5.h \
+ luatexdir/luamd5/md5lib.c \
+ luatexdir/luapeg/lpeg.c \
+ luatexdir/luazip/src/luazip.c \
+ luatexdir/luazip/src/luazip.h \
+ luatexdir/luazlib/lgzip.c \
+ luatexdir/luazlib/lzlib.c \
+ luatexdir/slnunicode/slnunico.c
+
+## Included by slnunico.c
+EXTRA_libluamisc_a_SOURCES = luatexdir/slnunicode/slnudata.c
+
+## Not used
+##
+EXTRA_DIST += \
+ luatexdir/luafilesystem/Makefile \
+ luatexdir/luafilesystem/config \
+ luatexdir/luafilesystem/doc \
+ luatexdir/luafilesystem/tests \
+ luatexdir/luafilesystem/vc6 \
+ luatexdir/luamd5/makefile \
+ luatexdir/luamd5/md5.html \
+ luatexdir/luamd5/md5.lua \
+ luatexdir/luamd5/md5tests.lua \
+ luatexdir/luazip/Makefile \
+ luatexdir/luazip/README \
+ luatexdir/luazip/config \
+ luatexdir/luazip/doc \
+ luatexdir/luazip/tests \
+ luatexdir/luazip/vc6 \
+ luatexdir/luazip/vc7 \
+ luatexdir/luazlib/Makefile \
+ luatexdir/luazlib/README \
+ luatexdir/luazlib/gzip.lua \
+ luatexdir/luazlib/test_gzip.lua \
+ luatexdir/luazlib/test_zlib.lua \
+ luatexdir/luazlib/zlib.lua \
+ luatexdir/slnunicode/unitest
+
+## luafontforge
+##
+EXTRA_LIBRARIES += libff.a
+
+libff_a_DEPENDENCIES = libluamisc.a
+
+libff_a_CPPFLAGS = \
+ -DFONTFORGE_CONFIG_NO_WINDOWING_UI=1 -DLUA_FF_LIB=1 \
+ -D_NO_PYTHON=1 -DX_DISPLAY_MISSING=1 -DNODYNAMIC=1 \
+ -D_NO_FREETYPE=1 -D_NO_LIBUNINAMESLIST=1 -UHAVE_LIBINTL_H \
+ -I$(top_srcdir)/luatexdir/lua51 \
+ -I$(top_srcdir)/luatexdir/luafontforge/fontforge/inc \
+ -I$(top_srcdir)/luatexdir/luafontforge/fontforge/fontforge
+
+libff_a_SOURCES = \
+ luatexdir/luafontforge/fontforge/Unicode/alphabet.c \
+ luatexdir/luafontforge/fontforge/Unicode/char.c \
+ luatexdir/luafontforge/fontforge/Unicode/cjk.c \
+ luatexdir/luafontforge/fontforge/Unicode/gwwiconv.c \
+ luatexdir/luafontforge/fontforge/Unicode/memory.c \
+ luatexdir/luafontforge/fontforge/Unicode/ustring.c \
+ luatexdir/luafontforge/fontforge/fontforge/autohint.c \
+ luatexdir/luafontforge/fontforge/fontforge/charview.c \
+ luatexdir/luafontforge/fontforge/fontforge/configure-pfaedit.h \
+ luatexdir/luafontforge/fontforge/fontforge/contextchain.c \
+ luatexdir/luafontforge/fontforge/fontforge/edgelist.h \
+ luatexdir/luafontforge/fontforge/fontforge/edgelist2.h \
+ luatexdir/luafontforge/fontforge/fontforge/encoding.c \
+ luatexdir/luafontforge/fontforge/fontforge/featurefile.c \
+ luatexdir/luafontforge/fontforge/fontforge/fontinfo.c \
+ luatexdir/luafontforge/fontforge/fontforge/fontview.c \
+ luatexdir/luafontforge/fontforge/fontforge/fvfonts.c \
+ luatexdir/luafontforge/fontforge/fontforge/groups.h \
+ luatexdir/luafontforge/fontforge/fontforge/kernclass.c \
+ luatexdir/luafontforge/fontforge/fontforge/lookups.c \
+ luatexdir/luafontforge/fontforge/fontforge/macbinary.c \
+ luatexdir/luafontforge/fontforge/fontforge/macenc.c \
+ luatexdir/luafontforge/fontforge/fontforge/namelist.c \
+ luatexdir/luafontforge/fontforge/fontforge/ofl.h \
+ luatexdir/luafontforge/fontforge/fontforge/parsepfa.c \
+ luatexdir/luafontforge/fontforge/fontforge/parsettf.c \
+ luatexdir/luafontforge/fontforge/fontforge/parsettfatt.c \
+ luatexdir/luafontforge/fontforge/fontforge/parsettfvar.c \
+ luatexdir/luafontforge/fontforge/fontforge/pfaedit.h \
+ luatexdir/luafontforge/fontforge/fontforge/pfaeditui.h \
+ luatexdir/luafontforge/fontforge/fontforge/plugins.h \
+ luatexdir/luafontforge/fontforge/fontforge/prefs.c \
+ luatexdir/luafontforge/fontforge/fontforge/psfont.h \
+ luatexdir/luafontforge/fontforge/fontforge/psread.c \
+ luatexdir/luafontforge/fontforge/fontforge/pua.c \
+ luatexdir/luafontforge/fontforge/fontforge/sd.h \
+ luatexdir/luafontforge/fontforge/fontforge/splinefill.c \
+ luatexdir/luafontforge/fontforge/fontforge/splinefont.h \
+ luatexdir/luafontforge/fontforge/fontforge/splineorder2.c \
+ luatexdir/luafontforge/fontforge/fontforge/splineoverlap.c \
+ luatexdir/luafontforge/fontforge/fontforge/splinerefigure.c \
+ luatexdir/luafontforge/fontforge/fontforge/splinesave.c \
+ luatexdir/luafontforge/fontforge/fontforge/splinestroke.c \
+ luatexdir/luafontforge/fontforge/fontforge/splineutil.c \
+ luatexdir/luafontforge/fontforge/fontforge/splineutil2.c \
+ luatexdir/luafontforge/fontforge/fontforge/stamp.c \
+ luatexdir/luafontforge/fontforge/fontforge/start.c \
+ luatexdir/luafontforge/fontforge/fontforge/stemdb.c \
+ luatexdir/luafontforge/fontforge/fontforge/stemdb.h \
+ luatexdir/luafontforge/fontforge/fontforge/tottf.c \
+ luatexdir/luafontforge/fontforge/fontforge/tottfgpos.c \
+ luatexdir/luafontforge/fontforge/fontforge/ttf.h \
+ luatexdir/luafontforge/fontforge/fontforge/tottfvar.c \
+ luatexdir/luafontforge/fontforge/fontforge/ttfspecial.c \
+ luatexdir/luafontforge/fontforge/fontforge/unicoderange.h \
+ luatexdir/luafontforge/fontforge/fontforge/views.h \
+ luatexdir/luafontforge/fontforge/inc/basics.h \
+ luatexdir/luafontforge/fontforge/inc/chardata.h \
+ luatexdir/luafontforge/fontforge/inc/charset.h \
+ luatexdir/luafontforge/fontforge/inc/dynamic.h \
+ luatexdir/luafontforge/fontforge/inc/fileutil.h \
+ luatexdir/luafontforge/fontforge/inc/gdraw.h \
+ luatexdir/luafontforge/fontforge/inc/gfile.h \
+ luatexdir/luafontforge/fontforge/inc/ggadget.h \
+ luatexdir/luafontforge/fontforge/inc/gicons.h \
+ luatexdir/luafontforge/fontforge/inc/gio.h \
+ luatexdir/luafontforge/fontforge/inc/gkeysym.h \
+ luatexdir/luafontforge/fontforge/inc/gprogress.h \
+ luatexdir/luafontforge/fontforge/inc/gresource.h \
+ luatexdir/luafontforge/fontforge/inc/gwidget.h \
+ luatexdir/luafontforge/fontforge/inc/gwwiconv.h \
+ luatexdir/luafontforge/fontforge/inc/intl.h \
+ luatexdir/luafontforge/fontforge/inc/ustring.h \
+ luatexdir/luafontforge/fontforge/inc/utype.h \
+ luatexdir/luafontforge/src/ffdummies.c \
+ luatexdir/luafontforge/src/luafflib.c
+
+EXTRA_DIST += \
+ luatexdir/luafontforge/ChangeLog \
+ luatexdir/luafontforge/fontforge/AUTHORS \
+ luatexdir/luafontforge/fontforge/INSTALL \
+ luatexdir/luafontforge/fontforge/LICENSE \
+ luatexdir/luafontforge/fontforge/VERSION
+
+## Not used
+##
+EXTRA_DIST += \
+ luatexdir/luafontforge/Makefile \
+ luatexdir/luafontforge/fontforge/Makefile \
+ luatexdir/luafontforge/fontforge/Unicode/Makefile \
+ luatexdir/luafontforge/fontforge/Unicode/descrip.mms \
+ luatexdir/luafontforge/fontforge/descrip.mms \
+ luatexdir/luafontforge/fontforge/fontforge/Makefile \
+ luatexdir/luafontforge/fontforge/fontforge/descrip.mms \
+ luatexdir/luafontforge/fontforge/fontforge/lff.opt \
+ luatexdir/luafontforge/fontforge/fontforge/scriptfuncs.h \
+ luatexdir/luafontforge/fontforge/fontforge/scripting.h \
+ luatexdir/luafontforge/fontforge/fontforge/sfd1.h \
+ luatexdir/luafontforge/fontforge/fontforge/stamper.c \
+ luatexdir/luafontforge/fontforge/fontforge/xlib.opt
+
+## libluatex
+##
+EXTRA_LIBRARIES += libluatex.a
+
+libluatex_a_DEPENDENCIES = libff.a
+
+libluatex_a_CPPFLAGS = $(ZLIB_INCLUDES) $(LIBPNG_INCLUDES) $(XPDF_INCLUDES)
+libluatex_a_CPPFLAGS += $(OBSDCOMPAT_INCLUDES) -I$(srcdir)/libmd5
+libluatex_a_CPPFLAGS += -Iluatexdir -I$(srcdir)/luatexdir -I$(srcdir)/luatexdir/lua51
+libluatex_a_CPPFLAGS += -DpdfTeX
+
+libluatex_a_SOURCES = \
+ luatexdir/avl.c \
+ luatexdir/avl.h \
+ luatexdir/avlstuff.c \
+ luatexdir/avlstuff.h \
+ luatexdir/font/dofont.c \
+ luatexdir/font/luafont.c \
+ luatexdir/font/mapfile.c \
+ luatexdir/font/pkin.c \
+ luatexdir/font/sfnt.c \
+ luatexdir/font/sfnt.h \
+ luatexdir/font/subfont.c \
+ luatexdir/font/texfont.c \
+ luatexdir/font/texfont.h \
+ luatexdir/font/tfmofm.c \
+ luatexdir/font/tounicode.c \
+ luatexdir/font/tt_glyf.c \
+ luatexdir/font/tt_glyf.h \
+ luatexdir/font/tt_table.c \
+ luatexdir/font/tt_table.h \
+ luatexdir/font/vfovf.c \
+ luatexdir/font/vfpacket.c \
+ luatexdir/font/writecff.c \
+ luatexdir/font/writecff.h \
+ luatexdir/font/writeenc.c \
+ luatexdir/font/writefont.c \
+ luatexdir/font/writet1.c \
+ luatexdir/font/writet3.c \
+ luatexdir/font/writettf.c \
+ luatexdir/font/writettf.h \
+ luatexdir/font/writetype0.c \
+ luatexdir/font/writetype2.c \
+ luatexdir/hyphen.h \
+ luatexdir/image/epdf.c \
+ luatexdir/image/epdf.h \
+ luatexdir/image/image.h \
+ luatexdir/image/pdftoepdf.cc \
+ luatexdir/image/writeimg.c \
+ luatexdir/image/writejbig2.c \
+ luatexdir/image/writejbig2.h \
+ luatexdir/image/writejpg.c \
+ luatexdir/image/writepng.c \
+ luatexdir/lang/hnjalloc.c \
+ luatexdir/lang/hnjalloc.h \
+ luatexdir/lang/hyphen.c \
+ luatexdir/lang/texlang.c \
+ luatexdir/lua/lcallbacklib.c \
+ luatexdir/lua/lfontlib.c \
+ luatexdir/lua/limglib.c \
+ luatexdir/lua/lkpselib.c \
+ luatexdir/lua/llanglib.c \
+ luatexdir/lua/llualib.c \
+ luatexdir/lua/lmplib.c \
+ luatexdir/lua/lnodelib.c \
+ luatexdir/lua/loslibext.c \
+ luatexdir/lua/lpdflib.c \
+ luatexdir/lua/lstatslib.c \
+ luatexdir/lua/ltexiolib.c \
+ luatexdir/lua/ltexlib.c \
+ luatexdir/lua/ltokenlib.c \
+ luatexdir/lua/luainit.c \
+ luatexdir/lua/luanode.c \
+ luatexdir/lua/luastuff.c \
+ luatexdir/lua/luatex.c \
+ luatexdir/lua/luatoken.c \
+ luatexdir/lua/texluac.c \
+ luatexdir/luatex-api.h \
+ luatexdir/luatex.h \
+ luatexdir/managed-sa.c \
+ luatexdir/managed-sa.h \
+ luatexdir/mathcodes.c \
+ luatexdir/nodes.h \
+ luatexdir/ptexmac.h \
+ luatexdir/svnversion.h \
+ luatexdir/tex/linebreak.c \
+ luatexdir/tex/postlinebreak.c \
+ luatexdir/tex/texnodes.c \
+ luatexdir/tex/texpdf.c \
+ luatexdir/tex/textoken.c \
+ luatexdir/textcodes.c \
+ luatexdir/tokens.h \
+ luatexdir/utils.c \
+ luatexdir/writezip.c
+
+nodist_libluatex_a_SOURCES = $(lua_mp_c_h)
+
+## We must create lua_mp_c_h before compiling the libluatex_a_SOURCES,
+## but certainly don't want to create lua_mp_c_h if luaTeX is not built.
+if LUATEX
+$(libluatex_a_SOURCES): $(lua_mp_c_h)
+endif LUATEX
+
+## These files are mutually dependent
+lua_mp_c_h = luatexdir/mp.c luatexdir/mplib.h luatexdir/mpmp.h
+lua_mp_c_h += luatexdir/mppsout.h luatexdir/psout.c
+lua_mp_web = luatexdir/lua/mp.w luatexdir/lua/psout.w
+$(lua_mp_c_h): mp-ctangle
+mp-ctangle: ctangle $(lua_mp_web) luatexd.h
+ $(mkdir_p) luatexdir
+ CWEBINPUTS=$(srcdir)/luatexdir/lua $(ctangle) mp.w
+ CWEBINPUTS=$(srcdir)/luatexdir/lua $(ctangle) psout.w
+ rm -f $(lua_mp_c_h)
+ mv mp.c mplib.h mpmp.h mppsout.h psout.c luatexdir
+ echo timestamp >$@
+ touch $(lua_mp_c_h)
+
+EXTRA_DIST += $(lua_mp_web)
+
+DISTCLEANFILES += $(lua_mp_c_h) mp-ctangle
+
+## included by luatexdir/font/writettf.c
+EXTRA_libluatex_a_SOURCES = luatexdir/font/macnames.c
+
+EXTRA_DIST += \
+ luatexdir/ChangeLog \
+ luatexdir/NEWS \
+ luatexdir/README \
+ luatexdir/change-files.txt \
+ luatexdir/font/subfont.txt
+
+## Not used (pdftosrc and ttf2afm)
+##
+EXTRA_DIST += \
+ luatexdir/pdftosrc.1 \
+ luatexdir/pdftosrc.cc \
+ luatexdir/pdftosrc.rc \
+ luatexdir/ttf2afm.c \
+ luatexdir/ttf2afm.rc
+
+## included by luatexdir/ttf2afm.c
+EXTRA_DIST += luatexdir/macnames.c
+
+## Tests
+
+dist_check_SCRIPTS += luatexdir/luatangle.test
+
+if LUATEX
+TESTS += luatexdir/luatangle.test
+endif LUATEX
+
+DISTCLEANFILES += cftest.p
+
+## Eventually delete these files
+##
+EXTRA_DIST += \
+ luatexdir/.indent.pro \
+ luatexdir/Makefile.in \
+ luatexdir/depend.mk \
+ luatexdir/font/.indent.pro \
+ luatexdir/image/.indent.pro \
+ luatexdir/lua/.indent.pro \
+ luatexdir/luatex.mk \
+ luatexdir/luatexlib.mk
+
diff --git a/Build/source/texk/web2c/mpdir/Makefile.in.orig b/Build/source/texk/web2c/mpdir/Makefile.in.orig
new file mode 100644
index 00000000000..8b51105e713
--- /dev/null
+++ b/Build/source/texk/web2c/mpdir/Makefile.in.orig
@@ -0,0 +1,41 @@
+# @configure_input@
+# Makefile for libmpost - taco@elvenkind.com, but
+# mostly ripped off from Makefile.in from pdftex
+# $Id $
+
+kpse_include ../make/common.mk
+kpse_include ../make/programs.mk
+kpse_include ../make/library.mk
+
+kpathsea_srcdir_parent = $(srcdir)/../..
+kpathsea_dir_parent = ../..
+
+ALL_CXXFLAGS = @CXXFLAGS@ @DEFS@ $(XXCFLAGS) -I. -I$(srcdir) -I$(kpathsea_dir_parent) -I$(kpathsea_srcdir_parent)
+CXX = @CXX@
+
+XCPPFLAGS=-I.. -I$(srcdir)/.. -I../.. -I$(srcdir)/../..
+
+OBJS = mapfile.o avl.o avlstuff.o utils.o writeenc.o writet1.o writefont.o turningnumber.o
+
+all: libmpost.a makecpool
+
+libmpost.a: $(OBJS)
+ rm -f $@
+ $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(RANLIB) $@
+
+makecpool: makecpool.o
+ $(link_command) makecpool.o
+
+kpse_include ../make/clean.mk
+
+clean::
+ rm -f libmpost.a makecpool
+
+depend:
+ rm -f $(OBJS)
+ XXCFLAGS=-MM XCFLAGS=-MM $(MAKE) -k $(OBJS) | \
+ grep -v "^$(CC)\|$(CXX)\|$(AR)\|make" | \
+ sed 's: [^ ]*/\.\./libs/[^ ]*::g' > $(srcdir)/depend.mk
+
+kpse_include mpdir/depend.mk
diff --git a/Build/source/texk/web2c/mpdir/am/mp.am b/Build/source/texk/web2c/mpdir/am/mp.am
new file mode 100644
index 00000000000..eb89d5b0e96
--- /dev/null
+++ b/Build/source/texk/web2c/mpdir/am/mp.am
@@ -0,0 +1,59 @@
+## texk/web2c/mpdir/am/mp.am: Makefile fragment for MetaPost.
+
+## MetaPost
+##
+if MP
+bin_PROGRAMS += mpost
+endif MP
+
+mpost_CPPFLAGS = -I$(srcdir)/mpdir
+mpost_LDADD = libmpost.a $(LDADD)
+mpost_c_h = mpini.c mp0.c mp1.c mp2.c mpcoerce.h mpd.h
+nodist_mpost_SOURCES = $(mpost_c_h) mp-pool.c mpextra.c
+$(mpost_c_h): mp-web2c
+mp-web2c: mp.p $(web2c_texmf) mpdir/mp.defines web2c/cvtmf1.sed web2c/cvtmf2.sed
+ $(web2c) mp
+ echo timestamp >$@
+ touch $(mpost_c_h)
+EXTRA_DIST += mp.web mp.ch lib/texmfmp.c mpdir/mp.defines mpdir/mplib.h
+mpextra.c: lib/texmfmp.c mpd.h
+ sed s/TEX-OR-MF-OR-MP/mp/ $(srcdir)/lib/texmfmp.c >$@
+mp.p mp.pool: mp-tangle
+mp-tangle: tangle mp.web mp.ch
+ $(tangle) mp mp
+ echo timestamp >$@
+ touch mp.p mp.pool
+mp-pool.c: mp.pool $(makecpool) mpdir/mplib.h
+ $(makecpool) mp.pool $(srcdir)/mpdir/mplib.h >$@ || rm -f $@
+DISTCLEANFILES += $(nodist_mpost_SOURCES) mp-web2c \
+ mp.p mp.pool mp-tangle
+
+## libmpost
+##
+EXTRA_LIBRARIES += libmpost.a
+
+libmpost_a_CPPFLAGS = -I$(srcdir)/mpdir
+
+libmpost_a_SOURCES = \
+ mpdir/avl.c \
+ mpdir/avl.h \
+ mpdir/avlstuff.c \
+ mpdir/avlstuff.h \
+ mpdir/mapfile.c \
+ mpdir/mpmac.h \
+ mpdir/turningnumber.c \
+ mpdir/utils.c \
+ mpdir/writeenc.c \
+ mpdir/writefont.c \
+ mpdir/writet1.c
+
+## We must create mpd.h before compiling the libmpost_a_SOURCES.
+$(libmpost_a_SOURCES): mpd.h
+
+## Eventually delete these files
+##
+EXTRA_DIST += \
+ metapost.mk \
+ mpdir/Makefile.in.orig \
+ mpdir/mpostlib.mk
+
diff --git a/Build/source/texk/web2c/mpware/Makefile.in.orig b/Build/source/texk/web2c/mpware/Makefile.in.orig
new file mode 100644
index 00000000000..d898b37884f
--- /dev/null
+++ b/Build/source/texk/web2c/mpware/Makefile.in.orig
@@ -0,0 +1,63 @@
+# @configure_input@
+# Makefile for the MetaPost support programs.
+
+kpse_include ../make/paths.mk
+kpse_include ../make/common.mk
+kpse_include ../make/programs.mk
+kpse_include kpathsea.mk
+
+proglib = ../lib/lib.a
+programs = dmp mpto newer makempx
+
+default: all
+all: $(programs)
+
+dmp: dmp.o dmp_ffile.o
+ $(kpathsea_link) dmp.o dmp_ffile.o $(LOADLIBES)
+mpto: mpto.o
+ $(kpathsea_link) mpto.o
+newer: newer.o
+ $(link_command) newer.o
+makempx: makempx.o
+ $(kpathsea_link) makempx.o $(LOADLIBES)
+
+dmp.o dmp_ffile.o: dmp.h
+
+newer.o dmp.o makempx.o: ../c-auto.h
+
+checkdir = $(srcdir)/../check
+check: mpto makempx newer dmp
+ makempx $(checkdir)/label.mp ../check/xlabel.mpx
+ ./mpto -tex $(checkdir)/testex.mp | diff $(checkdir)/testex.tex -
+ sed '16s/^%//' <$(checkdir)/testex.mp >testex1
+ -mpto -tex testex1 >/dev/null 2>testex2
+ sed '17s/^%//' <$(checkdir)/testex.mp >testex1
+ -mpto -tex testex1 >/dev/null 2>>testex2
+ sed '18s/^%//' <$(checkdir)/testex.mp >testex1
+ -mpto -tex testex1 >/dev/null 2>>testex2
+ sed '19s/^%//' <$(checkdir)/testex.mp >testex1
+ -mpto -tex testex1 >/dev/null 2>>testex2
+ sed '20s/^%//' <$(checkdir)/testex.mp >testex1
+ -mpto -tex testex1 >/dev/null 2>>testex2
+ diff $(checkdir)/testex.err testex2
+
+Makefile: Makefile.in ../config.status
+ cd .. && $(SHELL) config.status
+
+install: install-exec install-data
+install-exec: $(programs)
+ $(SHELL) $(top_srcdir)/../mkinstalldirs $(bindir) $(scriptdir)
+ $(INSTALL_PROGRAM) newer $(bindir)/newer
+ $(INSTALL_LIBTOOL_PROG) dmp $(bindir)
+ $(INSTALL_LIBTOOL_PROG) mpto $(bindir)
+ $(INSTALL_LIBTOOL_PROG) makempx $(bindir)
+install-data:
+
+kpse_include ../make/tkpathsea.mk
+kpse_include ../make/clean.mk
+
+mostlyclean::
+ rm -f testex1 testex2
+
+kpse_include ../make/rdepend.mk
+kpse_include mpware/depend.mk
diff --git a/Build/source/texk/web2c/omegadir/am/omega.am b/Build/source/texk/web2c/omegadir/am/omega.am
new file mode 100644
index 00000000000..77d97ab50ed
--- /dev/null
+++ b/Build/source/texk/web2c/omegadir/am/omega.am
@@ -0,0 +1,88 @@
+## texk/web2c/omegadir/am/omega.am: Makefile fragment for Omega.
+
+## Omega
+##
+if OMEGA
+bin_PROGRAMS += omega
+endif OMEGA
+
+## With --enable-ipc, Omega may need to link with -lsocket.
+omega_LDADD = $(LDADD) $(socketlibs)
+
+omega_CPPFLAGS = -I$(srcdir)/omegadir $(AM_CPPFLAGS)
+omega_c_h = omegaini.c omega0.c omega1.c omega2.c omega3.c omegacoerce.h omegad.h
+nodist_omega_SOURCES = $(omega_c_h) omega-pool.c omegaextra.c
+omega_SOURCES = \
+ omegadir/omega.c \
+ omegadir/omegabis.c \
+ omegadir/omegaextra.h \
+ omegadir/omegamem.h \
+ omegadir/omega-pool.h
+## We must create omegad.h before compiling the omega_SOURCES,
+## but certainly don't want to create omegad.h if Omega is not built.
+if OMEGA
+$(omega_SOURCES): omegad.h
+endif OMEGA
+$(omega_c_h): omega-web2c
+omega-web2c: omega.p $(web2c_texmf) omegadir/omega.defines
+ $(web2c) omega
+ echo timestamp >$@
+ touch $(omega_c_h)
+omegaextra.c: lib/texmfmp.c omegad.h
+ sed s/TEX-OR-MF-OR-MP/omega/ $(srcdir)/lib/texmfmp.c >$@
+omega.p omega.pool: omega-tangle
+omega-tangle: otangle omega.web omega.ch
+ $(otangle) omega omega
+ echo timestamp >$@
+ touch omega.p omega.pool
+omega-pool.c: omega.pool $(makecpool) omegadir/omega-pool.h
+ $(makecpool) omega.pool $(srcdir)/omegadir/omega-pool.h >$@ || rm -f $@
+## Generate omega.web
+omega_web_srcs = \
+ tex.web \
+ omegadir/omnode.ch \
+ omegadir/om16bit.ch \
+ omegadir/omstr.ch \
+ omegadir/omfont.ch \
+ omegadir/omchar.ch \
+ omegadir/omfi.ch \
+ omegadir/ompar.ch \
+ omegadir/omocp.ch \
+ omegadir/omfilter.ch \
+ omegadir/omtrans.ch \
+ omegadir/omdir.ch \
+ omegadir/omcprt.ch \
+ omegadir/omxml.ch
+omega.web: $(TIE) $(omega_web_srcs)
+ $(tie) -m omega.web $(omega_web_srcs)
+## Generate omega.ch
+omega_ch_srcs = \
+ omegadir/comnode.ch \
+ omegadir/com16bit.ch \
+ omegadir/comstr.ch \
+ omegadir/comfont.ch \
+ omegadir/comchar.ch \
+ omegadir/comfi.ch \
+ omegadir/compar.ch \
+ omegadir/comocp.ch \
+ omegadir/comfilter.ch \
+ omegadir/comtrans.ch \
+ omegadir/comdir.ch \
+ omegadir/comxml.ch \
+ omegadir/comsrcspec.ch
+omega.ch: $(TIE) omega.web $(omega_ch_srcs)
+ $(tie) -c omega.ch omega.web $(omega_ch_srcs)
+EXTRA_DIST += $(omega_web_srcs) $(omega_ch_srcs) lib/texmfmp.c
+DISTCLEANFILES += $(nodist_omega_SOURCES) omega.web omega.ch omega-web2c \
+ omega.p omega.pool omega-tangle
+
+EXTRA_DIST += \
+ omegadir/ChangeLog \
+ omegadir/README \
+ omegadir/omega.defines \
+ omegadir/omega.version
+
+## Eventually delete these files
+##
+EXTRA_DIST += omegadir/omega.mk
+
diff --git a/Build/source/texk/web2c/omegafonts/Makefile.in.orig b/Build/source/texk/web2c/omegafonts/Makefile.in.orig
new file mode 100644
index 00000000000..9fb8d3f1cf7
--- /dev/null
+++ b/Build/source/texk/web2c/omegafonts/Makefile.in.orig
@@ -0,0 +1,73 @@
+# @configure_input@
+# Makefile for omegafonts.
+
+# These get expanded from the parent directory, not this one.
+kpse_include ../make/common.mk
+kpse_include ../make/programs.mk
+kpse_include ../make/paths.mk
+kpse_include kpathsea.mk
+
+LEX = @LEX@
+#LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+YACC = @YACC@
+
+proglib = ../lib/lib.a
+programs = omfonts
+linked_programs = ofm2opl opl2ofm ovf2ovp ovp2ovf
+scripts =
+
+omfonts_objects = omfonts.o y_tab.o $(LEX_OUTPUT_ROOT).o \
+ char_routines.o dimen_routines.o error_routines.o \
+ header_routines.o ligkern_routines.o list_routines.o \
+ out_routines.o param_routines.o print_routines.o \
+ font_routines.o extra_routines.o out_ofm.o \
+ parse_ofm.o
+h_files = char_routines.h dimen_routines.h error_routines.h \
+ font_routines.h header_routines.h ligkern_routines.h \
+ list_routines.h out_routines.h param_routines.h print_routines.h \
+ extra_routines.h manifests.h parser.h out_ofm.h dvi.h \
+ parse_ofm.h omfonts.h
+
+all: $(programs)
+$(omfonts_objects): Makefile
+omfonts: $(omfonts_objects)
+ $(kpathsea_link) $(omfonts_objects) $(LEXLIB) $(LOADLIBES)
+
+omfonts.o: omfonts.c y_tab.h
+y_tab.c y_tab.h: pl.y
+ $(YACC) -d -v $(srcdir)/pl.y
+ -test -f y.tab.c && mv -f y.tab.c y_tab.c
+ -test -f y.tab.h && mv -f y.tab.h y_tab.h
+$(LEX_OUTPUT_ROOT).o: parser.h y_tab.h
+$(LEX_OUTPUT_ROOT).c: pl.l
+ $(LEX) $(srcdir)/pl.l
+
+
+
+$(programs): $(proglib) $(kpathsea)
+
+$(omfonts_objects): $(h_files)
+
+install: install-exec
+install-exec:: install-links
+
+install-programs: $(programs)
+ $(SHELL) $(top_srcdir)/../mkinstalldirs $(bindir)
+ for p in $(programs); do $(INSTALL_LIBTOOL_PROG) $$p $(bindir); done
+
+install-links: install-programs
+ for f in ""$(linked_programs); do \
+ cd $(bindir) && (rm -f $$f; $(LN) omfonts $$f); done
+
+Makefile: Makefile.in ../config.status
+ cd .. && $(SHELL) config.status
+
+kpse_include ../make/tkpathsea.mk
+kpse_include ../make/clean.mk
+
+clean::
+ rm -f y_tab.c y_tab.h y.out* yacc.* $(LEX_OUTPUT_ROOT).c
+
+kpse_include ../make/rdepend.mk
+kpse_include omegafonts/depend.mk
diff --git a/Build/source/texk/web2c/omegaware/am/omegaware.am b/Build/source/texk/web2c/omegaware/am/omegaware.am
new file mode 100644
index 00000000000..acb4102d308
--- /dev/null
+++ b/Build/source/texk/web2c/omegaware/am/omegaware.am
@@ -0,0 +1,106 @@
+## texk/web2c/omegaware/am/omegaware.am: Makefile fragment for omegaware web programs.
+
+omegaware_tools = odvicopy odvitype otangle
+omegaware_font_tools = ofm2opl opl2ofm ovf2ovp ovp2ovf
+omegaware_programs = $(omegaware_tools) $(omegaware_font_tools)
+
+if OTANGLE
+bin_PROGRAMS += $(omegaware_tools)
+if !OMFONTS
+bin_PROGRAMS += $(omegaware_font_tools)
+endif !OMFONTS
+endif OTANGLE
+
+EXTRA_DIST += omegaware/ChangeLog
+DISTCLEANFILES += $(omegaware_programs:=.c) $(omegaware_programs:=.h) \
+ $(omegaware_programs:=.p) $(omegaware_programs:=-web2c)
+
+ow_tangle = WEBINPUTS=$(srcdir)/omegaware $(buildenv) $(TANGLE)
+
+nodist_odvicopy_SOURCES = odvicopy.c odvicopy.h
+odvicopy.c odvicopy.h: odvicopy-web2c
+odvicopy-web2c: $(web2c_common) $(web2c_programs) odvicopy.p
+ $(web2c) odvicopy
+ echo timestamp >$@
+ touch odvicopy.c odvicopy.h
+EXTRA_DIST += $(odvicopy_sources)
+odvicopy_sources = omegaware/odvicopy.web omegaware/odvicopy.ch
+odvicopy.p: tangle $(odvicopy_sources)
+ $(ow_tangle) odvicopy odvicopy
+
+nodist_odvitype_SOURCES = odvitype.c odvitype.h
+odvitype.c odvitype.h: odvitype-web2c
+odvitype-web2c: $(web2c_common) $(web2c_programs) odvitype.p
+ $(web2c) odvitype
+ echo timestamp >$@
+ touch odvitype.c odvitype.h
+EXTRA_DIST += $(odvitype_sources)
+odvitype_sources = omegaware/odvitype.web omegaware/odvitype.ch
+odvitype.p: tangle $(odvitype_sources)
+ $(ow_tangle) odvitype odvitype
+
+nodist_ofm2opl_SOURCES = ofm2opl.c ofm2opl.h
+ofm2opl.c ofm2opl.h: ofm2opl-web2c
+ofm2opl-web2c: $(web2c_common) $(web2c_programs) ofm2opl.p
+ $(web2c) ofm2opl
+ echo timestamp >$@
+ touch ofm2opl.c ofm2opl.h
+EXTRA_DIST += $(ofm2opl_sources)
+ofm2opl_sources = omegaware/ofm2opl.web omegaware/ofm2opl.ch
+ofm2opl.p: tangle $(ofm2opl_sources)
+ $(ow_tangle) ofm2opl ofm2opl
+
+nodist_opl2ofm_SOURCES = opl2ofm.c opl2ofm.h
+opl2ofm.c opl2ofm.h: opl2ofm-web2c
+opl2ofm-web2c: $(web2c_common) $(web2c_programs) opl2ofm.p
+ $(web2c) opl2ofm
+ echo timestamp >$@
+ touch opl2ofm.c opl2ofm.h
+EXTRA_DIST += $(opl2ofm_sources)
+opl2ofm_sources = omegaware/opl2ofm.web omegaware/opl2ofm.ch
+opl2ofm.p: tangle $(opl2ofm_sources)
+ $(ow_tangle) opl2ofm opl2ofm
+
+nodist_otangle_SOURCES = otangle.c otangle.h
+otangle.c otangle.h: otangle-web2c
+otangle-web2c: $(web2c_common) $(web2c_programs) otangle.p
+ $(web2c) otangle
+ echo timestamp >$@
+ touch otangle.c otangle.h
+EXTRA_DIST += $(otangle_sources)
+otangle_sources = omegaware/otangle.web omegaware/otangle.ch
+otangle.p: tangle $(otangle_sources)
+ $(ow_tangle) otangle otangle
+
+nodist_ovf2ovp_SOURCES = ovf2ovp.c ovf2ovp.h
+ovf2ovp.c ovf2ovp.h: ovf2ovp-web2c
+ovf2ovp-web2c: $(web2c_common) $(web2c_programs) ovf2ovp.p
+ $(web2c) ovf2ovp
+ echo timestamp >$@
+ touch ovf2ovp.c ovf2ovp.h
+EXTRA_DIST += $(ovf2ovp_sources)
+ovf2ovp_sources = omegaware/ovf2ovp.web omegaware/ovf2ovp.ch
+ovf2ovp.p: tangle $(ovf2ovp_sources)
+ $(ow_tangle) ovf2ovp ovf2ovp
+
+nodist_ovp2ovf_SOURCES = ovp2ovf.c ovp2ovf.h
+ovp2ovf.c ovp2ovf.h: ovp2ovf-web2c
+ovp2ovf-web2c: $(web2c_common) $(web2c_programs) ovp2ovf.p
+ $(web2c) ovp2ovf
+ echo timestamp >$@
+ touch ovp2ovf.c ovp2ovf.h
+EXTRA_DIST += $(ovp2ovf_sources)
+ovp2ovf_sources = omegaware/ovp2ovf.web omegaware/ovp2ovf.ch
+ovp2ovf.p: tangle $(ovp2ovf_sources)
+ $(ow_tangle) ovp2ovf ovp2ovf
+
+## Tests
+
+dist_check_SCRIPTS += omegaware/otangle.test
+
+if OTANGLE
+TESTS += omegaware/otangle.test
+endif OTANGLE
+
+DISTCLEANFILES += cftest.p
+
diff --git a/Build/source/texk/web2c/omegaware/otangle.test b/Build/source/texk/web2c/omegaware/otangle.test
new file mode 100755
index 00000000000..e045d106582
--- /dev/null
+++ b/Build/source/texk/web2c/omegaware/otangle.test
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+TEXMFCNF=$srcdir/../kpathsea WEBINPUTS=$srcdir/cftests \
+ ./otangle cftest cftest || exit 1
+
+diff cftest.p $srcdir/cftests/ocftest.p || exit 1
+
diff --git a/Build/source/texk/web2c/otps/Makefile.in.orig b/Build/source/texk/web2c/otps/Makefile.in.orig
new file mode 100644
index 00000000000..ee81a2d2a9c
--- /dev/null
+++ b/Build/source/texk/web2c/otps/Makefile.in.orig
@@ -0,0 +1,53 @@
+# @configure_input@
+# Makefile for otps.
+
+# These get expanded from the parent directory, not this one.
+kpse_include ../make/common.mk
+kpse_include ../make/programs.mk
+kpse_include ../make/paths.mk
+kpse_include kpathsea.mk
+
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+YACC = @YACC@
+
+proglib = ../lib/lib.a
+programs = otp2ocp outocp
+scripts = mkocp mkofm
+
+otp2ocp_objects = otp2ocp.o routines.o y_tab.o $(LEX_OUTPUT_ROOT).o
+all: $(programs)
+otp2ocp: $(otp2ocp_objects)
+ $(kpathsea_link) $(otp2ocp_objects) $(LEXLIB) $(LOADLIBES)
+
+otp2ocp.o: otp2ocp.c y_tab.h
+y_tab.c y_tab.h: otp.y
+ $(YACC) -d -v $(srcdir)/otp.y
+ -test -f y.tab.c && mv -f y.tab.c y_tab.c
+ -test -f y.tab.h && mv -f y.tab.h y_tab.h
+$(LEX_OUTPUT_ROOT).o: otp.h
+$(LEX_OUTPUT_ROOT).c: otp.l
+ $(LEX) $(srcdir)/otp.l
+
+outocp: outocp.o
+ $(kpathsea_link) outocp.o $(LOADLIBES)
+
+$(programs): $(proglib) $(kpathsea)
+
+install-programs: $(programs)
+ $(SHELL) $(top_srcdir)/../mkinstalldirs $(bindir)
+ for p in $(programs); do $(INSTALL_LIBTOOL_PROG) $$p $(bindir); done
+ for p in $(scripts); do $(INSTALL_SCRIPT) $(srcdir)/$$p $(scriptdir); done
+
+Makefile: Makefile.in ../config.status
+ cd .. && $(SHELL) config.status
+
+kpse_include ../make/tkpathsea.mk
+kpse_include ../make/clean.mk
+
+clean::
+ rm -f y_tab.c y_tab.h y.out* yacc.* $(LEX_OUTPUT_ROOT).c
+
+kpse_include ../make/rdepend.mk
+kpse_include otps/depend.mk
diff --git a/Build/source/texk/web2c/pdftexdir/Makefile.in.orig b/Build/source/texk/web2c/pdftexdir/Makefile.in.orig
new file mode 100644
index 00000000000..23b083a5be0
--- /dev/null
+++ b/Build/source/texk/web2c/pdftexdir/Makefile.in.orig
@@ -0,0 +1,71 @@
+# Makefile for libpdf - te@dbs.uni-hannover.de
+# $Id$
+
+kpse_include ../make/common.mk
+kpse_include ../make/programs.mk
+kpse_include ../make/library.mk
+
+kpathsea_srcdir_parent = $(srcdir)/../..
+kpathsea_dir_parent = ../..
+
+ALL_CXXFLAGS = @CXXFLAGS@ @DEFS@ $(XXCFLAGS) \
+ -I. -I$(srcdir) \
+ -I$(kpathsea_dir_parent) -I$(kpathsea_srcdir_parent) \
+ @LIBXPDFCPPFLAGS@ \
+ -I$(LIBOBSDCOMPATDIR) -I$(LIBOBSDCOMPATDIR)/.. \
+ -I$(LIBOBSDCOMPATSRCDIR) -I$(LIBOBSDCOMPATSRCDIR)/.. \
+ -DPDF_PARSER_ONLY
+CXX = @CXX@
+
+.SUFFIXES: .cc .o
+.cc.o:
+ $(CXX) $(ALL_CXXFLAGS) -c $<
+
+# XCFLAGS=-Wstrict-prototypes -Wmissing-prototypes
+
+LIBPNGDIR=../../../libs/libpng
+LIBPNGSRCDIR=$(srcdir)/$(LIBPNGDIR)
+
+ZLIBDIR=../../../libs/zlib
+ZLIBSRCDIR=$(srcdir)/$(ZLIBDIR)
+
+LIBXPDFDIR=../../../libs/xpdf
+LIBXPDFSRCDIR=$(srcdir)/$(LIBXPDFDIR)
+
+LIBMD5DIR=../../../libs/md5
+LIBMD5SRCDIR=$(srcdir)/$(LIBMD5DIR)
+
+LIBOBSDCOMPATDIR=../../../libs/obsdcompat
+LIBOBSDCOMPATSRCDIR=$(srcdir)/$(LIBOBSDCOMPATDIR)
+
+XCPPFLAGS=-I.. -I$(srcdir)/.. -I../.. -I$(srcdir)/../.. -I$(LIBMD5DIR) \
+ -I$(LIBMD5SRCDIR) @LIBPNGCPPFLAGS@ @ZLIBCPPFLAGS@ \
+ -I$(LIBXPDFDIR) -I$(LIBXPDFDIR)/.. -I$(LIBXPDFSRCDIR) -I$(LIBXPDFSRCDIR)/.. \
+ -I$(LIBOBSDCOMPATDIR) -I$(LIBOBSDCOMPATDIR)/.. -I$(LIBOBSDCOMPATSRCDIR) \
+ -I$(LIBOBSDCOMPATSRCDIR)/.. -DpdfTeX
+
+OBJS = epdf.o mapfile.o utils.o vfpacket.o pkin.o \
+writefont.o writet1.o writet3.o writezip.o writeenc.o writettf.o \
+writejpg.o writejbig2.o writepng.o writeimg.o pdftoepdf.o avl.o avlstuff.o subfont.o tounicode.o
+
+all: libpdf.a
+
+pdftosrc.o: $(srcdir)/pdftosrc.cc
+
+libpdf.a: $(OBJS)
+ rm -f $@
+ $(AR) $(ARFLAGS) $@ $(OBJS)
+ $(RANLIB) $@
+
+kpse_include ../make/clean.mk
+
+clean::
+ rm -f libpdf.a ttf2afm pdftosrc
+
+depend:
+ rm -f $(OBJS) ttf2afm.o pdftosrc.o
+ XXCFLAGS=-MM XCFLAGS=-MM $(MAKE) -k $(OBJS) ttf2afm.o pdftosrc.o | \
+ grep -v "^$(CC)\|$(CXX)\|$(AR)\|make\" | \
+ sed 's: [^ ]*/\.\./libs/[^ ]*::g' > $(srcdir)/depend.mk
+
+kpse_include pdftexdir/depend.mk
diff --git a/Build/source/texk/web2c/pdftexdir/am/pdftex.am b/Build/source/texk/web2c/pdftexdir/am/pdftex.am
new file mode 100644
index 00000000000..f51b3a3e4af
--- /dev/null
+++ b/Build/source/texk/web2c/pdftexdir/am/pdftex.am
@@ -0,0 +1,163 @@
+## texk/web2c/pdftexdir/am/pdftex.am: Makefile fragment for pdfTeX.
+
+pdftex_cppflags = $(ZLIB_INCLUDES) $(LIBPNG_INCLUDES) $(XPDF_INCLUDES)
+pdftex_cppflags += $(OBSDCOMPAT_INCLUDES) -I$(srcdir)/libmd5
+pdftex_cppflags += -I$(srcdir)/pdftexdir
+
+pdftex_ldadd = libpdftex.a $(LIBPNG_LIBS) $(ZLIB_LIBS) $(XPDF_LIBS)
+pdftex_ldadd += $(OBSDCOMPAT_LIBS) libmd5.a
+
+pdftex_dependencies = $(proglib)
+pdftex_dependencies += $(LIBPNG_DEPEND) $(ZLIB_DEPEND) $(XPDF_DEPEND)
+pdftex_dependencies += $(OBSDCOMPAT_DEPEND) libmd5.a
+
+## pdfTeX
+##
+if PDFTEX
+bin_PROGRAMS += pdftex
+endif PDFTEX
+
+## Force Automake to use CXXLD for linking
+nodist_EXTRA_pdftex_SOURCES = dummy.cxx
+
+pdf_tangle = WEBINPUTS=.:$(srcdir)/pdftexdir $(buildenv) $(TANGLE)
+
+pdftex_CPPFLAGS = $(pdftex_cppflags)
+
+pdftex_LDADD = $(pdftex_ldadd) $(LDADD) $(socketlibs)
+
+pdftex_DEPENDENCIES = $(pdftex_dependencies) libpdftex.a
+
+pdftex_c_h = pdftexini.c pdftex0.c pdftex1.c pdftex2.c pdftex3.c pdftexcoerce.h pdftexd.h
+nodist_pdftex_SOURCES = $(pdftex_c_h) pdftex-pool.c pdftexextra.c pdftexdir/pdftexextra.h
+$(pdftex_c_h): pdftex-web2c
+pdftex-web2c: pdftex.p $(web2c_texmf) pdftexdir/pdftex.defines
+ $(web2c) pdftex
+ : $(synctex_convert_pdftex)
+ echo timestamp >$@
+ touch $(pdftex_c_h)
+pdftexextra.c: pdftexd.h pdftexdir/pdftexextra.h lib/texmfmp.c pdftexd.h
+ sed s/TEX-OR-MF-OR-MP/pdftex/ $(srcdir)/lib/texmfmp.c >$@
+pdftex.p pdftex.pool: pdftex-tangle
+pdftex-tangle: tangle pdftexdir/pdftex.web pdftex.ch
+ $(pdf_tangle) pdftex pdftex
+ echo timestamp >$@
+ touch pdftex.p pdftex.pool
+pdftex-pool.c: pdftex.pool $(makecpool) pdftexdir/ptexlib.h pdftexd.h
+ $(makecpool) pdftex.pool pdftexdir/ptexlib.h >$@ || rm -f $@
+## Extract pdftex version
+pdftexdir/pdftex.version: pdftexdir/pdftex.web
+ $(mkdir_p) pdftexdir
+ grep '^@d pdftex_version_string==' $(srcdir)/pdftexdir/pdftex.web \
+ | sed "s/^.*'-//;s/'.*$$//" >pdftexdir/pdftex.version
+pdftexdir/pdftexextra.h: pdftexdir/pdftexextra.in pdftexdir/pdftex.version etexdir/etex.version
+ sed -e s/PDFTEX-VERSION/`cat $(pdftexdir)/pdftex.version`/ \
+ -e s/ETEX-VERSION/`cat etexdir/etex.version`/ \
+ $(srcdir)/pdftexdir/pdftexextra.in >$@
+## Generate pdftex.ch
+pdftex.ch: $(TIE) $(pdftex_ch_srcs)
+ $(tie) -c pdftex.ch $(pdftex_ch_srcs)
+pdftex_ch_srcs = \
+ pdftexdir/pdftex.web \
+ pdftexdir/tex.ch0 \
+ tex.ch \
+ $(pdftex_ch_synctex) \
+ pdftexdir/pdftex.ch
+##
+EXTRA_DIST += $(pdftex_ch_srcs) \
+ pdftexdir/pdftex.defines pdftexdir/pdftex.h pdftexdir/pdftexextra.in
+
+DISTCLEANFILES += $(nodist_pdftex_SOURCES) pdftex.ch pdftex-web2c \
+ pdftex.p pdftex.pool pdftex-tangle pdftexdir/pdftex.version
+
+## ttf2afm
+##
+bin_PROGRAMS += ttf2afm
+
+ttf2afm_CPPFLAGS = -I$(srcdir)/pdftexdir
+
+ttf2afm_SOURCES = pdftexdir/ttf2afm.c
+
+## included by pdftexdir/ttf2afm.c
+EXTRA_ttf2afm_SOURCES = pdftexdir/macnames.c
+
+## pdftosrc
+##
+bin_PROGRAMS += pdftosrc
+
+## Force Automake to use CXXLD for linking
+nodist_EXTRA_pdftosrc_SOURCES = dummy.cxx
+
+pdftosrc_CPPFLAGS = $(pdftex_cppflags)
+
+pdftosrc_SOURCES = pdftexdir/pdftosrc.cc
+
+pdftosrc_LDADD = $(pdftex_ldadd) $(LDADD)
+
+pdftosrc_DEPENDENCIES = $(pdftex_dependencies) libpdftex.a
+
+## libpdftex
+##
+EXTRA_LIBRARIES += libpdftex.a
+
+libpdftex_a_CPPFLAGS = $(pdftex_cppflags)
+
+libpdftex_a_SOURCES = \
+ pdftexdir/avl.c \
+ pdftexdir/avl.h \
+ pdftexdir/avlstuff.c \
+ pdftexdir/avlstuff.h \
+ pdftexdir/epdf.c \
+ pdftexdir/epdf.h \
+ pdftexdir/image.h \
+ pdftexdir/mapfile.c \
+ pdftexdir/pdftex.h \
+ pdftexdir/pdftoepdf.cc \
+ pdftexdir/pkin.c \
+ pdftexdir/ptexlib.h \
+ pdftexdir/ptexmac.h \
+ pdftexdir/subfont.c \
+ pdftexdir/tounicode.c \
+ pdftexdir/utils.c \
+ pdftexdir/vfpacket.c \
+ pdftexdir/writeenc.c \
+ pdftexdir/writefont.c \
+ pdftexdir/writeimg.c \
+ pdftexdir/writejbig2.c \
+ pdftexdir/writejbig2.h \
+ pdftexdir/writejpg.c \
+ pdftexdir/writepng.c \
+ pdftexdir/writet1.c \
+ pdftexdir/writet3.c \
+ pdftexdir/writettf.c \
+ pdftexdir/writettf.h \
+ pdftexdir/writezip.c
+
+## We must create pdftexd.h before compiling the libpdftex_a_SOURCES,
+## but certainly don't want to create pdftexd.h if pdfTeX is not built.
+if PDFTEX
+$(libpdftex_a_SOURCES): pdftexd.h
+endif PDFTEX
+
+## included by pdftexdir/writettf.c
+EXTRA_libpdftex_a_SOURCES = pdftexdir/macnames.c
+
+EXTRA_DIST += \
+ pdftexdir/ChangeLog \
+ pdftexdir/NEWS \
+ pdftexdir/README \
+ pdftexdir/change-files.txt
+
+## Not used
+##
+EXTRA_DIST += \
+ pdftexdir/.indent.pro \
+ pdftexdir/pdftex.mak
+
+## Eventually delete these files
+##
+EXTRA_DIST += \
+ pdftexdir/Makefile.in.orig \
+ pdftexdir/pdftex.mk \
+ pdftexdir/pdftexlib.mk
+
diff --git a/Build/source/texk/web2c/synctexdir/am/synctex.am b/Build/source/texk/web2c/synctexdir/am/synctex.am
new file mode 100644
index 00000000000..03d793eac69
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/am/synctex.am
@@ -0,0 +1,172 @@
+## texk/web2c/synctexdir/am/synctex.am: Makefile fragment for SyncTeX.
+
+## The SyncTeX tool
+
+bin_PROGRAMS += synctex
+
+synctex_SOURCES = \
+ synctexdir/synctex_main.c \
+ synctexdir/synctex_parser.c \
+ synctexdir/synctex_parser.h \
+ synctexdir/synctex_parser_local.h
+
+synctex_CPPFLAGS = -I$(srcdir)/synctexdir $(ZLIB_INCLUDES) -DSYNCTEX_USE_LOCAL_HEADER
+
+synctex_LDADD = $(ZLIB_LIBS)
+
+synctex_DEPENDENCIES = $(ZLIB_DEPEND)
+
+dist_man_MANS += synctexdir/man1/synctex.1 synctexdir/man5/synctex.5
+
+EXTRA_DIST += \
+ synctexdir/INSTALL \
+ synctexdir/Makefile \
+ synctexdir/Makefile.in \
+ synctexdir/README.txt
+
+## SyncTeX infrastructure: common for all engines
+
+EXTRA_DIST += \
+ synctexdir/synctex-common.h \
+ synctexdir/synctex-convert.sh \
+ synctexdir/synctex.c \
+ synctexdir/synctex.defines \
+ synctexdir/synctex.h
+
+## SyncTeX infrastructure: TeX
+
+if TEX_SYNCTEX
+
+tex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)
+
+tex_LDADD += $(ZLIB_LIBS)
+
+tex_ch_synctex = \
+ synctexdir/synctex-mem.ch0 \
+ synctexdir/synctex-mem.ch1 \
+ synctexdir/synctex-mem.ch2 \
+ synctexdir/synctex-rec.ch0 \
+ synctexdir/synctex-rec.ch1 \
+ synctexdir/synctex-rec.ch2
+
+dist_tex_SOURCES = \
+ synctexdir/synctex.h \
+ synctexdir/synctex-common.h \
+ synctexdir/synctex-tex.h
+
+nodist_tex_SOURCES += \
+ synctex.c
+
+synctex_convert_tex = && $(SHELL) $(srcdir)/synctexdir/synctex-convert.sh tex
+
+else !TEX_SYNCTEX
+
+synctex_convert_tex = && echo "warning: SyncTeX for TeX is NOT enabled"
+
+endif !TEX_SYNCTEX
+
+synctex.c: texd.h synctexdir/synctex.c $(dist_tex_SOURCES)
+ sed s/TEX-OR-MF-OR-MP/tex/ $(srcdir)/synctexdir/synctex.c >$@
+
+EXTRA_DIST += \
+ synctexdir/synctex-mem.ch0 \
+ synctexdir/synctex-mem.ch1 \
+ synctexdir/synctex-mem.ch2 \
+ synctexdir/synctex-rec.ch0 \
+ synctexdir/synctex-rec.ch1 \
+ synctexdir/synctex-rec.ch2
+
+## SyncTeX infrastructure: e-TeX
+
+if ETEX_SYNCTEX
+
+etex_CPPFLAGS += -I$(srcdir)/synctexdir $(ZLIB_INCLUDES)
+
+etex_LDADD += $(ZLIB_LIBS)
+
+etex_ch_synctex = \
+ synctexdir/synctex-mem.ch0 \
+ synctexdir/synctex-mem.ch1 \
+ synctexdir/synctex-e-mem.ch0 \
+ synctexdir/synctex-e-mem.ch1 \
+ synctexdir/synctex-rec.ch0 \
+ synctexdir/synctex-rec.ch1 \
+ synctexdir/synctex-e-rec.ch0 \
+ synctexdir/synctex-e-rec.ch1
+
+dist_etex_SOURCES = \
+ synctexdir/synctex.h \
+ synctexdir/synctex-common.h \
+ synctexdir/synctex-etex.h
+
+nodist_etex_SOURCES += \
+ synctex-e.c
+
+synctex_convert_etex = && $(SHELL) $(srcdir)/synctexdir/synctex-convert.sh etex
+
+else !ETEX_SYNCTEX
+
+synctex_convert_etex = && echo "warning: SyncTeX for e-TeX is NOT enabled"
+
+endif !ETEX_SYNCTEX
+
+synctex-e.c: etexd.h synctexdir/synctex.c $(dist_etex_SOURCES)
+ sed s/TEX-OR-MF-OR-MP/etex/ $(srcdir)/synctexdir/synctex.c >$@
+
+EXTRA_DIST += \
+ synctexdir/synctex-e-mem.ch0 \
+ synctexdir/synctex-e-mem.ch1 \
+ synctexdir/synctex-e-rec.ch0 \
+ synctexdir/synctex-e-rec.ch1
+
+## SyncTeX infrastructure: pdfTeX
+
+if PDFTEX_SYNCTEX
+
+pdftex_CPPFLAGS += -I$(srcdir)/synctexdir
+
+pdftex_ch_synctex = \
+ synctexdir/synctex-mem.ch0 \
+ synctexdir/synctex-mem.ch1 \
+ synctexdir/synctex-e-mem.ch0 \
+ synctexdir/synctex-e-mem.ch1 \
+ synctexdir/synctex-rec.ch0 \
+ synctexdir/synctex-rec.ch1 \
+ synctexdir/synctex-e-rec.ch0 \
+ synctexdir/synctex-e-rec.ch1 \
+ synctexdir/synctex-pdf-rec.ch2
+
+dist_pdftex_SOURCES = \
+ synctexdir/synctex.h \
+ synctexdir/synctex-common.h \
+ synctexdir/synctex-pdftex.h
+
+nodist_pdftex_SOURCES += \
+ synctex-pdf.c
+
+synctex_convert_pdftex = && $(SHELL) $(srcdir)/synctexdir/synctex-convert.sh pdftex
+
+else !PDFTEX_SYNCTEX
+
+synctex_convert_pdftex = && echo "warning: SyncTeX for pdfTeX is NOT enabled"
+
+endif !PDFTEX_SYNCTEX
+
+synctex-pdf.c: pdftexd.h synctexdir/synctex.c $(dist_pdftex_SOURCES)
+ sed s/TEX-OR-MF-OR-MP/pdftex/ $(srcdir)/synctexdir/synctex.c >$@
+
+EXTRA_DIST += \
+ synctexdir/synctex-pdf-rec.ch2
+
+## SyncTeX infrastructure: XeTeX
+
+EXTRA_DIST += \
+ synctexdir/synctex-xe-mem.ch2 \
+ synctexdir/synctex-xe-rec.ch2 \
+ synctexdir/synctex-xe-rec.ch3 \
+ synctexdir/synctex-xetex.h
+
+## Eventually delete these files
+##
+EXTRA_DIST += synctexdir/am/synctex.mk synctexdir/synctex.mk
+
diff --git a/Build/source/texk/web2c/synctexdir/am/synctex.mk b/Build/source/texk/web2c/synctexdir/am/synctex.mk
new file mode 100644
index 00000000000..3f3c4a0293a
--- /dev/null
+++ b/Build/source/texk/web2c/synctexdir/am/synctex.mk
@@ -0,0 +1,42 @@
+
+### SyncTeX support in xetex
+# Actually, xetex cannot build without SyncTeX because the tex.web
+# code does not provide proper entry points
+# list of change files
+xetex_ch_srcs-with_synctex-mem_only = \
+ $(synctex_dir)/synctex-mem.ch0 \
+ $(synctex_dir)/synctex-e-mem.ch0 \
+ $(synctex_dir)/synctex-e-mem.ch1 \
+ $(synctex_dir)/synctex-xe-mem.ch2
+xetex_ch_srcs-with_synctex = \
+ $(xetex_ch_srcs-with_synctex-mem_only) \
+ $(synctex_dir)/synctex-rec.ch0 \
+ $(synctex_dir)/synctex-e-rec.ch0 \
+ $(synctex_dir)/synctex-xe-rec.ch2
+xetex_ch_srcs-without_synctex =
+xetex_post_ch_srcs-with_synctex = \
+ $(synctex_dir)/synctex-xe-rec.ch3
+xetex_post_ch_srcs-without_synctex =
+# The C sources and headers
+xetex_o-with_synctex = synctex-xe.o
+xetex_o-without_synctex =
+synctex-xe.h: $(synctex_dir)/synctex.h
+ cat $(synctex_dir)/synctex.h >$@
+synctex-xetex.h: $(synctex_dir)/$@
+ cat $(synctex_dir)/$@ >$@
+synctex-xe.c: xetexd.h $(synctex_dir)/synctex.c synctex-xetex.h
+ sed s/TEX-OR-MF-OR-MP/xetex/ $(synctex_dir)/synctex.c >$@
+xetexd.h-with_synctex = if test -z "`grep __SyncTeX__ xetexd.h`";\
+ then\
+ $(synctex_common_texd);\
+ sed -f synctex_sed_command.txt xetexd.h > synctex_xetexd.h;\
+ mv synctex_xetexd.h xetexd.h;\
+ if test -z "`grep __SyncTeX__ xetexd.h`";\
+ then\
+ echo "warning: SyncTeX activation FAILED";\
+ exit 1;\
+ fi;\
+ echo "warning: SyncTeX is enabled";\
+ fi
+xetexd.h-without_synctex = echo "warning: SyncTeX is NOT enabled"
+
diff --git a/Build/source/texk/web2c/tiedir/tie.test b/Build/source/texk/web2c/tiedir/tie.test
new file mode 100755
index 00000000000..7f25fdc4e64
--- /dev/null
+++ b/Build/source/texk/web2c/tiedir/tie.test
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+TEXMFCNF=$srcdir/../kpathsea WEBINPUTS=$srcdir/tiedir \
+ ./tie -c tie.outc tie.tie tie.cf1 tie.cf2 tie.cf3 || exit 1
+
+diff tie.outc $srcdir/tiedir/tie.chf.gen || exit 1
+
+TEXMFCNF=$srcdir/../kpathsea WEBINPUTS=$srcdir/tiedir \
+ ./tie -m tie.outm tie.tie tie.cf1 tie.cf2 tie.cf3 || exit 1
+
+diff tie.outm $srcdir/tiedir/tie.master.gen || exit 1
+
diff --git a/Build/source/texk/web2c/web2c/native/config.h b/Build/source/texk/web2c/web2c/native/config.h
new file mode 100644
index 00000000000..c9b4d5dbc4d
--- /dev/null
+++ b/Build/source/texk/web2c/web2c/native/config.h
@@ -0,0 +1,119 @@
+/* config.h: All .c files include this first.
+
+Copyright (C) 1995, 1996, 2006, 2007 Karl Berry.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, see <http://www.gnu.org/licenses/. */
+
+#ifndef WEB2C_CONFIG_H
+#define WEB2C_CONFIG_H
+
+#if defined (TEX_DLL) && (defined (WIN32) || defined (__CYGWIN__))
+#ifdef MAKE_TEX_DLL
+#define TEXDLL __declspec (dllexport)
+#else /* ! MAKE_TEX_DLL */
+#define TEXDLL __declspec (dllimport)
+#endif
+#else /* ! (TEX_DLL && (WIN32 || __CYGWIN__)) */
+#define TEXDLL
+#endif
+
+/* The stuff from the path searching library. */
+#include <kpathsea/config.h>
+#include <kpathsea/c-auto.h>
+#include <kpathsea/c-vararg.h>
+
+/* How to open a binary file. */
+#include <kpathsea/c-fopen.h>
+
+/* The smallest signed type: use `signed char' if ANSI C, `short' if
+ char is unsigned, otherwise `char'. */
+#ifndef SCHAR_TYPE
+#if __STDC__
+#define SCHAR_TYPE signed char
+#else /* not __STDC */
+#ifdef __CHAR_UNSIGNED__
+#define SCHAR_TYPE short
+#else
+#define SCHAR_TYPE char
+#endif
+#endif /* not __STDC__ */
+#endif /* not SCHAR_TYPE */
+typedef SCHAR_TYPE schar;
+
+/* The type `integer' must be a signed integer capable of holding at
+ least the range of numbers (-2^31)..(2^31-1). If your compiler goes
+ to great lengths to make programs fail, you might have to change this
+ definition. If this changes, you may have to modify
+ web2c/fixwrites.c, since it generates code to do integer output using
+ "%ld", and casts all integral values to be printed to `long'.
+
+ If you define your own INTEGER_TYPE, you have to define your own
+ INTEGER_MAX and INTEGER_MIN, too. */
+#ifndef INTEGER_TYPE
+
+#if SIZEOF_LONG > 4 && !defined (NO_DUMP_SHARE)
+/* If we have 64-bit longs and want to share format files (with 32-bit
+ machines), use `int'. */
+#define INTEGER_IS_INT
+#endif
+
+#ifdef INTEGER_IS_INT
+#define INTEGER_TYPE int
+#define INTEGER_MAX INT_MAX
+#define INTEGER_MIN INT_MIN
+#else
+#define INTEGER_TYPE long
+#define INTEGER_MAX LONG_MAX
+#define INTEGER_MIN LONG_MIN
+#endif /* not INTEGER_IS_INT */
+
+#endif /* not INTEGER_TYPE */
+
+typedef INTEGER_TYPE integer;
+
+/* We need a type that's at least off_t wide */
+typedef off_t longinteger;
+
+
+/* I don't want to write a configure test for remove when all Unix
+ machines have unlink. But, for the sake of non-Unix machines that
+ support ANSI C... */
+#if !defined (unix) && !defined (__unix__) && defined (__STDC__) && !defined (unlink)
+#define unlink remove
+#endif
+
+/* Window support on the Amiga is just for the Amiga. */
+#ifdef AMIGA
+#define AMIGAWIN
+#endif
+
+/* Window support for WIN32 machines. */
+#ifdef WIN32
+#define WIN32WIN
+#endif
+
+/* strtol.c */
+#ifndef HAVE_STRTOL
+extern long strtol P3H(const char *, char **, int);
+#endif
+
+/* From uexit.c. This is here because the lib/ and web2c/ routines
+ themselves can use it, but they don't need cpascal.h. */
+extern void uexit P1H(int status);
+
+/* usage.c */
+extern void usage P1H(const_string progname);
+extern void usagehelp P2H(const_string *message, const_string bug_email);
+
+#endif /* not WEB2C_CONFIG_H */
diff --git a/Build/source/texk/web2c/web2c/native/kpathsea/c-auto.in b/Build/source/texk/web2c/web2c/native/kpathsea/c-auto.in
new file mode 100644
index 00000000000..85a564101fd
--- /dev/null
+++ b/Build/source/texk/web2c/web2c/native/kpathsea/c-auto.in
@@ -0,0 +1,181 @@
+/* native/kpathsea/c-auto.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+#undef CLOSEDIR_VOID
+
+/* Define to 1 if you have the <assert.h> header file. */
+#undef HAVE_ASSERT_H
+
+/* Define to 1 if you have the `bcmp' function. */
+#undef HAVE_BCMP
+
+/* Define to 1 if you have the `bcopy' function. */
+#undef HAVE_BCOPY
+
+/* Define to 1 if you have the `bzero' function. */
+#undef HAVE_BZERO
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define to 1 if you have the <float.h> header file. */
+#undef HAVE_FLOAT_H
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#undef HAVE_FSEEKO
+
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
+
+/* Define to 1 if you have the `getwd' function. */
+#undef HAVE_GETWD
+
+/* Define to 1 if you have the `index' function. */
+#undef HAVE_INDEX
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have the `memcmp' function. */
+#undef HAVE_MEMCMP
+
+/* Define to 1 if you have the `memcpy' function. */
+#undef HAVE_MEMCPY
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you are using GNU libc or otherwise have global variables
+ `program_invocation_name' and `program_invocation_short_name'. */
+#undef HAVE_PROGRAM_INVOCATION_NAME
+
+/* Define to 1 if your compiler understands prototypes. */
+#undef HAVE_PROTOTYPES
+
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
+
+/* Define to 1 if you have the <pwd.h> header file. */
+#undef HAVE_PWD_H
+
+/* Define to 1 if you have the `rindex' function. */
+#undef HAVE_RINDEX
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strrchr' function. */
+#undef HAVE_STRRCHR
+
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if `st_mtim' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_MTIM
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* The size of `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#undef YYTEXT_POINTER
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#undef _LARGEFILE_SOURCE
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif
diff --git a/Build/source/texk/web2c/xetexdir/am/xetex.am b/Build/source/texk/web2c/xetexdir/am/xetex.am
new file mode 100644
index 00000000000..62aff84e37c
--- /dev/null
+++ b/Build/source/texk/web2c/xetexdir/am/xetex.am
@@ -0,0 +1,71 @@
+## texk/web2c/xetexdir/am/xetex.am: Makefile fragment for XeTeX.
+
+## XeTeX
+##
+EXTRA_DIST += \
+ xetexdir/FontTableCache.cpp \
+ xetexdir/FontTableCache.h \
+ xetexdir/MathTable.h \
+ xetexdir/XeTeXFontInst.cpp \
+ xetexdir/XeTeXFontInst.h \
+ xetexdir/XeTeXFontInst_FT2.cpp \
+ xetexdir/XeTeXFontInst_FT2.h \
+ xetexdir/XeTeXFontInst_Mac.cpp \
+ xetexdir/XeTeXFontInst_Mac.h \
+ xetexdir/XeTeXFontMgr.cpp \
+ xetexdir/XeTeXFontMgr.h \
+ xetexdir/XeTeXFontMgr_FC.cpp \
+ xetexdir/XeTeXFontMgr_FC.h \
+ xetexdir/XeTeXFontMgr_Mac.h \
+ xetexdir/XeTeXFontMgr_Mac.mm \
+ xetexdir/XeTeXGrLayout.cpp \
+ xetexdir/XeTeXGrLayout.h \
+ xetexdir/XeTeXLayoutInterface.cpp \
+ xetexdir/XeTeXLayoutInterface.h \
+ xetexdir/XeTeXOTLayoutEngine.cpp \
+ xetexdir/XeTeXOTLayoutEngine.h \
+ xetexdir/XeTeXOTMath.cpp \
+ xetexdir/XeTeXOTMath.h \
+ xetexdir/XeTeX_ext.c \
+ xetexdir/XeTeX_ext.h \
+ xetexdir/XeTeX_mac.c \
+ xetexdir/XeTeX_pic.c \
+ xetexdir/XeTeXswap.h \
+ xetexdir/appleGlyphNames.c \
+ xetexdir/bmpimage.c \
+ xetexdir/bmpimage.h \
+ xetexdir/cmaps.cpp \
+ xetexdir/cmaps.h \
+ xetexdir/jpegimage.c \
+ xetexdir/jpegimage.h \
+ xetexdir/mfileio.c \
+ xetexdir/mfileio.h \
+ xetexdir/numbers.c \
+ xetexdir/numbers.h \
+ xetexdir/pdfimage.cpp \
+ xetexdir/pdfimage.h \
+ xetexdir/pngimage.c \
+ xetexdir/pngimage.h \
+ xetexdir/pool2c.pl \
+ xetexdir/sfnt.h \
+ xetexdir/trans.c \
+ xetexdir/trans.h \
+ xetexdir/unicode-char-prep.pl \
+ xetexdir/xetex.ch \
+ xetexdir/xetex.defines \
+ xetexdir/xetex.h \
+ xetexdir/xetexextra.in
+
+## Not used
+##
+EXTRA_DIST += \
+ xetexdir/LICENSE.txt
+
+## Eventually delete these files
+##
+EXTRA_DIST += \
+ xetexdir/acx_pthread.m4 \
+ xetexdir/tests.ac \
+ xetexdir/withenable.ac \
+ xetexdir/xetex.mk
+