[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue 5571: streamline cat | sed | sed (issue 551070043 by address@hidde
From: |
nine . fierce . ballads |
Subject: |
Issue 5571: streamline cat | sed | sed (issue 551070043 by address@hidden) |
Date: |
Thu, 10 Oct 2019 19:03:52 -0700 |
Reviewers: ,
Description:
https://sourceforge.net/p/testlilyissues/issues/5571/
It can be done in one sed. The motivation is to set a good example.
Please review this at https://codereview.appspot.com/551070043/
Affected files (+9, -11 lines):
M make/generic-rules.make
M stepmake/stepmake/python-module-rules.make
M stepmake/stepmake/script-rules.make
M stepmake/stepmake/substitute-rules.make
Index: make/generic-rules.make
diff --git a/make/generic-rules.make b/make/generic-rules.make
index
c1e99b82b657cb99d9f7492c406995ce47ace88f..790bc614f22a1e1770cc69dce6bb9b9dad11c45a
100644
--- a/make/generic-rules.make
+++ b/make/generic-rules.make
@@ -9,7 +9,7 @@ $(outdir)/%.ly: %.lym4
$(outdir)/%: %.in
$(call ly_progress,Making,$@,< in)
rm -f $@
- cat $< | sed $(sed-atfiles) | sed $(sed-atvariables) > $@
+ sed $(sed-atfiles) $(sed-atvariables) < $< > $@
Index: stepmake/stepmake/python-module-rules.make
diff --git a/stepmake/stepmake/python-module-rules.make
b/stepmake/stepmake/python-module-rules.make
index
042a44ed9ff25c811b10c557d9de56f348a98b32..6d26ea1ed88af9781f33f81592878ce59683fc84
100644
--- a/stepmake/stepmake/python-module-rules.make
+++ b/stepmake/stepmake/python-module-rules.make
@@ -5,6 +5,6 @@
# doesn't compile.
$(outdir)/%.py: %.py $(config_make) $(depth)/VERSION
$(call ly_progress,Making,$@,(sed))
- sed $(sed-atfiles) < $< | sed $(sed-atvariables) > $@
+ sed $(sed-atfiles) $(sed-atvariables) < $< > $@
PYTHONOPTIMIZE= $(PYTHON) -c 'import py_compile; py_compile.compile
("$@", doraise=True)'
chmod 755 $@
Index: stepmake/stepmake/script-rules.make
diff --git a/stepmake/stepmake/script-rules.make
b/stepmake/stepmake/script-rules.make
index
1d7579b35d26eb6f3dad7614e02f45dd0ad124a2..98b90e34aa9691c61b537159445e6c98a45b3dcf
100644
--- a/stepmake/stepmake/script-rules.make
+++ b/stepmake/stepmake/script-rules.make
@@ -1,31 +1,31 @@
$(outdir)/%: %.pl $(config_make) $(depth)/VERSION
$(call ly_progress,Making,$@,(sed))
- cat $< | sed $(sed-atfiles) | sed $(sed-atvariables) > $@
+ sed $(sed-atfiles) $(sed-atvariables) < $< > $@
chmod 755 $@
$(outdir)/%: %.bash $(config_make) $(depth)/VERSION
$(call ly_progress,Making,$@,(sed))
- cat $< | sed $(sed-atfiles) | sed $(sed-atvariables) > $@
+ sed $(sed-atfiles) $(sed-atvariables) < $< > $@
chmod 755 $@
$(outdir)/%: %.scm $(config_make) $(depth)/VERSION
$(call ly_progress,Making,$@,(sed))
- cat $< | sed $(sed-atfiles) | sed $(sed-atvariables) > $@
+ sed $(sed-atfiles) $(sed-atvariables) < $< > $@
chmod 755 $@
$(outdir)/%: %.expect $(config_make) $(depth)/VERSION
$(call ly_progress,Making,$@,(sed))
- cat $< | sed $(sed-atfiles) | sed $(sed-atvariables) > $@
+ sed $(sed-atfiles) $(sed-atvariables) < $< > $@
chmod 755 $@
$(outdir)/%: %.sh $(config_make) $(depth)/VERSION
$(call ly_progress,Making,$@,(sed))
- cat $< | sed $(sed-atfiles) | sed $(sed-atvariables) > $@
+ sed $(sed-atfiles) $(sed-atvariables) < $< > $@
chmod 755 $@
$(outdir)/%: %.py $(config_make) $(depth)/VERSION
$(call ly_progress,Making,$@,(sed))
- cat $< | sed $(sed-atfiles) | sed $(sed-atvariables) > $@
+ sed $(sed-atfiles) $(sed-atvariables) < $< > $@
chmod 755 $@
Index: stepmake/stepmake/substitute-rules.make
diff --git a/stepmake/stepmake/substitute-rules.make
b/stepmake/stepmake/substitute-rules.make
index
f2d2f0ea6fbd079da04b2c2448adbfa36685f68d..f6c036c453ebdb65ad6853f868f835237592f7f7
100644
--- a/stepmake/stepmake/substitute-rules.make
+++ b/stepmake/stepmake/substitute-rules.make
@@ -3,6 +3,4 @@
$(outdir)/%: %.in $(config_make) $(depth)/VERSION
$(call ly_progress,Making,$@,< in)
rm -f $@
- cat $< | sed $(sed-atfiles) | sed $(sed-atvariables) > $@
-
-
+ sed $(sed-atfiles) $(sed-atvariables) < $< > $@
- Issue 5571: streamline cat | sed | sed (issue 551070043 by address@hidden),
nine . fierce . ballads <=