branch: externals/matlab-mode
commit 3bf573b12da44884029dd953c7ecdbe09a020f5c
Author: John Ciolfi <[email protected]>
Commit: John Ciolfi <[email protected]>
Makefile: skip shelltests if matlab command not found
---
Makefile | 12 ++++++++----
tests/Makefile | 9 +++++++--
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 3acf9cf9d0..5f4c6bac6f 100644
--- a/Makefile
+++ b/Makefile
@@ -87,11 +87,15 @@ ifneq ($(filter tests all, $(GOALS)),)
# matlab-shell.
MATLAB_EXE = matlab
ifeq ($(shell which $(MATLAB_EXE)),)
- $(warning $(MATLAB_EXE) not found. Consider running: make
MATLAB_EXE=/path/to/matlab)
+ $(warning warning: $(MATLAB_EXE) command not found. Consider running:
make MATLAB_EXE=/path/to/matlab)
+ MATLAB_EXE = none
+ else
+ export MATLAB_PROG_SETUP = \
+ "--eval=(setq matlab-shell-command \"$(MATLAB_EXE)\")" \
+ "--eval=(setq matlab-shell-command-switches '(\"-nodesktop\"
\"-nosplash\" \"-noFigureWindows\"))"
endif
- export MATLAB_PROG_SETUP = \
- "--eval=(setq matlab-shell-command \"$(MATLAB_EXE)\")" \
- "--eval=(setq matlab-shell-command-switches '(\"-nodesktop\"
\"-nosplash\" \"-noFigureWindows\"))"
+ # Provide MATLAB_EXE for ./test/Makefile
+ export MATLAB_EXE
endif
.PHONY: tests
diff --git a/tests/Makefile b/tests/Makefile
index 39571ed08f..65f8fda20d 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -38,7 +38,12 @@ else
# OS is defined on Windows (e.g. OS=Windows_NT) and there's no MATLAB
shell tests on windows.
ifndef OS
- TEST_TARGETS += shelltests
+ # ../Makefile will set MATLAB_EXE to none if there is no MATLAB
+ ifeq ($(MATLAB_EXE),none)
+ $(warning warning: matlab not available, skipping M-x matlab-shell
tests)
+ else
+ TEST_TARGETS += shelltests
+ endif
endif
endif
@@ -64,4 +69,4 @@ endif
# [eof] tests/Makefile
-# LocalWords: EMACSFLAGS setq ifneq modetests shelltests metest mstest eof
+# LocalWords: EMACSFLAGS setq ifneq modetests shelltests metest mstest eof
utils treesit ifeq env