Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make/matlab.mak: fixes error message when MEX is not found

  • Loading branch information...
commit 3cc0ed0edb86bdd0e3397ab18533189c7cd53dbb 1 parent 4f3ab48
Andrea Vedaldi vedaldi authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  make/matlab.mak
3  make/matlab.mak
View
@@ -9,7 +9,8 @@
# the empty string disables MATLAB support.
MEX ?= mex
-MATLAB_PATH ?= $(strip $(shell $(MEX) -v 2>&1 | sed -n 's/.*MATLAB *= *\(.*\)/\1/gp'))
+MATLAB_PATH ?= $(strip $(shell test "$$(command -v '$(MEX)')" && \
+ $(MEX) -v 2>&1 | sed -n 's/.*MATLAB *= *\(.*\)/\1/gp'))
MATLAB_EXE ?= "$(MATLAB_PATH)/bin/matlab"
# if expand to empty string, set to empty string for use with ifdef
Please sign in to comment.
Something went wrong with that request. Please try again.