]> 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>
Sat, 6 Jul 2024 22:53:38 +0000 (18:53 -0400)
commit129e0d1e2d7ce8c1cd945e501e56d1a386d57419
treed78369755c375a39422b225a8988d2c700d9ea51
parentb7dd609683b0ba405e981bd69ea2695f1fb99500
“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.065379 seconds and 4 git commands to generate.