[tlbuild] tangle-sh verbosity

Karl Berry karl at freefriends.org
Tue Jan 11 23:47:24 CET 2022


In the commit I just made (r61575), I unsilenced the invocations of
tangle-sh and related in all the web2c/engine Makefile fragments, and
also made the tangle-sh script more verbose about what it was doing.

It turns out the tangle-sh script is used for two different purposes: 1)
normally running (c)tangle, if the first argument is a stamp file, named
foo-tangle; 2) recovering from files being removed from the build tree,
if the first argument is a normal derived file (case 2).

Peter had made most of this operation silent.  I had never delved into
all the details of how it worked, and it was impossible to begin to
understand with half the information being hidden. I can't say it's
completely clear to me even now :(.

So I hope the extra output doesn't bother anyone -- useless in most
circumstances, granted, but when trying to debug, it's needed. One
problem I've seen is endless remakes relating to ctangle and/or
libmplib, but they don't show up after starting from a clean build.  I'm
guessing they will be back. If you see this, the best approach I know of
is to run "make -rd <target>" in the Work/texk/web2c build directory,
redirect the output, and look for "Must remake" and "newer than", to see
why make decided something needed to be rebuilt.

Anyway, hope it doesn't break anything ... --karl.

P.S. By the way, I also discovered, contrary to what I had always
believed, that Peter's convention for these tangle-sh invocations
requires the make feature of using $@ to mean the target name in regular
(non-suffix) rules.  That's a GNU make feature that's not available in
all makes (I think it's not in BSD make).

This could be alleviated by some laborious editing to write out the
target names, but since there is a requirement for GNU make in other
non-TeX parts of the tree (freetype, as I recall), it doesn't seem worth
worrying about.  But at least it explains why GNU make has been required
even for builds where it didn't seem like it should be.


More information about the tlbuild mailing list.