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 <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2024-11-21 22:06:39 +01:00
parent 0d28fcb082
commit 1701c340eb

View File

@ -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