From 6ca8b66a77ebc6d82a01576b93fb94654608bdcf Mon Sep 17 00:00:00 2001 From: Felix Walter Date: Tue, 21 Apr 2026 10:48:21 +0200 Subject: [PATCH] Makefile: Drop recursive invocation We were running into issues when two targets are specified in combination with multi-core builds (`-jX`), which led to race conditions sometimes attempting to build the same file more than once at the same time. As we are only supporting POSIX builds now, the PLATFORM condition is not necessary anymore. When introducing another platform in the future, we should just pass the platform as variable to `make` to prevent us from needing to invoke `make` recursively. Signed-off-by: Felix Walter --- Makefile | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/Makefile b/Makefile index 68ff5c1..a5b13b9 100644 --- a/Makefile +++ b/Makefile @@ -210,33 +210,7 @@ endif .PHONY: posix posix-lib posix-all data-decoder aap2sendfile aap2recvfile unittest-posix ccmds-posix -ifndef PLATFORM - -posix: - @$(MAKE) PLATFORM=posix posix - -posix-lib: - @$(MAKE) PLATFORM=posix posix-lib - -posix-all: - @$(MAKE) PLATFORM=posix posix posix-lib - -data-decoder: - @$(MAKE) PLATFORM=posix data-decoder - -aap2recvfile: - @$(MAKE) PLATFORM=posix aap2recvfile - -aap2sendfile: - @$(MAKE) PLATFORM=posix aap2sendfile - -unittest-posix: - @$(MAKE) PLATFORM=posix unittest-posix - -ccmds-posix: - @$(MAKE) PLATFORM=posix build/posix/compile_commands.json - -else # ifndef PLATFORM +PLATFORM ?= posix include mk/$(PLATFORM).mk include mk/build.mk @@ -249,5 +223,3 @@ aap2sendfile: build/posix/aap2sendfile aap2recvfile: build/posix/aap2recvfile unittest-posix: build/posix/testud3tn ccmds-posix: build/posix/compile_commands.json - -endif # ifndef PLATFORM