summaryrefslogtreecommitdiff
path: root/rules.ninja
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-11-17 14:48:05 -0800
committerMichael Forney <mforney@mforney.org>2019-11-17 15:24:25 -0800
commitf4720910b9b72bd1fe2aaa82cf6a38e226d5e149 (patch)
tree773f1c9ea2fa5375243a4cb065c8345f0730a5cf /rules.ninja
parent564557663b9c36612df603e36e4c7a679e82c51b (diff)
Update ninja requirement to 1.8.0 and don't bother with atomic outputs
Since ninja 1.8.0[0] and samurai 0.2[1], output mtime is always recorded after a job succeeds, and outputs are considered dirty if the recorded mtime is older than any input. This means that even if a command partially writes its output then fails (for example, if run with stdout redirected to a file), it will still get re-run during the next build. This means that outputs no longer have to be written atomically (i.e. renamed into place) in order to ensure a correct build, and we can drop the idiom `command >$out.tmp && mv $out.tmp $out`. [0] https://github.com/ninja-build/ninja/commit/04d886b11041bb59d01df794cce7a1e8cad2250d [1] https://github.com/michaelforney/samurai/commit/799bc5a4719b90a1026c129b55b92c0bccf97eeb
Diffstat (limited to 'rules.ninja')
-rw-r--r--rules.ninja20
1 files changed, 10 insertions, 10 deletions
diff --git a/rules.ninja b/rules.ninja
index f9a42064..a6fa42c5 100644
--- a/rules.ninja
+++ b/rules.ninja
@@ -47,10 +47,10 @@ rule muse
command = muse $museflags -o $out $in
rule probe
- command = sh ./scripts/probe.sh $var $cc $cflags $ldflags -o /dev/null -x c $in >$out.tmp && mv $out.tmp $out
+ command = sh ./scripts/probe.sh $var $cc $cflags $ldflags -o /dev/null -x c $in >$out
rule probesize
- command = sh ./scripts/probe-size.sh $var $cc $cflags -c -o /dev/null -x c $in >$out.tmp && mv $out.tmp $out
+ command = sh ./scripts/probe-size.sh $var $cc $cflags -c -o /dev/null -x c $in >$out
# misc tools
rule touch
@@ -63,34 +63,34 @@ rule copy
command = ln -f $in $out
rule cat
- command = cat $in >$out.tmp && mv $out.tmp $out
+ command = cat $in >$out
rule mergeperms
- command = sort -k 2 -m $in >$out.tmp && mv $out.tmp $out
+ command = sort -k 2 -m $in >$out
rule gzip
- command = gzip -c -9 -n <$in >$out.tmp && mv $out.tmp $out
+ command = gzip -c -9 -n <$in >$out
rule yacc
command = yacc $yaccflags $in
rule sed
- command = sed $expr $in >$out.tmp && mv $out.tmp $out
+ command = sed $expr $in >$out
rule awk
- command = awk $expr $in >$out.tmp && mv $out.tmp $out
+ command = awk $expr $in >$out
rule grep
- command = grep $expr $in >$out.tmp && mv $out.tmp $out
+ command = grep $expr $in >$out
rule tic
command = tic $ticflags $in
rule waylandproto
- command = wayland-scanner $type <$in >$out.tmp && mv $out.tmp $out
+ command = wayland-scanner $type <$in >$out
rule githash
- command = sh ./scripts/hash.sh $repo $args $in >$out.tmp && mv $out.tmp $out
+ command = sh ./scripts/hash.sh $repo $args $in >$out
rule gittree
command = sh ./scripts/tree.sh $repo $repo_tag $in $out