public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4])
@ 2020-12-15 14:40 Dmitry V. Levin
  2020-12-15 14:40 ` [PATCH 2/2] m4: remove unneeded Makefile.am Dmitry V. Levin
  2020-12-15 15:07 ` [PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4]) Mark Wielaard
  0 siblings, 2 replies; 9+ messages in thread
From: Dmitry V. Levin @ 2020-12-15 14:40 UTC (permalink / raw)
  To: elfutils-devel

Makefile.am already contains "ACLOCAL_AMFLAGS = -I m4",
that is enough for autoreconf to do the right thing.

Tested with
autoreconf -if && ./configure --enable-maintainer-mode && make && make distcheck

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
 ChangeLog    | 4 ++++
 configure.ac | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 2b2f7437..28a11e75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2020-12-15  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* configure.ac (AC_CONFIG_MACRO_DIR): Remove.
+
 2020-12-12  Dmitry V. Levin  <ldv@altlinux.org>
 
 	* configure.ac: Fix spelling typos in comments.
diff --git a/configure.ac b/configure.ac
index 9e29f169..268a4674 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,7 +57,6 @@ AC_CONFIG_SRCDIR([libelf/libelf.h])
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_HEADERS([config.h])
 
-AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_FILES([m4/Makefile])
 
 dnl The RPM spec file.  We substitute a few values in the file.
-- 
ldv

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/2] m4: remove unneeded Makefile.am
  2020-12-15 14:40 [PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4]) Dmitry V. Levin
@ 2020-12-15 14:40 ` Dmitry V. Levin
  2020-12-15 20:15   ` Mark Wielaard
  2020-12-15 15:07 ` [PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4]) Mark Wielaard
  1 sibling, 1 reply; 9+ messages in thread
From: Dmitry V. Levin @ 2020-12-15 14:40 UTC (permalink / raw)
  To: elfutils-devel

m4 files do not have to listed in EXTRA_DIST, in fact,
biarch.m4 has not been listed since its very beginning in 2013,
and nobody seems to have noticed so far.

Tested with
autoreconf -if && ./configure --enable-maintainer-mode && make && make distcheck

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
 ChangeLog      |  3 +++
 Makefile.am    |  2 +-
 configure.ac   |  2 --
 m4/ChangeLog   |  4 ++++
 m4/Makefile.am | 21 ---------------------
 5 files changed, 8 insertions(+), 24 deletions(-)
 delete mode 100644 m4/Makefile.am

diff --git a/ChangeLog b/ChangeLog
index 28a11e75..46568f04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2020-12-15  Dmitry V. Levin  <ldv@altlinux.org>
 
+	* Makefile.am (SUBDIRS): Remove m4.
+	* configure.ac (AC_CONFIG_FILES): Remove m4/Makefile.
+
 	* configure.ac (AC_CONFIG_MACRO_DIR): Remove.
 
 2020-12-12  Dmitry V. Levin  <ldv@altlinux.org>
diff --git a/Makefile.am b/Makefile.am
index f68f0966..818e3599 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,7 +26,7 @@ AM_MAKEFLAGS = --no-print-directory
 
 pkginclude_HEADERS = version.h
 
-SUBDIRS = config m4 lib libelf libcpu backends libebl libdwelf libdwfl libdw \
+SUBDIRS = config lib libelf libcpu backends libebl libdwelf libdwfl libdw \
 	  libasm debuginfod src po doc tests
 
 EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
diff --git a/configure.ac b/configure.ac
index 268a4674..2d977f28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,8 +57,6 @@ AC_CONFIG_SRCDIR([libelf/libelf.h])
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_HEADERS([config.h])
 
-AC_CONFIG_FILES([m4/Makefile])
-
 dnl The RPM spec file.  We substitute a few values in the file.
 AC_CONFIG_FILES([elfutils.spec:config/elfutils.spec.in])
 
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 8ab0ff39..78b1bbc9 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,7 @@
+2020-12-15  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* Makefile.am: Remove.
+
 2019-10-28  Aaron Merey  <amerey@redhat.com>
 
 	* ax_check_compile_flag.m4, ax_cxx_compile_stdcxx.m4: New files.
diff --git a/m4/Makefile.am b/m4/Makefile.am
deleted file mode 100644
index ae7a5657..00000000
--- a/m4/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-## Process this file with automake to produce Makefile.in -*-Makefile-*-
-##
-## Copyright (C) 2000-2009 Red Hat, Inc.
-## This file is part of elfutils.
-##
-## This file is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or
-## (at your option) any later version.
-##
-## elfutils is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program.  If not, see <http://www.gnu.org/licenses/>.
-##
-
-##m4-files-begin
-EXTRA_DIST = codeset.m4 gettext.m4 iconv.m4 lcmessage.m4 progtest.m4 zip.m4 ax_check_compile_flag.m4 ax_cxx_compile_stdcxx.m4
-- 
ldv

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4])
  2020-12-15 14:40 [PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4]) Dmitry V. Levin
  2020-12-15 14:40 ` [PATCH 2/2] m4: remove unneeded Makefile.am Dmitry V. Levin
@ 2020-12-15 15:07 ` Mark Wielaard
  2020-12-15 17:01   ` Dmitry V. Levin
  1 sibling, 1 reply; 9+ messages in thread
From: Mark Wielaard @ 2020-12-15 15:07 UTC (permalink / raw)
  To: Dmitry V. Levin, elfutils-devel

On Tue, 2020-12-15 at 17:40 +0300, Dmitry V. Levin wrote:
> Makefile.am already contains "ACLOCAL_AMFLAGS = -I m4",
> that is enough for autoreconf to do the right thing.

But is that a good thing to rely on?

The autoconf manual says "be aware that future Automake releases might
start flagging ACLOCAL_AMFLAGS as obsolescent, or even remove
support for it."

And the Autotools Mythbuster says "The search path for local files, as
of version 1.13 of automake, is defined by the directories listed in
AC_CONFIG_MACRO_DIR and AC_CONFIG_MACRO_DIRS arguments. Previously, it
was common to use a variable defined in Makefile.am (ACLOCAL_AMFLAGS)
to pass extra parameters to aclocal. This behaviour is deprecated and
will soon not be supported."

So, might it not be better to keep AC_CONFIG_MACRO_DIR([m4]) and remove
the ACLOCAL_AMFLAGS?

Thanks,

Mark

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4])
  2020-12-15 15:07 ` [PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4]) Mark Wielaard
@ 2020-12-15 17:01   ` Dmitry V. Levin
  2020-12-15 19:37     ` Mark Wielaard
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitry V. Levin @ 2020-12-15 17:01 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: elfutils-devel

On Tue, Dec 15, 2020 at 04:07:02PM +0100, Mark Wielaard wrote:
> On Tue, 2020-12-15 at 17:40 +0300, Dmitry V. Levin wrote:
> > Makefile.am already contains "ACLOCAL_AMFLAGS = -I m4",
> > that is enough for autoreconf to do the right thing.
> 
> But is that a good thing to rely on?

Looks like that's the common practice nowadays.

> The autoconf manual says "be aware that future Automake releases might
> start flagging ACLOCAL_AMFLAGS as obsolescent, or even remove
> support for it."
> 
> And the Autotools Mythbuster says "The search path for local files, as
> of version 1.13 of automake, is defined by the directories listed in
> AC_CONFIG_MACRO_DIR and AC_CONFIG_MACRO_DIRS arguments. Previously, it
> was common to use a variable defined in Makefile.am (ACLOCAL_AMFLAGS)
> to pass extra parameters to aclocal. This behaviour is deprecated and
> will soon not be supported."
> 
> So, might it not be better to keep AC_CONFIG_MACRO_DIR([m4]) and remove
> the ACLOCAL_AMFLAGS?

Hmm, despite all these recommendation, virtually every project that uses
automake also uses ACLOCAL_AMFLAGS, and very few use AC_CONFIG_MACRO_DIR.

The documentation on AC_CONFIG_MACRO_DIR says that
"you must also set 'ACLOCAL_AMFLAGS = -I DIR'",
so this might be the reason why AC_CONFIG_MACRO_DIR is not popular.

We can keep AC_CONFIG_MACRO_DIR, while it doesn't help, it doesn't harm
either.


-- 
ldv

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4])
  2020-12-15 17:01   ` Dmitry V. Levin
@ 2020-12-15 19:37     ` Mark Wielaard
  2020-12-15 20:14       ` Frank Ch. Eigler
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Wielaard @ 2020-12-15 19:37 UTC (permalink / raw)
  To: Dmitry V. Levin; +Cc: elfutils-devel

Hi Dmitry,

On Tue, 2020-12-15 at 20:01 +0300, Dmitry V. Levin wrote:
> Hmm, despite all these recommendation, virtually every project that
> uses
> automake also uses ACLOCAL_AMFLAGS, and very few use
> AC_CONFIG_MACRO_DIR.
> 
> The documentation on AC_CONFIG_MACRO_DIR says that
> "you must also set 'ACLOCAL_AMFLAGS = -I DIR'",
> so this might be the reason why AC_CONFIG_MACRO_DIR is not popular.
> 
> We can keep AC_CONFIG_MACRO_DIR, while it doesn't help, it doesn't
> harm either.

Hohum, this is slightly messy :{

So I looked at autoconf 2.70, just released and it says:

*** New macro AC_CONFIG_MACRO_DIRS.

  This macro can be used more than once and accepts a list of
  directories to search for local M4 macros.  With Automake 1.13 and
  later, use of this macro eliminates a reason to use ACLOCAL_AMFLAGS
  in Makefile.am.

  The older AC_CONFIG_MACRO_DIR, which could only be used once, is
  still supported but considered deprecated.

So it looks like to get rid of ACLOCAL_AMFLAGS we need to update to
autoconf 2.70 and switch to use AC_CONFIG_MACRO_DIRS.

I think it is too early to switch to autoconf 2.70. Currently we
require autoconf 2.63 and automake 1.11. We could probably upgrade to
autconf 2.69 and automake 1.13, but that doesn't seem to help with
AC_CONFIG_MACRO_DIR/ACLOCAL_AMFLAGS.

Since AC_CONFIG_MACRO_DIR is deprecated in 2.70 and ACLOCAL_AMFLAGS is
still needed even with it set lets just go with your patch and remove
it. We can see what we do when we upgrade autoconf/automake versions.

Pushed you original patch.

Cheers,

Mark

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4])
  2020-12-15 19:37     ` Mark Wielaard
@ 2020-12-15 20:14       ` Frank Ch. Eigler
  2020-12-15 20:31         ` Dmitry V. Levin
  0 siblings, 1 reply; 9+ messages in thread
From: Frank Ch. Eigler @ 2020-12-15 20:14 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: Dmitry V. Levin, elfutils-devel

Hi -

> I think it is too early to switch to autoconf 2.70. Currently we
> require autoconf 2.63 and automake 1.11. We could probably upgrade to
> autconf 2.69 and automake 1.13, but that doesn't seem to help with
> AC_CONFIG_MACRO_DIR/ACLOCAL_AMFLAGS.
> 
> Since AC_CONFIG_MACRO_DIR is deprecated in 2.70 and ACLOCAL_AMFLAGS is
> still needed even with it set lets just go with your patch and remove
> it. We can see what we do when we upgrade autoconf/automake versions.
> [...]

Note that since we do not commit auto*-generated code into the repo,
we don't really upgrade elfutils autoconf/automake versions.  We are
subject to the whims of each build-host or make-dist-host environment
(which could be relatively old).

- FChE


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] m4: remove unneeded Makefile.am
  2020-12-15 14:40 ` [PATCH 2/2] m4: remove unneeded Makefile.am Dmitry V. Levin
@ 2020-12-15 20:15   ` Mark Wielaard
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Wielaard @ 2020-12-15 20:15 UTC (permalink / raw)
  To: Dmitry V. Levin, elfutils-devel

Hi Dmitry,

On Tue, 2020-12-15 at 17:40 +0300, Dmitry V. Levin wrote:
> m4 files do not have to listed in EXTRA_DIST, in fact,
> biarch.m4 has not been listed since its very beginning in 2013,
> and nobody seems to have noticed so far.

Looks like you are right, the m4 macro files are automatically included
in the DIST_COMMON file list and so don't need to be added manually.

Pushed,

Mark

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4])
  2020-12-15 20:14       ` Frank Ch. Eigler
@ 2020-12-15 20:31         ` Dmitry V. Levin
  2020-12-15 21:00           ` Mark Wielaard
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitry V. Levin @ 2020-12-15 20:31 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: Mark Wielaard, elfutils-devel

Hi,

On Tue, Dec 15, 2020 at 03:14:27PM -0500, Frank Ch. Eigler wrote:
> Hi -
> 
> > I think it is too early to switch to autoconf 2.70. Currently we
> > require autoconf 2.63 and automake 1.11. We could probably upgrade to
> > autconf 2.69 and automake 1.13, but that doesn't seem to help with
> > AC_CONFIG_MACRO_DIR/ACLOCAL_AMFLAGS.
> > 
> > Since AC_CONFIG_MACRO_DIR is deprecated in 2.70 and ACLOCAL_AMFLAGS is
> > still needed even with it set lets just go with your patch and remove
> > it. We can see what we do when we upgrade autoconf/automake versions.
> > [...]
> 
> Note that since we do not commit auto*-generated code into the repo,
> we don't really upgrade elfutils autoconf/automake versions.  We are
> subject to the whims of each build-host or make-dist-host environment
> (which could be relatively old).

We do have some requirements, though.  For example:

AC_PREREQ(2.63)                 dnl Minimum Autoconf version required.


-- 
ldv

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4])
  2020-12-15 20:31         ` Dmitry V. Levin
@ 2020-12-15 21:00           ` Mark Wielaard
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Wielaard @ 2020-12-15 21:00 UTC (permalink / raw)
  To: Dmitry V. Levin, Frank Ch. Eigler; +Cc: elfutils-devel

Hi,

On Tue, 2020-12-15 at 23:31 +0300, Dmitry V. Levin wrote:
> On Tue, Dec 15, 2020 at 03:14:27PM -0500, Frank Ch. Eigler wrote:
> > Note that since we do not commit auto*-generated code into the repo,
> > we don't really upgrade elfutils autoconf/automake versions.  We are
> > subject to the whims of each build-host or make-dist-host environment
> > (which could be relatively old).
> 
> We do have some requirements, though.  For example:
> 
> AC_PREREQ(2.63)                 dnl Minimum Autoconf version required.

And we likewise specify the minimum version of automake (1.11) to use:

AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests])

That is why I said we could update those. I think "everybody" now has
at least autoconf 2.69 and automake 1.13. But I don't believe that
really helps us at the moment.

Cheers,

Mark

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-12-15 21:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 14:40 [PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4]) Dmitry V. Levin
2020-12-15 14:40 ` [PATCH 2/2] m4: remove unneeded Makefile.am Dmitry V. Levin
2020-12-15 20:15   ` Mark Wielaard
2020-12-15 15:07 ` [PATCH 1/2] configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4]) Mark Wielaard
2020-12-15 17:01   ` Dmitry V. Levin
2020-12-15 19:37     ` Mark Wielaard
2020-12-15 20:14       ` Frank Ch. Eigler
2020-12-15 20:31         ` Dmitry V. Levin
2020-12-15 21:00           ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).