Hi Collin,

> --- /home/collin/.local/src/texinfo/tp/Texinfo/XS/gnulib/lib/Makefile.am      
> 2024-04-03 04:25:14.105131041 -0700
> +++ 
> /home/collin/.local/src/texinfo/tp/Texinfo/glpyemzDvH/gnulib/lib/Makefile.am  
>     2024-04-03 04:25:02.276104588 -0700
> @@ -318,7 +318,7 @@
>  ## begin gnulib module havelib
>  
>  
> -EXTRA_DIST += $(top_srcdir)/./config.rpath
> +EXTRA_DIST += $(top_srcdir)/config.rpath
>  
>  ## end   gnulib module havelib

Indeed, the Python-based output is prettier in this case.

> This patch fixes it by checking if "$auxdir" is ".". If so, then we
> just prepend the file with '$(top_srcdir)/' instead of
> '$(top_srcdir)/'"$auxdir".

Thanks, applied with a small tweak.

Bruno

>From 83a61464bd251ccd031ca3188d8be151f6591470 Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Thu, 4 Apr 2024 01:26:48 +0200
Subject: [PATCH 1/2] gnulib-tool.sh: Reduce code duplication in last commit.

* gnulib-tool.sh (func_get_automake_snippet_unconditional): Refactor
computation of sed_prepend_auxdir.
---
 ChangeLog      | 6 ++++++
 gnulib-tool.sh | 5 +++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index edbb860cb3..6863c5e20b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-04-03  Bruno Haible  <br...@clisp.org>
+
+	gnulib-tool.sh: Reduce code duplication in last commit.
+	* gnulib-tool.sh (func_get_automake_snippet_unconditional): Refactor
+	computation of sed_prepend_auxdir.
+
 2024-04-03  Collin Funk  <collin.fu...@gmail.com>
 
 	gnulib-tool.sh: Don't emit an unnecessary './' path component.
diff --git a/gnulib-tool.sh b/gnulib-tool.sh
index ecd9c5181c..57620ddf36 100755
--- a/gnulib-tool.sh
+++ b/gnulib-tool.sh
@@ -2654,10 +2654,11 @@ func_get_automake_snippet_unconditional ()
       func_filter_filelist buildaux_files "$nl" "$all_files" 'build-aux/' '' 'build-aux/' ''
       if test -n "$buildaux_files"; then
         if test "$auxdir" != "."; then
-          sed_prepend_auxdir='s,^,$(top_srcdir)/'"$auxdir"'/,'
+          auxdir_subdir="$auxdir/"
         else
-          sed_prepend_auxdir='s,^,$(top_srcdir)/,'
+          auxdir_subdir=
         fi
+        sed_prepend_auxdir='s,^,$(top_srcdir)/'"$auxdir_subdir"','
         echo "EXTRA_DIST += "`echo "$buildaux_files" | sed -e "$sed_prepend_auxdir"`
         echo
       fi
-- 
2.34.1

Reply via email to