diff options
author | Paul Smith <psmith@gnu.org> | 2011-09-18 23:39:26 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2011-09-18 23:39:26 +0000 |
commit | d472624f3300fa454e8271fb7647971877de8d89 (patch) | |
tree | f7468e7568b6294f09fd7b187e0cb3fd602fac91 /main.c | |
parent | 0369a938254747fa2ab9ea09fe48b9c84ae7e19e (diff) | |
download | gunmake-d472624f3300fa454e8271fb7647971877de8d89.tar.gz |
When we re-exec the master makefile in a jobserver environment, ensure
that MAKEFLAGS is set properly so the re-exec'd make runs in parallel.
See Savannah bug #33873.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2089,6 +2089,11 @@ main (int argc, char **argv, char **envp) ++restarts; + /* If we're re-exec'ing the first make, put back the number of + job slots so define_makefiles() will get it right. */ + if (master_job_slots) + job_slots = master_job_slots; + /* Reset makeflags in case they were changed. */ { const char *pv = define_makeflags (1, 1); @@ -2825,9 +2830,6 @@ define_makeflags (int all, int makefile) && (*(unsigned int *) cs->value_ptr == *(unsigned int *) cs->noarg_value)) ADD_FLAG ("", 0); /* Optional value omitted; see below. */ - else if (cs->c == 'j') - /* Special case for `-j'. */ - ADD_FLAG ("1", 1); else { char *buf = alloca (30); |