]> Lady’s Gitweb - Shushe/commit
“Simplify” the restart mechanism using $?
authorLady <redacted>
Sat, 22 Jun 2024 20:06:53 +0000 (16:06 -0400)
committerLady <redacted>
Thu, 11 Jul 2024 01:46:30 +0000 (21:46 -0400)
commitbc83928663f56508f210ce19a607aa9a52f32983
tree803baf6c614ed5c4d89ce1f5bfd94fc87641d5f6
parentbe24d75be02ad626c13c0b52cdc30e2ef8735c9f
“Simplify” the restart mechanism using $?

Instead of having two GNUmakefile rules which are present under
different conditions (and which could hypothetically both apply), just
have one and check to see which prerequisites are out·of·date in order
to adjust the behaviour.

In order to prevent unnecessary builds of metadata and parsed files
prior to a type update, wrap the recipes in a check to see if
`$(BUILDDIR)/.update-types` was created over the course of the build.
This needs to happen in the shell, not in Make, because older versions
of Make cache the `$(wildcard)` function. The implementation of
`$(unlesstypeswillupdate)` uses an `if` function instead of a `and`
because the latter seems to trim white·space.

It is no longer an error if the type of a file cannot be determined;
this is required to enable recipe expansion when types are not yet
generated now that the test is happening in the shell. Instead, files
are given a default type of `application/octet-stream`.
GNUmakefile
This page took 0.04446 seconds and 4 git commands to generate.