branch development updated: Fix errors in distclean and maintainer-clean

Ileana Dumitrescu <[email protected]>
Newsgroups gmane.comp.gnu.libtool.cvs
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script.

ildumi pushed a commit to branch development
in repository libtool.

The following commit(s) were added to refs/heads/development by this push:
     new a1fe29d7 Fix errors in distclean and maintainer-clean
a1fe29d7 is described below

commit a1fe29d73b5b2cb34053aa85d31c522c48a7785a
Author: Ileana Dumitrescu <[email protected]>
AuthorDate: Wed Oct 9 20:02:28 2024 +0300

    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. Add AC_SUBST for
      LT_DOLLAR_SIGN use in libltdl/ltdl.mk.
    * libltdl/ltdl.mk: Add conditional to check if LT_ARGZ_H is empty.
---
 configure.ac    | 5 ++++-
 libltdl/ltdl.mk | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4b3a2082..dd611b96 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)'])
 
 
 ## ------------------------------- ##
@@ -166,6 +166,9 @@ AC_SUBST([to_tool_file_cmd])dnl
 # Propagate --enable-aix-soname option to the testsuite.
 AC_SUBST([with_aix_soname])dnl
 
+# Avoid non-POSIX variable name
+AC_SUBST([LT_DOLLAR_SIGN],[$])dnl
+
 ## ---------------------- ##
 ## Gnulib initialisation. ##
 ## ---------------------- ##
diff --git a/libltdl/ltdl.mk b/libltdl/ltdl.mk
index 1b7b8a38..b1ee800f 100644
--- a/libltdl/ltdl.mk
+++ b/libltdl/ltdl.mk
@@ -131,7 +131,8 @@ EXTRA_DIST	       += libltdl/COPYING.LIB \
 ## Gnulib Makefile.am snippets ##
 ## --------------------------- ##
 
-BUILT_SOURCES	+= libltdl/libltdl/$(LT_ARGZ_H)
+# Ugly conditional for 'make maintainer-clean' when LT_ARGZ_H is empty
+BUILT_SOURCES	+= @LT_DOLLAR_SIGN@(if @LT_DOLLAR_SIGN@(LT_ARGZ_H),libltdl/libltdl/@LT_DOLLAR_SIGN@(LT_ARGZ_H))
 EXTRA_DIST	+= libltdl/libltdl/lt__argz_.h \
 		   libltdl/lt__argz.c
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.