-https://savannah.gnu.org/bugs/?30612
-https://savannah.gnu.org/bugs/?30723
-https://savannah.gnu.org/bugs/?31743 (no longer visible)
+commit 2a59dc32aaf0681dec569f32a9d7ab88a379d34f
+Author: psmith <psmith>
+Date: Sat Aug 14 02:50:14 2010 +0000
---- main.c 2010-07-19 14:10:53.000000000 +0700
-+++ main.c 2011-01-12 21:31:30.114891591 +0700
-@@ -1,3 +1,4 @@
-+
- /* Argument parsing and main program of GNU Make.
- Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-@@ -1138,7 +1139,7 @@
+ - Fix the NEWS file to be accurate
+ - Add oneshell to $(.FEATURES) (forgot that!)
+ - Fix Savannah bug #30612: handling of archive references with >1 object
+
+diff --git a/main.c b/main.c
+index 9fe8090..782b0de 100644
+--- a/main.c
++++ b/main.c
+@@ -1138,7 +1138,7 @@ main (int argc, char **argv, char **envp)
a macro and some compilers (MSVC) don't like conditionals in macros. */
{
const char *features = "target-specific order-only second-expansion"
#ifndef NO_ARCHIVES
" archives"
#endif
-@@ -2093,7 +2094,7 @@
- const char *pv = define_makeflags (1, 1);
- char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1);
- sprintf (p, "MAKEFLAGS=%s", pv);
-- putenv (p);
-+ putenv (allocated_variable_expand (p));
- }
-
- if (ISDB (DB_BASIC))
---- read.c 2010-07-13 08:20:42.000000000 +0700
-+++ read.c 2011-01-12 21:31:23.497486028 +0700
-@@ -3028,7 +3028,7 @@
+diff --git a/read.c b/read.c
+index a3ad88e..9dfd4ea 100644
+--- a/read.c
++++ b/read.c
+@@ -3028,7 +3028,7 @@ parse_file_seq (char **stringp, unsigned int size, int stopchar,
{
/* This looks like the first element in an open archive group.
A valid group MUST have ')' as the last character. */
do
{
e = next_token (e);
-@@ -3084,19 +3084,19 @@
+@@ -3084,19 +3084,19 @@ parse_file_seq (char **stringp, unsigned int size, int stopchar,
Go to the next item in the string. */
if (flags & PARSEFS_NOGLOB)
{
if (tildep != 0)
name = tildep;
}
-@@ -3152,7 +3152,11 @@
+@@ -3152,7 +3152,10 @@ parse_file_seq (char **stringp, unsigned int size, int stopchar,
else
{
/* We got a chain of items. Attach them. */
+ (*newp)->next = found;
+ else
+ *newp = found;
-+
/* Find and set the new end. Massage names if necessary. */
while (1)
---- read.c 2010/11/06 21:56:24 1.195
-+++ read.c 2010/11/30 14:48:53 1.196
-@@ -1811,7 +1811,8 @@
- int len = strlen(v->name);
-
- gv = lookup_variable (v->name, len);
-- if (gv && (gv->origin == o_env_override || gv->origin == o_command))
-+ if (gv && v != gv
-+ && (gv->origin == o_env_override || gv->origin == o_command))
- {
- if (v->value != 0)
- free (v->value);
--- /dev/null
+commit d1ba0ee36b2bdd91434b5df90f0f4cceda7d6979
+Author: psmith <psmith>
+Date: Mon Sep 10 02:36:05 2012 +0000
+
+ Force intermediate targets to be considered if their non-intermediate
+ parent needs to be remade. Fixes Savannah bug #30653.
+
+diff --git a/remake.c b/remake.c
+index c0bf709..b1ddd23 100644
+--- a/remake.c
++++ b/remake.c
+@@ -612,6 +612,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);
+
--- /dev/null
+commit a6f280559f34dc805381507e59c9189b7149b853
+Author: psmith <psmith>
+Date: Tue Aug 10 07:35:34 2010 +0000
+
+ Fix Savannah bug #30723: expand MAKEFLAGS before we re-exec after
+ rebuilding makefiles.
+
+diff --git a/main.c b/main.c
+index c6989e3..9fe8090 100644
+--- a/main.c
++++ b/main.c
+@@ -2093,7 +2093,7 @@ main (int argc, char **argv, char **envp)
+ const char *pv = define_makeflags (1, 1);
+ char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1);
+ sprintf (p, "MAKEFLAGS=%s", pv);
+- putenv (p);
++ putenv (allocated_variable_expand (p));
+ }
+
+ if (ISDB (DB_BASIC))