changeset 17201:34b7c5b6a266

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)".
author Stefano Lattarini <stefano.lattarini@gmail.com>
date Sat, 08 Dec 2012 18:06:12 +0100
parents 8cd157fdb947
children 5b730fea4cab
files ChangeLog top/maint.mk
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-12-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+	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  <eggert@cs.ucla.edu>
 
 	vasnprintf: fix ASCII_ONLY typo
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -155,7 +155,7 @@
 ## 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' \