Subject: Re: bug#73672: error in distclean and maintainer-clean from releases
From: Ileana Dumitrescu <[email-masked]>
To: [email-masked]
Cc: Michael Pratt <[email-masked]>
Date: Wed, 9 Oct 2024 20:31:46 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

On 07/10/2024 03:32, Michael Pratt via bug-libtool via Bug reports for 
the GNU libtool shared library maintenance tool wrote:
> Hi,
> 
> After configuring with a release, on my system the variable $(LT_ARGZ_H) ends up being blank.
> For building this is no problem, however, if I wanted to run the clean targets there is an error:
> 
>    This command is intended for maintainers to use
>    it deletes files that may require special tools to rebuild.
>    test -z "libtool libtoolize libltdl/libltdl/ ./.version" || rm -f libtool libtoolize libltdl/libltdl/ ./.version
>    rm: cannot remove 'libltdl/libltdl/': Is a directory
>    make[4]: [Makefile:2003: maintainer-clean-generic] Error 1 (ignored)
> 
> even though it is allowed to pass, the rest of the rules do not run for that subdirectory "."
> A quick patch can workaround this:
> 
> --- a/libltdl/ltdl.mk
> +++ b/libltdl/ltdl.mk
> @@ -134,7 +134,7 @@ EXTRA_DIST	       += libltdl/COPYING.LIB
>   ## Gnulib Makefile.am snippets ##
>   ## --------------------------- ##
> 
> -BUILT_SOURCES	+= libltdl/libltdl/$(LT_ARGZ_H)
> +BUILT_SOURCES	+= $(if $(LT_ARGZ_H),libltdl/libltdl/$(LT_ARGZ_H))
>   EXTRA_DIST	+= libltdl/libltdl/lt__argz_.h \
>   		   libltdl/lt__argz.c
> 
> 
> 
> however this results in a warning:
> 
>    libltdl/ltdl.mk:137: warning: if $(LT_ARGZ_H: non-POSIX variable name
>    libltdl/ltdl.mk:137: (probably a GNU make extension)
> 
> 
> so probably there is a better way to fix it...
> 

Thank you for the bug report! I have updated the development branch [1]
based off of your workaround and something I found when researching [2]
to avoid the warning you mentioned.

This should fix the issue you reported with the one I noticed. If there
are any issues, I will reopen the bug.

[1] 
https://git.savannah.gnu.org/cgit/libtool.git/commit/?h=development&id=a1fe29d73b5b2cb34053aa85d31c522c48a7785a
[2] 
https://autoconf.gnu.narkive.com/DvFhTSVq/autoreconf-stops-with-non-posix-variable-name

-- 
Ileana Dumitrescu

GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354