[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sr #111007] autoconf 2.72 warning: file 'version.m4' included several t
From: |
Румен Петров |
Subject: |
[sr #111007] autoconf 2.72 warning: file 'version.m4' included several times |
Date: |
Mon, 15 Jan 2024 14:40:40 -0500 (EST) |
Follow-up Comment #2, sr#111007 (group autoconf):
Let review automake manual chapter 16 Rebuilding Makefiles.
----
Here, version.sh is a shell fragment that sets VERSION_NUMBER. The problem
with this example is that automake cannot track dependencies (listing
version.sh in CONFIG_STATUS_DEPENDENCIES, and distributing this file is up to
the user), and that it uses the obsolete form of AC_INIT and AM_INIT_AUTOMAKE.
Upgrading to the new syntax is not straightforward, because shell variables
are not allowed in AC_INIT’s arguments. We recommend that version.sh be
replaced by an M4 file that is included by configure.ac:
m4_include([version.m4])
AC_INIT([name], VERSION_NUMBER)
AM_INIT_AUTOMAKE
…
Here version.m4 could contain something like ‘m4_define([VERSION_NUMBER],
[1.2])’. The advantage of this second form is that automake will take care
of the dependencies when defining the rebuild rule, and will also distribute
the file automatically. An inconvenience is that autoconf will now be rerun
each time the version number is bumped, when only configure had to be rerun in
the previous setup.
----
So use of project version.m4 is officially documented.
With other words warning is not harmless but critical functional regression.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?111007>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/