autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autoconf/Automake is not using version from AC_INIT


From: Peter Johansson
Subject: Re: Autoconf/Automake is not using version from AC_INIT
Date: Mon, 25 Jan 2021 12:54:40 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0


On 25/1/21 11:33 am, Zack Weinberg wrote:
On Sun, Jan 24, 2021 at 7:27 PM Bob Friesenhahn
<bfriesen@simple.dallas.tx.us> wrote:
AC_SUBST([CONFIGURE_DEPENDENCIES],["$CONFIGURE_DEPENDENCIES \$(top_srcdir)/ChangeLog 
\$(top_srcdir)/version.sh"])
Why did you write it like this instead of

CONFIGURE_DEPENDENCIES = $(top_srcdir)/ChangeLog $(top_srcdir)/version.sh

directly in Makefile.am?  The way you did it, I don't think Automake
will be aware that the variable exists.
All automake does is to declare

am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
    $(ACLOCAL_M4)

regardless whether 'CONFIGURE_DEPENDENCIES' is mentioned in 'Makefile.am'.


(Also, I thought having configure not be updated when the information
provided to AC_INIT has not changed was what you wanted to happen!)

True, but once the rule for regenerating configure is updated, one wants it to be updated so the rule is not triggered at every 'make'.

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'.

Peter

Attachment: test.sh
Description: application/shellscript


reply via email to

[Prev in Thread] Current Thread [Next in Thread]