=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/main.c,v retrieving revision 1.83 retrieving revision 1.84 diff -c -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 **** /* $OpenPackages$ */ ! /* $OpenBSD: main.c,v 1.83 2007/09/17 12:42:09 espie Exp $ */ /* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */ /* --- 1,5 ---- /* $OpenPackages$ */ ! /* $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,80 **** --- 75,84 ---- # endif #endif + #ifndef DEFMAXLOCAL + #define DEFMAXLOCAL DEFMAXJOBS + #endif /* DEFMAXLOCAL */ + #define MAKEFLAGS ".MAKEFLAGS" static LIST to_create; /* Targets to be made */ *************** *** 85,90 **** --- 89,95 ---- 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,300 **** --- 300,306 ---- optarg); usage(); } + maxLocal = maxJobs; record_option(c, optarg); break; } *************** *** 670,676 **** touchFlag = false; /* Actually update targets */ debug = 0; /* No debug verbosity, please. */ ! maxJobs = DEFMAXJOBS; /* Set default local max concurrency */ compatMake = false; /* No compat mode */ --- 676,683 ---- touchFlag = false; /* Actually update targets */ debug = 0; /* No debug verbosity, please. */ ! maxLocal = DEFMAXLOCAL; /* Set default local max concurrency */ ! maxJobs = maxLocal; compatMake = false; /* No compat mode */ *************** *** 780,786 **** * (to prevent the .BEGIN from being executed should * it exist). */ if (!queryFlag) { ! Job_Init(maxJobs); } /* Traverse the graph, checking on all the targets. */ --- 787,795 ---- * (to prevent the .BEGIN from being executed should * it exist). */ if (!queryFlag) { ! if (maxLocal == -1) ! maxLocal = maxJobs; ! Job_Init(maxJobs, maxLocal); } /* Traverse the graph, checking on all the targets. */