=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/main.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -r1.83 -r1.84 --- src/usr.bin/make/main.c 2007/09/17 12:42:09 1.83 +++ src/usr.bin/make/main.c 2007/09/18 07:45:25 1.84 @@ -1,5 +1,5 @@ /* $OpenPackages$ */ -/* $OpenBSD: main.c,v 1.83 2007/09/17 12:42:09 espie Exp $ */ +/* $OpenBSD: main.c,v 1.84 2007/09/18 07:45:25 espie Exp $ */ /* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */ /* @@ -75,6 +75,10 @@ # endif #endif +#ifndef DEFMAXLOCAL +#define DEFMAXLOCAL DEFMAXJOBS +#endif /* DEFMAXLOCAL */ + #define MAKEFLAGS ".MAKEFLAGS" static LIST to_create; /* Targets to be made */ @@ -85,6 +89,7 @@ static LIST makefiles; /* ordered list of makefiles to read */ static LIST varstoprint; /* list of variables to print */ int maxJobs; /* -j argument */ +static int maxLocal; /* -L argument */ bool compatMake; /* -B argument */ int debug; /* -d flag */ bool noExecute; /* -n flag */ @@ -295,6 +300,7 @@ optarg); usage(); } + maxLocal = maxJobs; record_option(c, optarg); break; } @@ -670,7 +676,8 @@ touchFlag = false; /* Actually update targets */ debug = 0; /* No debug verbosity, please. */ - maxJobs = DEFMAXJOBS; /* Set default local max concurrency */ + maxLocal = DEFMAXLOCAL; /* Set default local max concurrency */ + maxJobs = maxLocal; compatMake = false; /* No compat mode */ @@ -780,7 +787,9 @@ * (to prevent the .BEGIN from being executed should * it exist). */ if (!queryFlag) { - Job_Init(maxJobs); + if (maxLocal == -1) + maxLocal = maxJobs; + Job_Init(maxJobs, maxLocal); } /* Traverse the graph, checking on all the targets. */