build: use 'vercomp' without relying on it being in PATH

Not every environment has $ZEPHYR_BASE/scripts/ in the PATH, which can
cause conflicts (eg: the test environment doesn't define it to
simplify the build instructions).

Using vercomp as $ZEPHYR_BASE/scripts/vercomp, we remove this
requirement.

Change-Id: I8c390f905907f42d1ba2b4d1378e188705164e13
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
This commit is contained in:
Inaky Perez-Gonzalez 2016-09-15 23:59:15 -07:00
commit 00d0e4631b

View file

@ -19,7 +19,7 @@ ifndef ZEPHYR_SDK_INSTALL_DIR
$(error ZEPHYR_SDK_INSTALL_DIR is not set)
else
SDK_VERSION = $(shell cat ${ZEPHYR_SDK_INSTALL_DIR}/sdk_version)
SDK_CHECK = $(shell vercomp $(REQUIRED_SDK_VER) $(SDK_VERSION) || echo $$?)
SDK_CHECK = $(shell ${ZEPHYR_BASE}/scripts/vercomp $(REQUIRED_SDK_VER) $(SDK_VERSION) || echo $$?)
ifeq ($(SDK_CHECK),1)
$(error (The SDK version you are using is old, please update your SDK. You need at least SDK version $(REQUIRED_SDK_VER)))