From: Lady Date: Sat, 22 Jun 2024 20:06:53 +0000 (-0400) Subject: “Simplify” the restart mechanism using $? X-Git-Tag: 0.11.1~1 X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/bc83928663f56508f210ce19a607aa9a52f32983?ds=inline;hp=bc83928663f56508f210ce19a607aa9a52f32983 “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`. ---