groff-commit
[Top][All Lists]
Advanced

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

[groff] 04/07: tmac/tmac.am: Remove unidiomatic for loop.


From: G. Branden Robinson
Subject: [groff] 04/07: tmac/tmac.am: Remove unidiomatic for loop.
Date: Fri, 29 Jan 2021 16:21:47 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 362077eeb4abfd0b21416c093d32e4754d975731
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Jan 30 05:23:46 2021 +1100

    tmac/tmac.am: Remove unidiomatic for loop.
    
    * tmac/tmac.am ($(TMACSTRIPFILES)):
      ($(TMACMDOCSTRIPFILES)): Remove unidiomatic for loop which frustrated
      parallel make operation.
    
    Thanks to an anonymous contributor for the report and patch.
    
    Fixes <https://savannah.gnu.org/bugs/?59958>.
    
    The bug report characterizes the for loop as a "race", which I don't
    think is strictly correct, since the outcome of the work done is not
    subject to variation.  The body of the for loop is a clobbering shell
    redirection operator, so the problem was one of potential pointless
    repetition of work in concurrent operation.  Good to fix, but not a
    cause for alarm.
    
    Problem dates back to 2609cfb727a98809548edfd721c5cb923085b24b, 6
    September 2014.
---
 ChangeLog    | 10 ++++++++++
 tmac/tmac.am | 12 ++++--------
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3bbff9b..51fe95b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2021-01-30  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/tmac.am ($(TMACSTRIPFILES)):
+       ($(TMACMDOCSTRIPFILES)): Remove unidiomatic for loop which
+       frustrated parallel make operation.
+
+       Thanks to an anonymous contributor for the report and patch.
+
+       Fixes <https://savannah.gnu.org/bugs/?59958>.
+
 2021-01-29  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * doc/ms.ms (Document control settings): Document old FAM string
diff --git a/tmac/tmac.am b/tmac/tmac.am
index e91110b..86204d4 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -191,17 +191,13 @@ tmac_XFAIL_TESTS = \
 XFAIL_TESTS += $(tmac_XFAIL_TESTS)
 
 $(TMACSTRIPFILES): $(TMACUNSTRIPFILES)
-       for f in $(TMACSTRIPFILES); do \
-          sed -f $(tmac_srcdir)/strip.sed $(top_srcdir)/$$f-u \
-            > $(top_builddir)/$$f; \
-       done
+       sed -f $(tmac_srcdir)/strip.sed $(top_srcdir)/$@-u \
+           > $(top_builddir)/$@
 
 $(TMACMDOCSTRIPFILES): $(TMACMDOCUNSTRIPFILES)
        $(MKDIR_P) $(top_builddir)/tmac/mdoc
-       for f in $(TMACMDOCSTRIPFILES); do \
-          sed -f $(tmac_srcdir)/strip.sed $(top_srcdir)/$$f-u \
-            > $(top_builddir)/$$f; \
-       done
+       sed -f $(tmac_srcdir)/strip.sed $(top_srcdir)/$@-u \
+           > $(top_builddir)/$@
 
 tmac/www.tmac: tmac/www.tmac.in
        $(MKDIR_P) $(top_builddir)/tmac



reply via email to

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