From 1701c340ebef2aa23b3194f34904f945610c29fd Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 21 Nov 2024 22:06:39 +0100 Subject: [PATCH] Fix `make dir/file` not rebuilding existing files Running `make library/foo`, `make programs/foo` or `make tests/foo` only rebuilt the given target if it was not an existing file, because the toplevel makefile does not know the file's dependencies and thus thought that every such target had empty dependencies. Fix this by always invoking make recursively. Signed-off-by: Gilles Peskine --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c9f575082d..a580736602 100644 --- a/Makefile +++ b/Makefile @@ -49,11 +49,14 @@ tests: mbedtls_test mbedtls_test: $(MAKE) -C tests mbedtls_test -library/%: +.PHONY: FORCE +FORCE: + +library/%: FORCE $(MAKE) -C library $* -programs/%: +programs/%: FORCE $(MAKE) -C programs $* -tests/%: +tests/%: FORCE $(MAKE) -C tests $* .PHONY: generated_files