Skip to content

Commit e07904f

Browse files
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>
1 parent 08909c9 commit e07904f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,14 @@ tests: mbedtls_test
4949
mbedtls_test:
5050
$(MAKE) -C tests mbedtls_test
5151

52-
library/%:
52+
.PHONY: FORCE
53+
FORCE:
54+
55+
library/%: FORCE
5356
$(MAKE) -C library $*
54-
programs/%:
57+
programs/%: FORCE
5558
$(MAKE) -C programs $*
56-
tests/%:
59+
tests/%: FORCE
5760
$(MAKE) -C tests $*
5861

5962
.PHONY: generated_files

0 commit comments

Comments
 (0)