On Sat, Apr 11, 2026 at 06:19:01PM +0200, R. Diez wrote: > > > [...] > > > It is straightforward to achieve a similar result with a portable makefile > > > by using a dedicated witness file, for example (totally untested): > > > > > > configure.stamp: configure.ac > > > autoconf -o configure.new > > > cmp configure.new configure >/dev/null 2>&1 \ > > > || mv -f configure.new configure > > > echo >configure.stamp > > > > > > configure: configure.stamp [...] > > As Nick says you can get something "kinda-sorta" similar with "witness" > > files (I call these "sentinel" files but there's no one accepted term > > that I'm aware of). This does work, if you get it right, but there are > > some mildly annoying UI/QoI issues you have to be willing to live with. > > Would you care to elaborate about those "UI/QoI issues"?
The main "problem" with the above approach is that if you manually delete configure, then "make configure" will not rebuild it: you have to also delete configure.stamp since this is the rule which actually matters. This is usually a "Doctor, it hurts when I do this" sort of problem and in my opinion it is not worth spending a lot of effort worrying about it. But the usual way to handle this problem is by adding more commands to the "configure" rule which detects this situation and corrects it. This can sometimes be a bit tricky (for example, if multiple recovery rules are running in parallel) but again, it's usually quite reasonable to say "don't do that, then". You will probably also want to do something to ensure that release bundles do not include a "configure" which is out of date relative to the witness file, otherwise the commands for the "configure" rule (if any) will get run all the time instead of only running them when the package is modified in some way. Cheers, Nick
