From 78b850f835865d8b7e6b9f6a53fe102f0b7f7dc8 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Mar 2024 14:48:32 -0700 Subject: [PATCH] a bit more tidying --- CHANGELOG.md | 3 +++ Makefile | 6 +++--- src/tools/pcommandbatch/pcommandbatch.c | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d272cfe0..cf64b496 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,9 @@ - Sphinx based Python documentation generation is now wired up (Thanks Loup-Garou911XD!) - Renaming & overwriting existing profiles is no longer possible (Thanks Temp!) +- Cleaned up builds when running under WSL. Things like `make mypy` should now + work correctly there, and it should now be possible to build and run either + Linux or Windows builds there. ### 1.7.32 (build 21741, api 8, 2023-12-20) - Fixed a screen message that no one will ever see (Thanks vishal332008?...) diff --git a/Makefile b/Makefile index 14e9a150..70526b24 100644 --- a/Makefile +++ b/Makefile @@ -969,7 +969,7 @@ WINDOWS_CONFIGURATION ?= Debug # Stage assets and other files so a built binary will run. windows-staging: assets-windows resources meta - $(STAGE_BUILD) -win-$(WINPLT) -$(WINCFGLC) build/windows/$(WINCFG)_$(WINPLT) + @$(STAGE_BUILD) -win-$(WINPLT) -$(WINCFGLC) build/windows/$(WINCFG)_$(WINPLT) # Build and run a debug windows build (from WSL). windows-debug: windows-debug-build @@ -1150,8 +1150,8 @@ cmake-modular-server-clean: # Stage assets for building/running within CLion. clion-staging: assets-cmake resources meta - $(STAGE_BUILD) -cmake -debug build/clion_debug - $(STAGE_BUILD) -cmake -release build/clion_release + @$(STAGE_BUILD) -cmake -debug build/clion_debug + @$(STAGE_BUILD) -cmake -release build/clion_release # Tell make which of these targets don't represent files. .PHONY: cmake cmake-build cmake-clean cmake-server cmake-server-build \ diff --git a/src/tools/pcommandbatch/pcommandbatch.c b/src/tools/pcommandbatch/pcommandbatch.c index 6324f622..846a8d0d 100644 --- a/src/tools/pcommandbatch/pcommandbatch.c +++ b/src/tools/pcommandbatch/pcommandbatch.c @@ -166,6 +166,8 @@ int get_running_server_port_(const struct Context_* ctx, cJSON* state_dict = cJSON_Parse(buf); if (!state_dict) { // An un-parseable state file is not a recoverable error; go down hard. + // State files are written and then moved into place so we should never + // see something like a half-written file. fprintf(stderr, "Fatal Error: pcommandbatch client %s_%d (pid %d):" " failed to parse state file value of size %zu.\n",