Incorporate Icarus Sparry's fix for 3330 and 15919, and test cases.
authorPaul Smith <psmith@gnu.org>
Wed, 15 Aug 2007 13:53:53 +0000 (13:53 +0000)
committerPaul Smith <psmith@gnu.org>
Wed, 15 Aug 2007 13:53:53 +0000 (13:53 +0000)
One of our translations disappeared from the translations site so remove it.

The fdl.texi file was changed to not contain any @node entries, so add some
around it in make.texi.

ChangeLog
doc/make.texi
po/ChangeLog
po/LINGUAS
remake.c
tests/ChangeLog
tests/scripts/features/parallelism
tests/scripts/targets/SECONDARY

index 9c9ed3a..fa6847d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2007-08-15  Paul Smith  <psmith@gnu.org>
+
+       * doc/make.texi (GNU Free Documentation License): The fdl.texi
+       file has had the section info removed, so add some to make.texi
+       before we include it.
+
+2007-08-15  Icarus Sparry  <savannah@icarus.freeuk.com>
+
+       * remake.c (check_dep): Reset the target state for intermediate
+       files.  They might have been considered before but not updated
+       then (order-only for example) but they will be this time.
+       Fixes Savannah bug #'s 3330 and 15919.
+
 2007-07-13  Paul Smith  <psmith@gnu.org>
 
        * file.c (expand_deps): Use variable_buffer as the start of the
index d6cfc3c..c30e794 100644 (file)
@@ -11117,9 +11117,10 @@ tar.zoo: $(SRCS) $(AUX)
 @end group
 @end example
 
-@raisesections
+@node GNU Free Documentation License, Concept Index, Complex Makefile, Top
+@appendixsec GNU Free Documentation License
+@cindex FDL, GNU Free Documentation License
 @include fdl.texi
-@lowersections
 
 @node Concept Index, Name Index, GNU Free Documentation License, Top
 @unnumbered Index of Concepts
index cf7defe..46a61cf 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-15  Paul Smith  <psmith@gnu.org>
+
+       * LINGUAS: The Kinyarwanda (rw) translation has disappeared from
+       the translation site, so remove it.
+
 2006-01-28  Paul D. Smith  <psmith@gnu.org>
 
        * LINGUAS: Added new translation for Vietnamese (vi).
index 3f0c531..1fff63a 100644 (file)
@@ -1,5 +1,5 @@
-# Set of available languages: 23 languages
+# Set of available languages: 22 languages
 
-be da de es fi fr ga gl he hr id ja ko nl pl pt_BR ru rw sv tr uk vi zh_CN
+be da de es fi fr ga gl he hr id ja ko nl pl pt_BR ru sv tr uk vi zh_CN
 
 # Can't seem to get en@quot and en@boldquot to build properly?
index 6168d29..d1cf702 100644 (file)
--- a/remake.c
+++ b/remake.c
@@ -982,6 +982,12 @@ check_dep (struct file *file, unsigned int depth,
              necessary, and see whether any of them is more recent than the
              file on whose behalf we are checking.  */
          struct dep *lastd;
+          int deps_running = 0;
+
+          /* Reset this target's state so that we check it fresh.  It could be
+             that it's already been checked as part of an order-only
+             prerequisite and so wasn't rebuilt then, but should be now.  */
+          set_command_state (file, cs_not_started);
 
          lastd = 0;
          d = file->deps;
@@ -1020,14 +1026,17 @@ check_dep (struct file *file, unsigned int depth,
 
              if (d->file->command_state == cs_running
                  || d->file->command_state == cs_deps_running)
-               /* Record that some of FILE's deps are still being made.
-                  This tells the upper levels to wait on processing it until
-                  the commands are finished.  */
-               set_command_state (file, cs_deps_running);
+               deps_running = 1;
 
              lastd = d;
              d = d->next;
            }
+
+          if (deps_running)
+            /* Record that some of FILE's deps are still being made.
+               This tells the upper levels to wait on processing it until the
+               commands are finished.  */
+            set_command_state (file, cs_deps_running);
        }
     }
 
index 6e53dc7..9a515a3 100644 (file)
@@ -1,3 +1,16 @@
+2007-08-15  Paul Smith  <psmith@gnu.org>
+
+       These test cases were contributed by
+       Icarus Sparry <savannah@icarus.freeuk.com> and J. David Bryan for
+       Savannah bugs #3330 and #15919.
+
+       * scripts/targets/SECONDARY: Add tests for Savannah bugs 3330 and
+       15919.
+
+       * scripts/features/parallelism: Add tests for wrong answer/hang
+       combining INTERMEDIATE, order-only prereqs, and parallelism.
+       See Savannah bugs 3330 and 15919.
+
 2007-07-13  Paul Smith  <psmith@gnu.org>
 
        Install a timeout so tests can never loop infinitely.
index 432c088..11102f2 100644 (file)
@@ -127,6 +127,20 @@ mod_a.o mod_b.o:
 ', '-j2', '');
 
 
+# TEST #9 -- Savannah bugs 3330 and 15919
+# In earlier versions of make this will either give the wrong answer, or hang.
+
+utouch(-10, 'target');
+run_make_test('target: intermed ; touch $@
+
+.INTERMEDIATE: intermed
+intermed: | phony ; touch $@
+
+.PHONY: phony
+phony: ; : phony', '-rR -j', ': phony');
+unlink('target');
+
+
 # Make sure that all jobserver FDs are closed if we need to re-exec the
 # master copy.
 #
index cf580b5..c954ee9 100644 (file)
@@ -121,5 +121,69 @@ all: version2',
 
 unlink('version2');
 
+# TEST #9 -- Savannah bug #15919
+# The original fix for this bug caused a new bug, shown here.
+
+touch(qw(1.a 2.a));
+
+run_make_test('
+%.c : %.b ; cp $< $@
+%.b : %.a ; cp $< $@
+all : 1.c 2.c', '-rR -j',
+'cp 1.a 1.b
+cp 2.a 2.b
+cp 1.b 1.c
+cp 2.b 2.c
+rm 1.b 2.b');
+
+unlink(qw(1.a 2.a 1.c 2.c));
+
+# TEST #10 -- Savannah bug #15919
+touch('test.0');
+run_make_test('
+.SECONDARY : test.1 test.2 test.3
+
+test : test.4
+
+%.4 : %.int %.3 ; touch $@
+
+%.int : %.3 %.2 ; touch $@
+
+%.3 : | %.2 ; touch $@
+
+%.2 : %.1 ; touch $@
+
+%.1 : %.0 ; touch $@', '-rR -j 2',
+'touch test.1
+touch test.2
+touch test.3
+touch test.int
+touch test.4
+rm test.int');
+
+# After a touch of test.0 it should give the same output, except we don't need
+# to rebuild test.3 (order-only)
+sleep(1);
+touch('test.0');
+run_make_test(undef, '-rR -j 2',
+'touch test.1
+touch test.2
+touch test.int
+touch test.4
+rm test.int');
+
+# With both test.0 and test.3 updated it should still build everything except
+# test.3
+sleep(1);
+touch('test.0', 'test.3');
+run_make_test(undef, '-rR -j 2',
+'touch test.1
+touch test.2
+touch test.int
+touch test.4
+rm test.int');
+
+unlink(qw(test.0 test.1 test.2 test.3 test.4));
+
 # This tells the test driver that the perl test script executed properly.
 1;