Skip to content

Commit 6fc9c69

Browse files
authored
[build] Fix $(RUNTIME) initialization
Commit c7447ed is broken. `$(RUNTIME)` needs to contain a managed runtime that can be used to execute unit tests and other build utilities: RUNTIME := $(shell if [ -f `which mono64` ] ; then echo mono64 ; else echo mono; fi) Unfortunately on some machines this doesn't evaluate as intended: if `mono64` isn't in `$PATH` then it is equivalent to: if [ -f ] ; then echo mono64 else echo mono fi `if [ -f ]` is always true (!), so `mono64` is used even when it doesn't exist (the whole point for the check in the first place!). Quote the value of `which mono64` so that even if **which**(1) returns the empty string it still behaves properly: RUNTIME := $(shell if [ -f "`which mono64`" ] ; then echo mono64 ; else echo mono; fi) This quoting ensures that `-f` *always* has a value *other than `]`*, which allows `$(RUNTIME)` to have the correct value.
1 parent 16c87fa commit 6fc9c69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ifeq ($(OS),Linux)
99
NATIVE_EXT = .so
1010
endif
1111

12-
RUNTIME := $(shell if [ -f `which mono64` ] ; then echo mono64 ; else echo mono; fi) --debug=casts
12+
RUNTIME := $(shell if [ -f "`which mono64`" ] ; then echo mono64 ; else echo mono; fi) --debug=casts
1313

1414
XA_CONFIGURATION = XAIntegrationDebug
1515

0 commit comments

Comments
 (0)