egl: fail symbol check if lib is missing
authorEric Engestrom <eric.engestrom@imgtec.com>
Mon, 30 Oct 2017 15:27:10 +0000 (15:27 +0000)
committerEric Engestrom <eric.engestrom@imgtec.com>
Tue, 31 Oct 2017 17:59:19 +0000 (17:59 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/egl-symbols-check

index 4c5232cb6c031397b4237af23c1e46e542e5d800..ae867d04bca91f22b070928d432fe26a24039edc 100755 (executable)
@@ -1,6 +1,14 @@
 #!/bin/sh
+set -eu
 
-FUNCS=$(nm -D --defined-only ${1-.libs/libEGL.so} | grep -o "T .*" | cut -c 3- | while read func; do
+LIB=${1-.libs/libEGL.so}
+
+if ! [ -f "$LIB" ]
+then
+  exit 1
+fi
+
+FUNCS=$(nm -D --defined-only $LIB | grep -o "T .*" | cut -c 3- | while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
 eglBindAPI
 eglBindTexImage