=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/main.c,v retrieving revision 1.124 retrieving revision 1.125 diff -c -r1.124 -r1.125 *** src/usr.bin/make/main.c 2020/01/08 14:09:29 1.124 --- src/usr.bin/make/main.c 2020/01/13 14:51:50 1.125 *************** *** 1,4 **** ! /* $OpenBSD: main.c,v 1.124 2020/01/08 14:09:29 espie Exp $ */ /* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: main.c,v 1.125 2020/01/13 14:51:50 espie Exp $ */ /* $NetBSD: main.c,v 1.34 1997/03/24 20:56:36 gwr Exp $ */ /* *************** *** 73,84 **** Lst create = &to_create; bool allPrecious; /* .PRECIOUS given on line by itself */ ! static bool noBuiltins; /* -r flag */ ! static LIST makefiles; /* ordered list of makefiles to read */ ! static LIST varstoprint; /* list of variables to print */ ! int maxJobs; /* -j argument */ ! bool compatMake; /* -B argument */ ! static bool forceJobs = false; int debug; /* -d flag */ bool noExecute; /* -n flag */ bool keepgoing; /* -k flag */ --- 73,84 ---- Lst create = &to_create; bool allPrecious; /* .PRECIOUS given on line by itself */ ! static bool noBuiltins; /* -r flag */ ! static LIST makefiles; /* ordered list of makefiles to read */ ! static LIST varstoprint; /* list of variables to print */ ! static int optj; /* -j argument */ ! static bool compatMake; /* -B argument */ ! static bool forceJobs = false; int debug; /* -d flag */ bool noExecute; /* -n flag */ bool keepgoing; /* -k flag */ *************** *** 126,131 **** --- 126,137 ---- Var_Append(MAKEFLAGS, arg); } + void + set_notparallel() + { + compatMake = true; + } + static void posixParseOptLetter(int c) { *************** *** 313,319 **** const char *errstr; forceJobs = true; ! maxJobs = strtonum(optarg, 1, INT_MAX, &errstr); if (errstr != NULL) { fprintf(stderr, "make: illegal argument to -j option" --- 319,325 ---- const char *errstr; forceJobs = true; ! optj = strtonum(optarg, 1, INT_MAX, &errstr); if (errstr != NULL) { fprintf(stderr, "make: illegal argument to -j option" *************** *** 676,682 **** touchFlag = false; /* Actually update targets */ debug = 0; /* No debug verbosity, please. */ ! maxJobs = DEFMAXJOBS; compatMake = false; /* No compat mode */ --- 682,688 ---- touchFlag = false; /* Actually update targets */ debug = 0; /* No debug verbosity, please. */ ! optj = DEFMAXJOBS; compatMake = false; /* No compat mode */ *************** *** 757,762 **** --- 763,771 ---- read_all_make_rules(noBuiltins, read_depend, &makefiles, &d); + if (compatMake) + optj = 1; + Var_Append("MFLAGS", Var_Value(MAKEFLAGS)); /* Install all the flags into the MAKEFLAGS env variable. */ *************** *** 796,802 **** else Targ_FindList(&targs, create); ! Job_Init(maxJobs); /* If the user has defined a .BEGIN target, execute the commands * attached to it. */ if (!queryFlag) --- 805,811 ---- else Targ_FindList(&targs, create); ! Job_Init(optj); /* If the user has defined a .BEGIN target, execute the commands * attached to it. */ if (!queryFlag)