From 71c01ceb377b13a36bd578f14019679375a6aecc Mon Sep 17 00:00:00 2001 From: Delilah Hoare Date: Sun, 18 Dec 2022 18:01:55 +1100 Subject: [PATCH 1/2] Add failing test case for transitive updates --- testcase/transitive_updates.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 testcase/transitive_updates.sh diff --git a/testcase/transitive_updates.sh b/testcase/transitive_updates.sh new file mode 100755 index 00000000..4c9b1af4 --- /dev/null +++ b/testcase/transitive_updates.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Copyright 2022 Google Inc. All rights reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http:#www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e + +mk="$@" + +cat < Makefile +a: b + echo a > a +b: c + echo b > b +c: + echo c > c +EOF + +${mk} +sleep 0.1 +touch c +${mk} From 95cf5e1f80e5178feaef1d6cf332ea7bdc33c755 Mon Sep 17 00:00:00 2001 From: Delilah Hoare Date: Sun, 18 Dec 2022 18:02:16 +1100 Subject: [PATCH 2/2] Fix transitive updates --- src/exec.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/exec.cc b/src/exec.cc index 000caa2c..b9016ad0 100644 --- a/src/exec.cc +++ b/src/exec.cc @@ -122,6 +122,7 @@ class Executor { } } + output_ts = GetTimestamp(n.output.c_str()); done_[n.output] = output_ts; return output_ts; }