[Dev-luatex] Building luaTeX rev. 165

Arthur Reutenauer arthur.reutenauer at normalesup.org
Tue Nov 28 17:43:15 CET 2006


>> namely the Makefile doesn't find makecpool in the build/ subdirectory,
> 
> That's odd (because it works fine here).

  I got it! The reason for the system to be confused is indeed the change
from the Perl script to the C binary; the bug happens in build/texk/web2c
(just after making luatexextra.o, it doesn't go "cd luatexdir && make
CC='gcc' CFLAGS='-g -O2 ' LDFLAGS=''  makecpool"):

  At this point, the Makefile looks for a luatexdir/makecpool dependency,
and apparently it's happy if it can find $(srcdir)/luatexdir/makecpool
(with srcdir=../../../src/texk/web2c set during the configuration
process). Of course it's wrong, since this makecpool is the Perl script
in the src directory, and not the compiled C binary. But the Makefile
doesn't care, it assumes the dependency requirements for loadpool.c are
met, and it tries to make loadpool.c with luatexdir/makecpool (that is,
in the *build* directory); which of course fails, since
luatexdir/makecpool doesn't exist.

  I found out this error only happens if there is no luatexdir/makecpool
present in the build directory (which is the case when one builds from a
fresh checkout). If there is an out-of-date luatexdir/makecpool, this one
is taken in account when looking for dependencies, so it works when the
build directly is updated, and it should explain why you don't have this
error.

  You really should try it, because it looks quite independent from the
machine: go to build/texk/web2c and try these two lines

rm luatexdir/makecpool && make luatexdir/makecpool
	=> I get "make: `../../../src/texk/web2c/luatexdir/makecpool' is up to
	date."
touch luatexdir/makecpool && make luatexdir/makecpool
	=> I get "make: `luatexdir/makecpool' is up to date."

  Of course in the latter case, luatexdir/makecpool is not up to date,
it's just a phoney file, but it proves that make does not always look for
dependencies where we expect it to do.

  Unfortunately I have no idea how to solve this particular problem
because I find no place in the Makefile where this "fall-back" dependency
directory is defined; I can understand that this sort of black magic by
GNU make is sometimes called for, but in our case it's simply annoying.
Maybe it would be best to just remove the Perl script which is now
useless (of course if make cannot find $(srcdir)/luatexdir/makecpool
either, it simply builds the target the way it should).

  I hope it's clear enough.

	Yours,

		Arthur


More information about the dev-luatex mailing list