From 3f83069e97a7c25dbd5e42f67382ef1cbfe30d81 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Thu, 22 Jan 2026 11:40:56 +0100 Subject: [PATCH] Implement support for parallel make The trick that I didn't know in commit 7738e9c707 is to use explicit rules, with a double-colon. With no prerequisites, their recipe is always executed even if the target already exists. --- Makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 1cb46a8..1ec64d1 100644 --- a/Makefile +++ b/Makefile @@ -15,13 +15,16 @@ WRITE_C := $(sort $(shell find . -name write.C)) READ_C := $(sort $(shell find . -name read.C)) .PHONY: dict -dict: - @$(foreach d,$(DICT_MAKEFILE_DIR),make -C $(d) &&) true +dict:: $(DICT_MAKEFILE_DIR) +$(DICT_MAKEFILE_DIR):: + @$(MAKE) -C $@ .PHONY: write -write: - @$(foreach c,$(WRITE_C),LD_LIBRARY_PATH=$(shell dirname $(c)) $(ROOT_EXE) -q -l $(c) &&) true +write:: $(WRITE_C) +$(WRITE_C):: + @LD_LIBRARY_PATH=$(shell dirname $@) $(ROOT_EXE) -q -l $@ .PHONY: read -read: - @$(foreach c,$(READ_C),LD_LIBRARY_PATH=$(shell dirname $(c)) $(ROOT_EXE) -q -l $(c) &&) true +read:: $(READ_C) +$(READ_C):: + @LD_LIBRARY_PATH=$(shell dirname $@) $(ROOT_EXE) -q -l $@