[PATCH] Suppress the "/bin/sh: 1: cannot open version.h: No such file" noise.

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Wed Feb 27 03:28:27 PST 2013


Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com>
---
 Makefile |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index c620df2..273448e 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,8 @@ XSLTFILES = xslt/*.xslt
 VERSION_FILE = version.h
 # There's only one line in $(VERSION_FILE); use the shell builtin `read'
 STORED_VERSION_STRING = \
-	$(subst ",,$(shell read ignore ignore v <$(VERSION_FILE) && echo $$v))
+	$(subst ",,$(shell [ ! -r $(VERSION_FILE) ] || \
+			   read ignore ignore v <$(VERSION_FILE) && echo $$v))
 #" workaround editor syntax highlighting quirk

 UNAME := $(shell $(CC) -dumpmachine 2>&1 | grep -E -o "linux|darwin|win")
-- 
1.7.10.4


More information about the subsurface mailing list