4 ms·
Conceptually I sometimes feel that install and clean targets should have prerequisites. The problem for clean is that make's only condition for evaluating a rul
by orbisvicis 2y ago
Conceptually I sometimes feel that install and clean targets should have prerequisites. The problem for clean is that make's only condition for evaluating a rule is "a prerequisite has a newer modification time" and not "the prerequisite exists". As for install, because each rule can only have a single target, the installation of each individual file would have to be a separate rule. As install destinations are usually subject to side effects (excluding nix or guix), there is usually a need to force an installation even if the prerequisites haven't been updated. And installations often require additional postprocessing that can't be captured by individual rules. So to reconsider, perhaps it makes little sense to for the install rule to have prerequisites. And forcing make to check the clean rules prerequisites might actually hamper performance, as opposed to a direct `rm`.