You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
2.6 KiB
79 lines
2.6 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../make/make-3.82-0010-intermediate-parallel.patch |
|
# Copyright (C) 2012 The OpenSDE Project |
|
# |
|
# More information can be found in the files COPYING and README. |
|
# |
|
# This patch file is dual-licensed. It is available under the license the |
|
# patched project is licensed under, as long as it is an OpenSource license |
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms |
|
# of the GNU General Public License as published by the Free Software |
|
# Foundation; either version 2 of the License, or (at your option) any later |
|
# version. |
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
From b1260285aca75246e8028d1b5221304540bd59c7 Mon Sep 17 00:00:00 2001 |
|
From: Christian Wiese <chris@opensde.org> |
|
Date: Mon, 22 Oct 2012 18:15:13 +0200 |
|
Subject: [PATCH] intermediate parallel |
|
|
|
ChangeLog: |
|
|
|
2012-09-09 Paul Smith <psmith@gnu.org> |
|
|
|
* remake.c (update_file_1): Force intermediate files to be |
|
considered, not pruned, if their non-intermediate parent needs to |
|
be remade. Fixes Savannah bug #30653. |
|
--- |
|
remake.c | 4 ++++ |
|
tests/scripts/features/parallelism | 17 +++++++++++++++++ |
|
2 files changed, 21 insertions(+), 0 deletions(-) |
|
|
|
diff --git a/remake.c b/remake.c |
|
index 27d2550..a8d7cdf 100644 |
|
--- a/remake.c |
|
+++ b/remake.c |
|
@@ -614,6 +614,10 @@ update_file_1 (struct file *file, unsigned int depth) |
|
d->file->dontcare = file->dontcare; |
|
} |
|
|
|
+ /* We may have already considered this file, when we didn't know |
|
+ we'd need to update it. Force update_file() to consider it and |
|
+ not prune it. */ |
|
+ d->file->considered = !considered; |
|
|
|
dep_status |= update_file (d->file, depth); |
|
|
|
diff --git a/tests/scripts/features/parallelism b/tests/scripts/features/parallelism |
|
index 6122412..090827b 100644 |
|
--- a/tests/scripts/features/parallelism |
|
+++ b/tests/scripts/features/parallelism |
|
@@ -211,6 +211,23 @@ rm main.x"); |
|
rmfiles(qw(foo.y foo.y.in main.bar)); |
|
} |
|
|
|
+# Ensure intermediate/secondary files are not pruned incorrectly. |
|
+# See Savannah bug #30653 |
|
+ |
|
+utouch(-15, 'file2'); |
|
+utouch(-10, 'file4'); |
|
+utouch(-5, 'file1'); |
|
+ |
|
+run_make_test(q! |
|
+.INTERMEDIATE: file3 |
|
+file4: file3 ; @mv -f $< $@ |
|
+file3: file2 ; touch $@ |
|
+file2: file1 ; @touch $@ |
|
+!, |
|
+ '--no-print-directory -j2', "touch file3"); |
|
+ |
|
+#rmfiles('file1', 'file2', 'file3', 'file4'); |
|
+ |
|
if ($all_tests) { |
|
# Jobserver FD handling is messed up in some way. |
|
# Savannah bug #28189 |
|
-- |
|
1.7.2.3 |
|
|
|
|