Article View: gnu.utils.bug
Article #485GNU Make 3.56: Fix for MFLAGS/MAKEFLAGS with -j#
From: Chip Salzenberg
Date: Wed, 11 Oct 1989 15:55
Date: Wed, 11 Oct 1989 15:55
63 lines
1706 bytes
1706 bytes
[BUG FIX]
Fix creation of MFLAGS/MAKEFLAGS when job_slots > 1. The old code wrote
"-j#" in the string array, then advanced the pointer too far. The result
was that "-j#" was the last option propagated to child makes.
Index: main.c
***************
*** 1108,1115 ****
i = 0;
- flags[i++] = '-';
for (cs = switches; cs->c != '\0'; ++cs)
! if (cs->toenv)
switch (cs->type)
{
--- 1129,1139 ----
i = 0;
for (cs = switches; cs->c != '\0'; ++cs)
! {
! if (! cs->toenv)
! continue;
! if (i == 0 || flags[i - 1] == ' ')
! flags[i++] = '-';
switch (cs->type)
{
***************
*** 1142,1153 ****
{
strcpy (&flags[i], "j1 ");
! i += 5;
}
else
{
! char *p = &flags[i];
! sprintf (p, "%c%u ", cs->c,
*(unsigned int *) cs->value_ptr);
! i += strlen (p);
}
}
--- 1166,1176 ----
{
strcpy (&flags[i], "j1 ");
! i += strlen (&flags[i]);
}
else
{
! sprintf (&flags[i], "%c%u ", cs->c,
*(unsigned int *) cs->value_ptr);
! i += strlen (&flags[i]);
}
}
***************
*** 1174,1177 ****
--- 1197,1201 ----
break;
}
+ }
if (i == 0)
Technical Details
Message-ID:
<m0gElIy-0002eWC@ateng.ateng.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!ateng.ateng.com!chipShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!ateng.ateng.com!chip From: chip@ateng.ateng.com (Chip Salzenberg) Newsgroups: gnu.utils.bug Subject: GNU Make 3.56: Fix for MFLAGS/MAKEFLAGS with -j# Message-ID: <m0gElIy-0002eWC@ateng.ateng.com> Date: 11 Oct 89 15:55:47 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 63