On Tue, Jul 26, 2016 at 7:28 AM, Ján Tomko <address@hidden> wrote:
Instead of spawning three processes per file, rewrite the check
in perl and run it once for all the files.
---
Alternatively, grep --max-count 1 could help with getting rid of
the per-file commands and extra sed, but I don't know if it's
portable enough.
ChangeLog | 7 +++++++
top/maint.mk | 25 ++++++++++++++++++-------
2 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b698a6c..64e2026 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2016-07-26 Ján Tomko <address@hidden>
+ maint.mk: speed up require_config_h_first
+
+ Instead of spawning three processes per file, rewrite the check
+ in perl and run it once for all the files.
Thank you. Nice patch.
I've made some small changes and am ready to push this, but will wait
to hear from you.
From dce9706ee7661229bde91ee2e2357b68ffe68c7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <address@hidden>
Date: Tue, 26 Jul 2016 16:28:16 +0200
Subject: [PATCH] maint.mk: speed up require_config_h_first
Instead of spawning three processes per file,
rewrite the check in perl and run it once for all the files.
* top/maint.mk (perl_config_h_first_): Define.
(sc_require_config_h_first): Use it in place of shell code.
---
ChangeLog | 8 ++++++++
top/maint.mk | 23 ++++++++++++++++-------
2 files changed, 24 insertions(+), 7 deletions(-)