command -v with more than one argument is non-portable
On FreeBSD build fails, so check if `msbuild` exists without arguments. $ gmake command: wrong number of arguments OpenRA requires the 'msbuild -verbosity:m -nologo' tool provided by Mono >= 5.4. gmake: *** [Makefile:154: core] Error 1 # FreeBSD sh $ command -v echo ls command: wrong number of arguments # dash $ command -v echo ls echo # ksh, bash, zsh $ command -v echo ls echo /bin/ls
This commit is contained in:
2
Makefile
2
Makefile
@@ -151,7 +151,7 @@ test: core
|
||||
all: dependencies core
|
||||
|
||||
core:
|
||||
@command -v $(MSBUILD) >/dev/null || (echo "OpenRA requires the '$(MSBUILD)' tool provided by Mono >= 5.4."; exit 1)
|
||||
@command -v $(firstword $(MSBUILD)) >/dev/null || (echo "OpenRA requires the '$(MSBUILD)' tool provided by Mono >= 5.4."; exit 1)
|
||||
ifeq ($(WIN32), $(filter $(WIN32),true yes y on 1))
|
||||
@$(MSBUILD) -t:build -p:Configuration="Release-x86"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user