On 2021-01-24, Peter Johansson <trojkan@xxxxxxxxx> wrote: > I've managed to reproduce the behavior Bob describes in the attached > script. If we touch the timestamp of configure.ac, running autoconf will > update the timestamp of configure. But if the autoconf is triggered by > something else for example if ChangeLog has been touched, then autoconf > won't touch configure. I suppose that behavior of autoconf is too > established to be changed, but I think making --force default would be > more intuitive. > > One solution is to put the content of the AC_INIT arguments into > dedicated files and add this file to CONFIGURE_DEPENDENCIES, which will > reduce the risk for this to happen but it's still possible that this > file becomes newer than configure and one is back to autoconf being > triggered at every 'make'. Another possible solution: instead of using CONFIGURE_DEPENDENCIES, you can pass any filename you like as the first argument of m4_include. This will get picked up by both Automake and Autoconf to trigger regeneration of configure. You don't need to _actually_ include the file as that may have unwanted side effects. The M4 traces that drive this behaviour only care about the names of macros, not their effects. So something like: m4_pushdef([m4_include]) m4_include([ChangeLog]) m4_popdef([m4_include]) should cause autoconf to update configure whenever whenever ChangeLog is touched (and Automake should automatically pick it up to trigger rebuilds). Cheers, Nick