groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 15/33: m4/groff.m4: Drop garbage space from variable.


From: G. Branden Robinson
Subject: [groff] 15/33: m4/groff.m4: Drop garbage space from variable.
Date: Wed, 22 Mar 2023 22:11:44 -0400 (EDT)

gbranden pushed a commit to branch branden-post-1.23.0
in repository groff.

commit 6b9aecb48cb6b482cc6287c235a27e17c249a284
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Mar 13 22:31:57 2023 -0500

    m4/groff.m4: Drop garbage space from variable.
    
    * m4/groff.m4 (GROFF_TMAC): Eliminate garbage leading space from
      contents of `tmac_wrap` shell variable.
---
 ChangeLog   |  5 +++++
 m4/groff.m4 | 11 ++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 02c997892..5fbb42294 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-03-13  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       m4/groff.m4 (GROFF_TMAC): Eliminate garbage leading space from
+       contents of `tmac_wrap` shell variable.
+
 2023-03-13  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [build]: Clarify output of `GROFF_TMAC` Autoconf test.
diff --git a/m4/groff.m4 b/m4/groff.m4
index 4ad3a2679..01c8578d0 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -1146,6 +1146,7 @@ AC_DEFUN([GROFF_TMAC],
 
    AC_MSG_CHECKING([for system macro packages to make available])
    tmac_wrap=
+   space=
    if test "$sys_tmac_file_prefix" = tmac.
    then
      for f in $sys_tmac_prefix*
@@ -1155,8 +1156,11 @@ AC_DEFUN([GROFF_TMAC],
        e)
          ;;
        *)
-         grep "Copyright.*Free Software Foundation" $f >/dev/null \
-              || tmac_wrap="$tmac_wrap $suff" ;;
+         if ! grep "Copyright.*Free Software Foundation" $f >/dev/null
+         then
+           tmac_wrap="$tmac_wrap$space$suff"
+           space=' '
+         fi ;;
        esac
      done
    elif test -n "$sys_tmac_prefix"
@@ -1185,7 +1189,8 @@ AC_DEFUN([GROFF_TMAC],
            tmac.*)
              ;;
            *)
-             tmac_wrap="$tmac_wrap $suff" ;;
+             tmac_wrap="$tmac_wrap$space$suff"
+             space=' ' ;;
            esac
          fi
        esac



reply via email to

[Prev in Thread] Current Thread [Next in Thread]