Hi,

On Tue, Dec 13, 2005, Michael Biebl wrote:
> I tested the patch posted by Loic.
> Unfortunately it doesn't fix the cdbs build failures. I still get error
> messages like this:

 Indeed, I only prepared the patch, but couldn't actually test it as I
 explained, and now that I'm able to try it out, I confirm it doesn't
 fix the regression.

 However, I've built make from CVS[1], and it is truly fixed in CVS.

 Hence, I've searched for the exact version fixing the issue myself, but
 that wasn't obvious as the CVS fix is more than 125 days old, I wonder
 where the current snapshot comes from.

 The attached updated patch fixes make here.

 [1] to build make from CVS:
 % cvs -z3 -d:pserver:[EMAIL PROTECTED]:/sources/make co make
 % cd make
 % AUTOMAKE=automake-1.9 ACLOCAL=aclocal-1.9 autoreconf -s -i
 % ./configure
 % make update
 % make
-- 
Loïc Minier <[EMAIL PROTECTED]>
--- make-3.80+3.81.b3/debian/changelog
+++ make-3.80+3.81.b3/debian/changelog
@@ -1,3 +1,15 @@
+make (3.80+3.81.b3-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * read.c (record_files): Move code that sets stem for static pattern rules
+    out of the if (!two_colon) condition so it is also executed for two-colon
+    rules. (from upstream CVS, upstream bug Savannah #13881)
+    (Closes: #342879)
+  * tests/scripts/features/statipattrules: Add a test for #13881. (from
+    upstream CVS, upstream bug Savannah #13881)
+
+ -- Loic Minier <[EMAIL PROTECTED]>  Tue, 13 Dec 2005 17:56:09 +0100
+
 make (3.80+3.81.b3-1) unstable; urgency=low
 
   * New upstream pre-release.
--- make-3.80+3.81.b3.orig/read.c
+++ make-3.80+3.81.b3/read.c
@@ -2109,18 +2109,6 @@
               if (cmds != 0)
                 f->updating = 1;
            }
-
-         /* If this is a static pattern rule, set the file's stem to
-            the part of its name that matched the `%' in the pattern,
-            so you can use $* in the commands.  */
-         if (pattern != 0)
-           {
-             static char *percent = "%";
-             char *buffer = variable_expand ("");
-             char *o = patsubst_expand (buffer, name, pattern, percent,
-                                        pattern_percent+1, percent+1);
-             f->stem = savestring (buffer, o - buffer);
-           }
        }
       else
        {
@@ -2146,6 +2134,18 @@
          f->cmds = cmds;
        }
 
+      /* If this is a static pattern rule, set the file's stem to
+         the part of its name that matched the `%' in the pattern,
+         so you can use $* in the commands.  */
+      if (pattern != 0)
+        {
+          static char *percent = "%";
+          char *buffer = variable_expand ("");
+          char *o = patsubst_expand (buffer, name, pattern, percent,
+                                     pattern_percent+1, percent+1);
+          f->stem = savestring (buffer, o - buffer);
+        }
+
       /* Free name if not needed further.  */
       if (f != 0 && name != f->name
          && (name < f->name || name > f->name + strlen (f->name)))
--- make-3.80+3.81.b3.orig/tests/scripts/features/statipattrules
+++ make-3.80+3.81.b3/tests/scripts/features/statipattrules
@@ -73,4 +73,15 @@
 'foo.x
 ');
 
+
+# TEST #6 -- bug #13881: double colon static pattern rule does not
+#                        substitute %.
+#
+run_make_test('
+foo.bar:: %.bar: %.baz
+foo.baz: ;@:
+',
+'',
+'');
+
 1;

Reply via email to