groff-commit
[Top][All Lists]
Advanced

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

[groff] 04/12: [hdtbl]: Build more quietly and DRY.


From: G. Branden Robinson
Subject: [groff] 04/12: [hdtbl]: Build more quietly and DRY.
Date: Thu, 21 Oct 2021 07:07:42 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 97a37e43f7cd98a298bfc91c4f08395bcbd9bc84
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Oct 21 19:37:47 2021 +1100

    [hdtbl]: Build more quietly and DRY.
    
    * contrib/hdtbl/hdtbl.am:
      (hdtbl_test_template): Pull file name into a new variable.
      (EXTRA_DIST, contrib/hdtbl/examples/test-hdtbl.sh): Use it.
    
      (contrib/hdtbl/examples/test-hdtbl.sh): Build more quietly; prefix
      rule with `$(AM_V_GEN)`.  Also run `chmod` conditionally.
    
    Also wrap long lines and tweak legal notice formatting.
---
 contrib/hdtbl/ChangeLog |  8 ++++++++
 contrib/hdtbl/hdtbl.am  | 23 ++++++++++++++---------
 2 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/contrib/hdtbl/ChangeLog b/contrib/hdtbl/ChangeLog
index 9add31b..b6c1605 100644
--- a/contrib/hdtbl/ChangeLog
+++ b/contrib/hdtbl/ChangeLog
@@ -1,3 +1,11 @@
+2021-10-21  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * hdtbl.am:
+       (hdtbl_test_template): Pull file name into a new variable.
+       (EXTRA_DIST, contrib/hdtbl/examples/test-hdtbl.sh): Use it.
+       (contrib/hdtbl/examples/test-hdtbl.sh): Build more quietly;
+       prefix rule with `$(AM_V_GEN)`.  Also run `chmod` conditionally.
+
 2021-07-11  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * hdtbl.am: Remove unnecessary Make variable.
diff --git a/contrib/hdtbl/hdtbl.am b/contrib/hdtbl/hdtbl.am
index 68bbe83..0e09c7d 100644
--- a/contrib/hdtbl/hdtbl.am
+++ b/contrib/hdtbl/hdtbl.am
@@ -1,7 +1,7 @@
 # Copyright (C) 2006-2020 Free Software Foundation, Inc.
-#      Written by Werner Lemberg (wl@gnu.org)
+#      Written by Werner Lemberg <wl@gnu.org>
 #      Automake migration by Bertrand Garrigues
-#
+#        <bertrand.garrigues@laposte.net>
 #
 # This file is part of groff.
 #
@@ -36,6 +36,8 @@ HDTBLTMACFILES = \
 hdtbltmacdir = $(tmacdir)
 dist_hdtbltmac_DATA = $(HDTBLTMACFILES)
 
+hdtbl_test_template = contrib/hdtbl/examples/test-hdtbl.sh.in
+
 # Files installed in $(exampledir)/hdtbl.  HDTBLEXAMPLEFILES are
 # located in the source tree, while HDTBLPROCESSEDEXAMPLEFILES are
 # generated in the build tree.
@@ -47,7 +49,7 @@ HDTBLGENFILES = \
 EXTRA_DIST += \
   contrib/hdtbl/examples/fonts_n.in \
   contrib/hdtbl/examples/fonts_x.in \
-  contrib/hdtbl/examples/test-hdtbl.sh.in
+  $(hdtbl_test_template)
 
 HDTBLEXAMPLEFILES = \
   contrib/hdtbl/examples/common.roff \
@@ -97,12 +99,15 @@ EXTRA_DIST += \
 if BUILD_EXAMPLES
 hdtbl_TESTS = contrib/hdtbl/examples/test-hdtbl.sh
 TESTS += $(hdtbl_TESTS)
-contrib/hdtbl/examples/test-hdtbl.sh: $(top_builddir)/config.status \
-       $(HDTBLPROCESSEDEXAMPLEFILES) 
$(top_srcdir)/contrib/hdtbl/examples/test-hdtbl.sh.in
-       sed -e "s|[@]abs_top_builddir[@]|$(abs_top_builddir)|g" \
-           -e "s|[@]GHOSTSCRIPT[@]|$(GHOSTSCRIPT)|g" \
-               $(top_srcdir)/contrib/hdtbl/examples/test-hdtbl.sh.in > $@
-       chmod +x $@
+contrib/hdtbl/examples/test-hdtbl.sh: \
+  $(top_builddir)/config.status \
+  $(HDTBLPROCESSEDEXAMPLEFILES) \
+  $(top_srcdir)/$(hdtbl_test_template)
+       $(AM_V_GEN)sed \
+         -e "s|[@]abs_top_builddir[@]|$(abs_top_builddir)|g" \
+         -e "s|[@]GHOSTSCRIPT[@]|$(GHOSTSCRIPT)|g" \
+         $(top_srcdir)/$(hdtbl_test_template) > $@ \
+       && chmod +x $@
 MOSTLYCLEANFILES += $(hdtbl_TESTS)
 endif
 



reply via email to

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