bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] maint.mk: avoid extra forks


From: Stefano Lattarini
Subject: [PATCH] maint.mk: avoid extra forks
Date: Sat, 8 Dec 2012 18:08:29 +0100

* top/maint.mk (_cfg_mk): The GNU make manual documents that
"$(wildcard FILE)" expands to empty if FILE doesn't exist.
So use that instead of "$(shell test -f FILE && echo FILE)".
---

 OK to apply?

 Regards,
   Stefano

 ChangeLog    | 7 +++++++
 top/maint.mk | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index b4b242e..413e435 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-12-08  Stefano Lattarini  <address@hidden>
+
+       maint.mk: avoid extra forks
+       * top/maint.mk (_cfg_mk): The GNU make manual documents that
+       "$(wildcard FILE)" expands to empty if FILE doesn't exist.
+       So use that instead of "$(shell test -f FILE && echo FILE)".
+
 2012-12-07  Paul Eggert  <address@hidden>
 
        vasnprintf: fix ASCII_ONLY typo
diff --git a/top/maint.mk b/top/maint.mk
index cd365e7..fd2b41b 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -155,7 +155,7 @@ export LC_ALL = C
 ## Sanity checks.  ##
 ## --------------- ##
 
-_cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk')
+_cfg_mk := $(wildcard $(srcdir)/cfg.mk)
 
 # Collect the names of rules starting with 'sc_'.
 syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' 
\
-- 
1.8.0.1.347.gf94c325




reply via email to

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