tlbuild: Build one engine
4.5 Build one engine
====================
Unfortunately, there is one common case where the steps in the preceding
section to build one package (⇒Build one package) do not suffice:
wanting to build one, or a subset, of the TeX engines (or other Web2c
programs).
The simplest way to do this is to disable everything and then
explicitly specify what to make. For example, to build only the
original TeX:
cd Work # top build directory
../configure --without-x --disable-shared --disable-all-pkgs \
--enable-tex --disable-synctex --disable-xetex \
--enable-missing -C CFLAGS=-g CXXFLAGS=-g
make
cd texk/web2c # cd engine build directory
make tex # must specify target
The first 'make' run will configure everything, and even build the
libraries, even though the packages are disabled.
The source tree can be cut down to just what is needed for the given
engine (the separate pdfTeX and LuaTeX source repositories do this, for
example), but see caveats in previous section. When the
'--disable-xetex' and '--enable-missing' options are needed is also
explained in the previous section.
If you want to debug an X-related program or shared library setup, or
other variants, change the 'configure' options accordingly. Either
'../Build' or '../configure' can be run.
Then it is necessary to again specify the target engine ('tex', in
the above) in the 'make'.
All these complications are rather unfortunate. Patches are welcome.
Testing one engine
..................
To run only the tests for a given engine, say 'hitex':
make -C $ww check SUBDIRS=. TESTS='$(hitex_tests)'
where '$ww' is the web2c build directory, that is,
'ww=/wherever/Build/source/Work/texk/web2c'.
It's also possible to run individual tests the same way, using the
test name exactly as specified in the '.am' file:
make -C $ww check SUBDIRS=. TESTS=hitexdir/tests/hello.test
If you get tired of looking at the 'Entering'/'Leaving directory'
lines, you can add the (GNU) make option '--no-print-dir'.
You may find it useful to put lengthy incantations like this into a
trivial shell script with a short name (say, 'hitst'). Then you just
run 'hitst' and edit the file when necessary to change things around.