groff-commit
[Top][All Lists]
Advanced

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

[groff] 24/28: m4/groff.m4 (GROFF_PRINT): Refactor.


From: G. Branden Robinson
Subject: [groff] 24/28: m4/groff.m4 (GROFF_PRINT): Refactor.
Date: Wed, 25 May 2022 22:43:24 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit a11aeca5c41ae8eb1bc77d01b308813a3974b570
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed May 25 19:09:16 2022 -0500

    m4/groff.m4 (GROFF_PRINT): Refactor.
    
    * m4/groff.m4 (GROFF_PRINT): Refactor.  Stop performing checks for
      spooler options if none is available.  Stop redundantly reporting
      command name used for spooling PostScript files.  If an option is
      required for spooling DVI files, report it alone instead of repeating
      the command name as well.
---
 ChangeLog   |  8 ++++++++
 m4/groff.m4 | 30 ++++++++++++++----------------
 2 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 357967bb..7c2dff9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-05-25  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * m4/groff.m4 (GROFF_PRINT): Refactor.  Stop performing checks
+       for spooler options if none is available.  Stop redundantly
+       reporting command name used for spooling PostScript files.  If
+       an option is required for spooling DVI files, report it alone
+       instead of repeating the command name as well.
+
 2022-05-25  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        Fix insensitivity of groff(1) man page to configured spooler.
diff --git a/m4/groff.m4 b/m4/groff.m4
index 2bb1554b..37e0da2a 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -44,25 +44,23 @@ AC_DEFUN([GROFF_PRINT], [
   if test -n "$PSPRINT"
   then
     groff_have_spooler="$PSPRINT"
-  fi
-
-  AC_SUBST([PSPRINT])
-  AC_MSG_CHECKING([for command to use for spooling PostScript files])
-  AC_MSG_RESULT([$PSPRINT])
-
-  # Figure out DVIPRINT from PSPRINT.
-  AC_MSG_CHECKING([for command to use for spooling DVI files])
-  if test -n "$PSPRINT" && test -z "$DVIPRINT"
-  then
-    if test "$PSPRINT" = lpr
+    AC_SUBST([PSPRINT])
+    # Figure out DVIPRINT from PSPRINT.
+    AC_MSG_CHECKING([option to use when spooling DVI files])
+    spooler_option=none
+    if test -n "$PSPRINT" && test -z "$DVIPRINT"
     then
-      DVIPRINT="lpr -d"
-    else
-      DVIPRINT="$PSPRINT"
+      if test "$PSPRINT" = lpr
+      then
+        spooler_option=-d
+        DVIPRINT="$PSPRINT $spooler_option"
+      else
+        DVIPRINT="$PSPRINT"
+      fi
     fi
+    AC_SUBST([DVIPRINT])
+    AC_MSG_RESULT([$spooler_option])
   fi
-  AC_SUBST([DVIPRINT])
-  AC_MSG_RESULT([$DVIPRINT])
 ])
 
 # Bison-generated parsers have problems with C++ compilers other than



reply via email to

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