From d405ede8705b704555e5d6ed1f1bc256c24afb7f Mon Sep 17 00:00:00 2001 From: Ileana Dumitrescu Date: Wed, 9 Oct 2024 20:02:28 +0300 Subject: [PATCH] Fix errors in distclean and maintainer-clean The variable, LT_ARGZ_H, can be empty, which causes distclean and maintainer-clean to error as a directory is attempted to be removed instead of a file. When running maintainer-clean for gnulib-tests, the .version file is missing, which is needed by config.status, so the command will error. * configure.ac: Update CONFIG_STATUS_DEPENDENCIES to use dotversion so that the .version file can be generated if needed. * libltdl/ltdl.mk: Add conditional with LTARGZH_EXISTS to append path for LT_ARGZ_H file to BUILT_SOURCES. * m4/ltdl.m4: Add AM_CONDITIONAL for LTARGZH_EXISTS that is set to true if LT_ARGZ_H is non-empty. * NO-THANKS: Add 'Michael Pratt' for bug#73672 contribution. * NEWS: List additional bug fix. --- NEWS | 2 ++ NO-THANKS | 1 + configure.ac | 2 +- libltdl/ltdl.mk | 2 ++ m4/ltdl.m4 | 5 +++-- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 4c76075f..c89f6575 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ NEWS - list of user-visible changes between releases of GNU Libtool - Fix incorrect use of workarounds designed for Darwin versions that don't have -single_module support. + - Fix errors when executing 'make distclean' and 'make maintainer-clean'. + * Noteworthy changes in release 2.5.3 (2024-09-25) [stable] diff --git a/NO-THANKS b/NO-THANKS index e35deaa2..218590bb 100644 --- a/NO-THANKS +++ b/NO-THANKS @@ -49,6 +49,7 @@ Juergen Reuter reuter@theoc01.desy.de Karl Berry karl@gnu.org Maciej W. Rozycki macro@linux-mips.org Manfred Weichel weichel@global.nacamar.de +Michael Pratt mcpratt@pm.me Mike Gorchak mike@malva.ua Mo DeJong mdejong@redhat.com Nick Hudson skrll@netbsd.org diff --git a/configure.ac b/configure.ac index 4b3a2082..dee87e8e 100644 --- a/configure.ac +++ b/configure.ac @@ -108,7 +108,7 @@ AB_INIT([$autobuild_mode]) dnl Make sure config.status is regenerated when the version timestamp changes -AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/.version']) +AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(dotversion)']) ## ------------------------------- ## diff --git a/libltdl/ltdl.mk b/libltdl/ltdl.mk index 1b7b8a38..9d6be829 100644 --- a/libltdl/ltdl.mk +++ b/libltdl/ltdl.mk @@ -131,7 +131,9 @@ EXTRA_DIST += libltdl/COPYING.LIB \ ## Gnulib Makefile.am snippets ## ## --------------------------- ## +if LTARGZH_EXISTS BUILT_SOURCES += libltdl/libltdl/$(LT_ARGZ_H) +endif EXTRA_DIST += libltdl/libltdl/lt__argz_.h \ libltdl/lt__argz.c diff --git a/m4/ltdl.m4 b/m4/ltdl.m4 index c47bb98c..af244089 100644 --- a/m4/ltdl.m4 +++ b/m4/ltdl.m4 @@ -8,7 +8,7 @@ # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 23 LTDL_INIT +# serial 24 LTDL_INIT # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE]) # ------------------------------------------ @@ -435,7 +435,8 @@ esac m4_ifdef([AM_CONDITIONAL], [AM_CONDITIONAL(INSTALL_LTDL, test no != "${enable_ltdl_install-no}") - AM_CONDITIONAL(CONVENIENCE_LTDL, test no != "${enable_ltdl_convenience-no}")]) + AM_CONDITIONAL(CONVENIENCE_LTDL, test no != "${enable_ltdl_convenience-no}") + AM_CONDITIONAL(LTARGZH_EXISTS, test -n "$LT_ARGZ_H")]) ])# _LT_ENABLE_INSTALL