Re: Autoconf/Automake is not using version from AC_INIT

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

 



On Tue, 12 Jan 2021, Peter Johansson wrote:
The problem is that there is no dependency in the Makefile telling that autoconf need to be rerun when the version has changed. Automake has the variable 'CONFIGURE_DEPENDENCIES' for this purpose, so adding

CONFIGURE_DEPENDENCIES = ChangeLog

would solve the issue but will cause a rerun of autoconf every time you touch ChangeLog. Rather you want a stamp file, whose timestamp only changes when the output of 'version.sh packageversion' changes. Something along the lines:

$(srcdir)/.version: ChangeLog
    cd $(srcdir) && ./version packageversion > .version-tmp && move-if-change .version-tmp .version

EXTRA_DIST = $(srcdir)/.version

This seemed like a great idea, but upon trying out, I saw that the rule gets invoked each time I type 'make'. This results in activity whereas before 'make' would simply report that there is nothing to do.

swdev:~/build/GM-16-static% gmake
CDPATH="${ZSH_VERSION+.}:" && cd /home/bfriesen/src/graphics/GM && /bin/sh '/home/bfriesen/src/graphics/GM/config/missing' autoconf
gmake  all-am
gmake[1]: Entering directory '/scratch/bfriesen/build/GM-16-static'
CDPATH="${ZSH_VERSION+.}:" && cd /home/bfriesen/src/graphics/GM && /bin/sh '/home/bfriesen/src/graphics/GM/config/missing' autoconf
gmake[1]: Leaving directory '/scratch/bfriesen/build/GM-16-static'

This seems like a Catch-22 situation. If the VERSION file timestamp does not get updated, it will produce this noise, and if does get updated, then there is a whole reconf-config-build cycle.

Is there any solution for that?

Otherwise I have a less fancy means which works without the extra noise.

Bob
--
Bob Friesenhahn
bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux