- Turn compat mode on by default. It gets turned off when the -j without

the -B flag is specified. [Thus you can use -j 1 to turn it off].
- Fix malloc -> emalloc as Gordon noted.
This commit is contained in:
christos 1995-11-08 02:30:53 +00:00
parent 3c996d6b06
commit 027abce852
4 changed files with 19 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: bit.h,v 1.4 1995/06/14 15:18:49 christos Exp $ */
/* $NetBSD: bit.h,v 1.5 1995/11/08 02:30:53 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@ -64,7 +64,7 @@
(Bit_NumInts(numBits) * sizeof(int))
#define Bit_Alloc(numBits, bitArrayPtr) \
bitArrayPtr = (int *)malloc((unsigned)Bit_NumBytes(numBits)); \
bitArrayPtr = (int *) emalloc((unsigned)Bit_NumBytes(numBits)); \
Bit_Zero((numBits), (bitArrayPtr))
#define Bit_Free(bitArrayPtr) \

View File

@ -1,4 +1,4 @@
/* $NetBSD: lstInt.h,v 1.4 1995/06/14 15:21:23 christos Exp $ */
/* $NetBSD: lstInt.h,v 1.5 1995/11/08 02:31:03 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@ -89,7 +89,7 @@ typedef struct {
* PAlloc (var, ptype) --
* Allocate a pointer-typedef structure 'ptype' into the variable 'var'
*/
#define PAlloc(var,ptype) var = (ptype) malloc (sizeof (*var))
#define PAlloc(var,ptype) var = (ptype) emalloc (sizeof (*var))
/*
* LstValid (l) --

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.21 1995/11/02 23:54:54 christos Exp $ */
/* $NetBSD: main.c,v 1.22 1995/11/08 02:30:58 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@ -48,7 +48,7 @@ char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 5.25 (Berkeley) 4/1/91";
#else
static char rcsid[] = "$NetBSD: main.c,v 1.21 1995/11/02 23:54:54 christos Exp $";
static char rcsid[] = "$NetBSD: main.c,v 1.22 1995/11/08 02:30:58 christos Exp $";
#endif
#endif /* not lint */
@ -157,6 +157,7 @@ MainParseArgs(argc, argv)
extern int optind;
extern char *optarg;
int c;
int forceJobs = 0;
optind = 1; /* since we're called more than once */
#ifdef REMOTE
@ -261,6 +262,7 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != EOF) {
Var_Append(MAKEFLAGS, "-i", VAR_GLOBAL);
break;
case 'j':
forceJobs = TRUE;
maxJobs = atoi(optarg);
#ifndef REMOTE
maxLocal = maxJobs;
@ -299,6 +301,13 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != EOF) {
}
}
/*
* Be compatible if user did not specify -j and did not explicitly
* turned compatibility on
*/
if (!compatMake && !forceJobs)
compatMake = TRUE;
oldVars = TRUE;
/*
@ -674,10 +683,6 @@ main(argc, argv)
else
targs = Targ_FindList(create, TARG_CREATE);
/*
* this was original amMake -- want to allow parallelism, so put this
* back in, eventually.
*/
if (!compatMake) {
/*
* Initialize job module before traversing the graph, now that

View File

@ -1,4 +1,4 @@
.\" $NetBSD: make.1,v 1.10 1995/11/02 23:54:57 christos Exp $
.\" $NetBSD: make.1,v 1.11 1995/11/08 02:31:00 christos Exp $
.\" Copyright (c) 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
@ -140,7 +140,9 @@ before each command line in the makefile.
.It Fl j Ar max_jobs
Specify the maximum number of jobs that
.Nm make
may have running at any one time.
may have running at any one time. Turns compatibility mode off, unless the
.Ar B
flag is also specified.
.It Fl k
Continue processing after errors are encountered, but only on those targets
that do not depend on the target whose creation caused the error.