groff-commit
[Top][All Lists]
Advanced

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

[groff] 29/39: m4/groff.m4: Improve shell code portability.


From: G. Branden Robinson
Subject: [groff] 29/39: m4/groff.m4: Improve shell code portability.
Date: Sat, 29 Oct 2022 14:59:59 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 7d94789c29ab707255ea0e4fec3d090e0179a411
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Oct 29 10:19:14 2022 -0500

    m4/groff.m4: Improve shell code portability.
    
    * m4/groff.m4 (GROFF_POPPLER): Improve shell code portability.  Per the
      GNU Autoconf manual, "The -a, -o, '(', and ')' operands are not
      present in all implementations, and have been marked obsolete by Posix
      2008.  ...portable uses of test should never have more than four
      arguments, and scripts should use shell constructs like '&&' and '||'
      instead."
    
    Continues commit 1e4d06f1dc, 24 May.
---
 ChangeLog   | 9 +++++++++
 m4/groff.m4 | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b85edb47a..e41abcb03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-10-29  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * m4/groff.m4 (GROFF_POPPLER): Improve shell code portability.
+       Per the GNU Autoconf manual, "The -a, -o, '(', and ')' operands
+       are not present in all implementations, and have been marked
+       obsolete by Posix 2008.  ...portable uses of test should never
+       have more than four arguments, and scripts should use shell
+       constructs like '&&' and '||' instead."
+
 2022-10-26  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/preproc/preconv/preconv.cpp: Alter usage message handling.
diff --git a/m4/groff.m4 b/m4/groff.m4
index 27f954238..7bf76838c 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -1780,8 +1780,8 @@ AC_DEFUN([GROFF_POPPLER], [
   AC_CHECK_PROG([PDFFONTS], [pdffonts], [found], [missing])
   AC_CHECK_PROG([PDFIMAGES], [pdfimages], [found], [missing])
   if test "$PDFINFO" = found \
-    -a "$PDFFONTS" = found \
-    -a "$PDFIMAGES" = found
+    && test "$PDFFONTS" = found \
+    && test "$PDFIMAGES" = found
   then
     groff_have_pdftools=yes
   fi



reply via email to

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