Re: Avoid modifying 'configure' or 'makefile' if no changes

"R. Diez" <[email protected]> Sat, 11 Apr 2026 18:19:01 +0200
Newsgroups gmane.comp.sysutils.autoconf.general
Message-ID <[email protected]>
>> [...]
>> 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

First of all, thanks to Nick Bowler and Ben Boeckel for the extra information. I suspected that something like that should be doable, but I did not have the right details.


> 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"?

I am no expert in this regard, but it looks doable. After all, Autoconf/Automake completely control the makefile generation and the tools which trigger a rebuild of 'configure' and 'Makefile' when you modify configure.ac and Makefile.am. If implemented correctly, the user wouldn't really notice, or have I missed something?

Regards,
   rdiez