chiark / gitweb /
Makefiles: Better workaround for make bug (Debian #4073)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 1 Jan 2020 13:48:14 +0000 (13:48 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 2 Jan 2020 00:42:03 +0000 (00:42 +0000)
commit8bcca247b7c167eea3bbf207d99c9d2b7b27f617
tree98123caeb966186c085607460de6bcf849d19330
parentc0009253fdc29c24770b1e24d4917e00fbfad476
Makefiles: Better workaround for make bug (Debian #4073)

make likes to delete intermediate files.  The result can be that it
rebuilds things needlessly.  In this case, eax-aes-test.o,
eax-aes.trun etc.  We worked around this by marking them .PRECIOUS
with a pattern rule this is not ideal as it stops make deleting
half-built broken files in case of error.

A better workaround is to mention the files explicitly by name (ie,
not with a pattern).  This stops that effect and doesn't have side
effects.

For us it (empirically) doesn't actually matter whether it's the .o or
the .trun that we mark intermediate.

We can conveniently extend this to all test binaries.  This will be
relevant as we are going to introduce more of these that are partly
builtt from auto-generated or auto-massaged inputs.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Dir.sd.mk