Fix compilation when no sln files exist.

This commit is contained in:
Paul Chote 2017-07-09 10:28:45 +00:00
parent 5e23629108
commit 9e808b3d28
2 changed files with 16 additions and 6 deletions

View File

@ -49,19 +49,19 @@ utility: engine
build: engine
ifeq ("$(HAS_MSBUILD)","")
@xbuild /nologo /verbosity:quiet /p:TreatWarningsAsErrors=true
@find . -maxdepth 1 -name '*.sln' -exec xbuild /nologo /verbosity:quiet /p:TreatWarningsAsErrors=true \;
else
@msbuild /t:Rebuild /nr:false
@find . -maxdepth 1 -name '*.sln' -exec msbuild /t:Rebuild /nr:false \;
endif
@printf "The mod logic has been built.\n"
@find . -maxdepth 1 -name '*.sln' -exec printf "The mod logic has been built.\n" \;
clean: engine
ifeq ("$(HAS_MSBUILD)","")
@xbuild /nologo /verbosity:quiet /p:TreatWarningsAsErrors=true /t:Clean
@find . -maxdepth 1 -name '*.sln' -exec xbuild /nologo /verbosity:quiet /p:TreatWarningsAsErrors=true /t:Clean \;
else
@msbuild /t:Clean /nr:false
@find . -maxdepth 1 -name '*.sln' -exec msbuild /t:Clean /nr:false \;
endif
@printf "The mod logic has been cleaned.\n"
@find . -maxdepth 1 -name '*.sln' -exec printf "The mod logic has been cleaned.\n" \;
@cd $(ENGINE_DIRECTORY) && make clean
@printf "The engine has been cleaned.\n"

View File

@ -5,6 +5,11 @@
###############################################################
function All-Command
{
If (!(Test-Path "*.sln"))
{
return
}
$msBuild = FindMSBuild
$msBuildArguments = "/t:Rebuild /nr:false"
if ($msBuild -eq $null)
@ -27,6 +32,11 @@ function All-Command
function Clean-Command
{
If (!(Test-Path "*.sln"))
{
return
}
$msBuild = FindMSBuild
$msBuildArguments = "/t:Clean /nr:false"
if ($msBuild -eq $null)