Don't fail when there is no Visual Studio Solution File
using standard POSIX commands.
This commit is contained in:
parent
22d147391d
commit
353f781633
7
Makefile
7
Makefile
@ -36,6 +36,7 @@ WHITELISTED_MOD_ASSEMBLIES = "$(shell cat user.config mod.config 2> /dev/null |
|
|||||||
MANIFEST_PATH = "mods/$(MOD_ID)/mod.yaml"
|
MANIFEST_PATH = "mods/$(MOD_ID)/mod.yaml"
|
||||||
HAS_LUAC = $(shell command -v luac 2> /dev/null)
|
HAS_LUAC = $(shell command -v luac 2> /dev/null)
|
||||||
LUA_FILES = $(shell find mods/*/maps/* -iname '*.lua' 2> /dev/null)
|
LUA_FILES = $(shell find mods/*/maps/* -iname '*.lua' 2> /dev/null)
|
||||||
|
MOD_SOLUTION_FILES = $(shell find . -maxdepth 1 -iname '*.sln' 2> /dev/null)
|
||||||
|
|
||||||
MSBUILD = msbuild -verbosity:m -nologo
|
MSBUILD = msbuild -verbosity:m -nologo
|
||||||
|
|
||||||
@ -114,6 +115,7 @@ utility: engine-dependencies engine
|
|||||||
|
|
||||||
core:
|
core:
|
||||||
@command -v $(MSBUILD) >/dev/null || (echo "OpenRA requires the '$(MSBUILD)' tool provided by Mono >= 5.4."; exit 1)
|
@command -v $(MSBUILD) >/dev/null || (echo "OpenRA requires the '$(MSBUILD)' tool provided by Mono >= 5.4."; exit 1)
|
||||||
|
ifneq ("$(MOD_SOLUTION_FILES)","")
|
||||||
@find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:restore \;
|
@find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:restore \;
|
||||||
ifeq ($(WIN32), $(filter $(WIN32),true yes y on 1))
|
ifeq ($(WIN32), $(filter $(WIN32),true yes y on 1))
|
||||||
@find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:build -p:Configuration="Release-x86" \;
|
@find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:build -p:Configuration="Release-x86" \;
|
||||||
@ -121,12 +123,15 @@ else
|
|||||||
@$(MSBUILD) -t:build -p:Configuration=Release
|
@$(MSBUILD) -t:build -p:Configuration=Release
|
||||||
@find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:build -p:Configuration=Release \;
|
@find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:build -p:Configuration=Release \;
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
all: engine-dependencies engine core
|
all: engine-dependencies engine core
|
||||||
|
|
||||||
clean: engine
|
clean: engine
|
||||||
@command -v $(MSBUILD) >/dev/null || (echo "OpenRA requires the '$(MSBUILD)' tool provided by Mono >= 5.4."; exit 1)
|
@command -v $(MSBUILD) >/dev/null || (echo "OpenRA requires the '$(MSBUILD)' tool provided by Mono >= 5.4."; exit 1)
|
||||||
|
ifneq ("$(MOD_SOLUTION_FILES)","")
|
||||||
@find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:clean \;
|
@find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:clean \;
|
||||||
|
endif
|
||||||
@cd $(ENGINE_DIRECTORY) && make clean
|
@cd $(ENGINE_DIRECTORY) && make clean
|
||||||
@printf "The engine has been cleaned.\n"
|
@printf "The engine has been cleaned.\n"
|
||||||
|
|
||||||
@ -147,8 +152,10 @@ ifneq ("$(LUA_FILES)","")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
check: utility
|
check: utility
|
||||||
|
ifneq ("$(MOD_SOLUTION_FILES)","")
|
||||||
@echo "Compiling in debug mode..."
|
@echo "Compiling in debug mode..."
|
||||||
@$(MSBUILD) -t:build -p:Configuration=Debug
|
@$(MSBUILD) -t:build -p:Configuration=Debug
|
||||||
|
endif
|
||||||
@echo "Checking runtime assemblies..."
|
@echo "Checking runtime assemblies..."
|
||||||
@MOD_SEARCH_PATHS="$(MOD_SEARCH_PATHS)" mono --debug "$(ENGINE_DIRECTORY)/OpenRA.Utility.exe" $(MOD_ID) --check-runtime-assemblies $(WHITELISTED_OPENRA_ASSEMBLIES) $(WHITELISTED_THIRDPARTY_ASSEMBLIES) $(WHITELISTED_CORE_ASSEMBLIES) $(WHITELISTED_MOD_ASSEMBLIES)
|
@MOD_SEARCH_PATHS="$(MOD_SEARCH_PATHS)" mono --debug "$(ENGINE_DIRECTORY)/OpenRA.Utility.exe" $(MOD_ID) --check-runtime-assemblies $(WHITELISTED_OPENRA_ASSEMBLIES) $(WHITELISTED_THIRDPARTY_ASSEMBLIES) $(WHITELISTED_CORE_ASSEMBLIES) $(WHITELISTED_MOD_ASSEMBLIES)
|
||||||
@echo "Checking for explicit interface violations..."
|
@echo "Checking for explicit interface violations..."
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user