groff-commit
[Top][All Lists]
Advanced

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

[groff] 05/12: [mom]: Build more quietly and DRY.


From: G. Branden Robinson
Subject: [groff] 05/12: [mom]: 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 45799ac41b9c35bba2037554bd2cd3891609e579
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu Oct 21 19:44:01 2021 +1100

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

diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog
index 3a937a5..94dabda 100644
--- a/contrib/mom/ChangeLog
+++ b/contrib/mom/ChangeLog
@@ -1,3 +1,11 @@
+2021-10-21  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * mom.am:
+       (mom_test_template): Pull file name into a new variable.
+       (EXTRA_DIST, contrib/mom/examples/tests-mom.sh): Use it.
+       (contrib/mom/examples/tests-mom.sh): Build more quietly;
+       prefix rule with `$(AM_V_GEN)`.  Also run `chmod` conditionally.
+
 2021-10-04
 
        * version 2.5 release (see NEWS)
diff --git a/contrib/mom/mom.am b/contrib/mom/mom.am
index 7ac715e..25ee0ed 100644
--- a/contrib/mom/mom.am
+++ b/contrib/mom/mom.am
@@ -1,17 +1,17 @@
 # Copyright (C) 2002-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.
 #
 # groff is free software; you can redistribute it and/or modify it under
 # the terms of the GNU General Public License as published by the Free
-# Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
 #
-# groff is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 # for more details.
 #
@@ -108,20 +108,25 @@ MOMPROCESSEDEXAMPLEFILES = \
 momprocessedexampledir = $(exampledir)/mom
 nodist_momprocessedexample_DATA = $(MOMPROCESSEDEXAMPLEFILES)
 
+mom_test_template = contrib/mom/examples/test-mom.sh.in
+
 if HAVE_PDFTOOLS
 # Small test suite on mom examples
 mom_TESTS = contrib/mom/examples/tests-mom.sh
 TESTS += $(mom_TESTS)
-contrib/mom/examples/tests-mom.sh: $(top_builddir)/config.status \
-       $(MOMPROCESSEDEXAMPLEFILES)  
$(top_srcdir)/contrib/mom/examples/test-mom.sh.in
-       sed -e "s|[@]abs_top_builddir[@]|$(abs_top_builddir)|g" \
-            -e "s|[@]groff_have_urw_fonts[@]|$(groff_have_urw_fonts)|g" \
-               $(top_srcdir)/contrib/mom/examples/test-mom.sh.in > $@
-       chmod +x $@
+contrib/mom/examples/tests-mom.sh: \
+  $(top_builddir)/config.status \
+  $(MOMPROCESSEDEXAMPLEFILES) \
+  $(top_srcdir)/$(mom_test_template)
+       $(AM_V_GEN)sed \
+         -e "s|[@]abs_top_builddir[@]|$(abs_top_builddir)|g" \
+         -e "s|[@]groff_have_urw_fonts[@]|$(groff_have_urw_fonts)|g" \
+         $(top_srcdir)/$(mom_test_template) > $@ \
+       && chmod +x $@
 MOSTLYCLEANFILES += $(mom_TESTS)
 endif
 endif
-EXTRA_DIST += contrib/mom/examples/test-mom.sh.in
+EXTRA_DIST += $(mom_test_template)
 
 # For this list of files we add a symlink from $(exampledir)/mom to 
$(pdfdocdir)
 PDFDOCFILE = mom-pdf.pdf



reply via email to

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