From 4674dc47eb2066a617c022947485e33a302d6e71 Mon Sep 17 00:00:00 2001 From: Loutjie Coetzee Date: Thu, 15 Oct 2026 16:26:48 +0200 Subject: [PATCH] Fail the build when the mod solution fails to compile `find -exec ... \;` always exits 0, so `make` reported success when the mod's C# did not compile. `-exec ... {} +` returns the command's exit status (and passes the solution explicitly instead of relying on the working directory). Co-Authored-By: Claude Opus 5.5 --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9452a9798..201a89f77 100644 --- a/Makefile +++ b/Makefile @@ -147,18 +147,18 @@ all: engine ifeq ($(RUNTIME), mono) @command -v $(MSBUILD) >/dev/null || (echo "OpenRA requires the '$(MSBUILD)' tool provided by Mono >= 6.12."; exit 1) ifneq ("$(MOD_SOLUTION_FILES)","") - @find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:Build -restore -p:Configuration=${CONFIGURATION} -p:TargetPlatform=$(TARGETPLATFORM) -p:Mono=true \; + @find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:Build -restore -p:Configuration=${CONFIGURATION} -p:TargetPlatform=$(TARGETPLATFORM) -p:Mono=true {} + endif else - @find . -maxdepth 1 -name '*.sln' -exec $(DOTNET) build -c ${CONFIGURATION} -p:TargetPlatform=$(TARGETPLATFORM) \; + @find . -maxdepth 1 -name '*.sln' -exec $(DOTNET) build -c ${CONFIGURATION} -p:TargetPlatform=$(TARGETPLATFORM) {} + endif clean: engine ifneq ("$(MOD_SOLUTION_FILES)","") ifeq ($(RUNTIME), mono) - @find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:clean \; + @find . -maxdepth 1 -name '*.sln' -exec $(MSBUILD) -t:clean {} + else - @find . -maxdepth 1 -name '*.sln' -exec $(DOTNET) clean \; + @find . -maxdepth 1 -name '*.sln' -exec $(DOTNET) clean {} + endif endif @cd $(ENGINE_DIRECTORY) && make clean