From f4720910b9b72bd1fe2aaa82cf6a38e226d5e149 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sun, 17 Nov 2019 14:48:05 -0800 Subject: 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 --- pkg/git/gen.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/git/gen.lua') diff --git a/pkg/git/gen.lua b/pkg/git/gen.lua index e2175587..64d528f8 100644 --- a/pkg/git/gen.lua +++ b/pkg/git/gen.lua @@ -7,7 +7,7 @@ cflags{ '-I $builddir/pkg/zlib/include', } -rule('cmdlist', 'wd=$$PWD && cd $srcdir && ./generate-cmdlist.sh $$wd/$in >$$wd/$out.tmp && mv $$wd/$out.tmp $$wd/$out') +rule('cmdlist', 'wd=$$PWD && cd $srcdir && ./generate-cmdlist.sh $$wd/$in >$$wd/$out') build('cmdlist', '$outdir/command-list.h', { '$srcdir/command-list.txt', '|', expand{'$srcdir/Documentation/', lines('commands.txt')}, }) @@ -438,7 +438,7 @@ local scripts = { {'sh-i18n', '644'}, } -rule('sh_gen', 'sed -f $dir/sh_gen.sed $in >$out.tmp && mv $out.tmp $out') +rule('sh_gen', 'sed -f $dir/sh_gen.sed $in >$out') for _, script in ipairs(scripts) do local name, mode = table.unpack(script) build('sh_gen', '$outdir/git-'..name, {'$srcdir/git-'..name..'.sh', '|', '$dir/sh_gen.sed'}) -- cgit v1.2.3