From 525d5afc5b3a613fe019f263549ef0b28228d974 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Fri, 16 Nov 2018 19:50:15 +0000 Subject: Minor correction in shell's if statement If the Makefile `$(static_build)' variable in '/reproduce/src/make/dependencies-build-rules.mk' isn't defined (by mistake), it will default to blank space, then the Shell will complain about a bad formatted operator (needing two operands). So an `x' was added before it and before `yes' which will allow us to safely pass such cases without a terrible crash. --- reproduce/src/make/dependencies-build-rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reproduce/src/make/dependencies-build-rules.mk b/reproduce/src/make/dependencies-build-rules.mk index 49838f3..99e0b25 100644 --- a/reproduce/src/make/dependencies-build-rules.mk +++ b/reproduce/src/make/dependencies-build-rules.mk @@ -48,7 +48,7 @@ # 4: Extra configuration options. # 5: Extra options/arguments to pass to Make. # 6: Step to run between `make' and `make install': usually `make check'. -gbuild = if [ $(static_build) = yes ] && $(3)x = staticx ]; then \ +gbuild = if [ x$(static_build) = xyes ] && $(3)x = staticx ]; then \ export LDFLAGS="$$LDFLAGS -static"; \ fi; \ check="$(6)"; \ @@ -66,7 +66,7 @@ gbuild = if [ $(static_build) = yes ] && $(3)x = staticx ]; then \ # CMake # ----- -cbuild = if [ $(static_build) = yes ] && [ $(3)x = staticx ]; then \ +cbuild = if [ x$(static_build) = xyes ] && [ $(3)x = staticx ]; then \ export LDFLAGS="$$LDFLAGS -static"; \ opts="-DBUILD_SHARED_LIBS=OFF"; \ fi; \ -- cgit v1.2.1