Bring down the number of stat(2) system calls from 682 to 294. This change
adds a .NOSUFF directive that has been applied to targets that have been already made, and are not supposed to have suffix rules applied to them.
This commit is contained in:
parent
944602ca01
commit
d73f720df6
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: make.h,v 1.39 2001/10/31 03:59:42 tv Exp $ */
|
||||
/* $NetBSD: make.h,v 1.40 2002/02/03 21:41:44 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -207,7 +207,7 @@ typedef struct GNode {
|
||||
#define OP_PRECIOUS 0x00000080 /* Don't remove the target when
|
||||
* interrupted */
|
||||
#define OP_SILENT 0x00000100 /* Don't echo commands when executed */
|
||||
#define OP_MAKE 0x00000200 /* Target is a recurrsive make so its
|
||||
#define OP_MAKE 0x00000200 /* Target is a recursive make so its
|
||||
* commands should always be executed when
|
||||
* it is out of date, regardless of the
|
||||
* state of the -n or -t flags */
|
||||
@ -223,6 +223,7 @@ typedef struct GNode {
|
||||
* target' processing in parse.c */
|
||||
#define OP_PHONY 0x00010000 /* Not a file target; run always */
|
||||
#define OP_NOPATH 0x00020000 /* Don't search for file in the path */
|
||||
#define OP_NOSUFF 0x00040000 /* Don't apply suffix rules to it */
|
||||
/* Attributes applied by PMake */
|
||||
#define OP_TRANSFORM 0x80000000 /* The node is a transformation rule */
|
||||
#define OP_MEMBER 0x40000000 /* Target is a member of an archive */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: parse.c,v 1.78 2002/01/27 01:50:55 reinoud Exp $ */
|
||||
/* $NetBSD: parse.c,v 1.79 2002/02/03 21:41:44 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -39,14 +39,14 @@
|
||||
*/
|
||||
|
||||
#ifdef MAKE_BOOTSTRAP
|
||||
static char rcsid[] = "$NetBSD: parse.c,v 1.78 2002/01/27 01:50:55 reinoud Exp $";
|
||||
static char rcsid[] = "$NetBSD: parse.c,v 1.79 2002/02/03 21:41:44 christos Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: parse.c,v 1.78 2002/01/27 01:50:55 reinoud Exp $");
|
||||
__RCSID("$NetBSD: parse.c,v 1.79 2002/02/03 21:41:44 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -172,6 +172,7 @@ typedef enum {
|
||||
* make */
|
||||
NoExport, /* .NOEXPORT */
|
||||
NoPath, /* .NOPATH */
|
||||
NoSuff, /* .NOSUFF */
|
||||
Not, /* Not special */
|
||||
NotParallel, /* .NOTPARALLEL */
|
||||
Null, /* .NULL */
|
||||
@ -231,6 +232,7 @@ static struct {
|
||||
{ ".MAKEFLAGS", MFlags, 0 },
|
||||
{ ".MFLAGS", MFlags, 0 },
|
||||
{ ".NOPATH", NoPath, OP_NOPATH },
|
||||
{ ".NOSUFF", NoSuff, OP_NOSUFF },
|
||||
{ ".NOTMAIN", Attribute, OP_NOTMAIN },
|
||||
{ ".NOTPARALLEL", NotParallel, 0 },
|
||||
{ ".NO_PARALLEL", NotParallel, 0 },
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: suff.c,v 1.36 2002/01/27 01:50:55 reinoud Exp $ */
|
||||
/* $NetBSD: suff.c,v 1.37 2002/02/03 21:41:44 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -39,14 +39,14 @@
|
||||
*/
|
||||
|
||||
#ifdef MAKE_BOOTSTRAP
|
||||
static char rcsid[] = "$NetBSD: suff.c,v 1.36 2002/01/27 01:50:55 reinoud Exp $";
|
||||
static char rcsid[] = "$NetBSD: suff.c,v 1.37 2002/02/03 21:41:44 christos Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: suff.c,v 1.36 2002/01/27 01:50:55 reinoud Exp $");
|
||||
__RCSID("$NetBSD: suff.c,v 1.37 2002/02/03 21:41:44 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -2095,7 +2095,7 @@ sfnd_abort:
|
||||
* on the lhs of a dependency operator or [XXX] it has neither
|
||||
* children or commands) as the old pmake did.
|
||||
*/
|
||||
if ((gn->type & (OP_PHONY|OP_NOPATH)) == 0) {
|
||||
if ((gn->type & (OP_PHONY|OP_NOPATH|OP_NOSUFF)) == 0) {
|
||||
free(gn->path);
|
||||
gn->path = Dir_FindFile(gn->name,
|
||||
(targ == NULL ? dirSearchPath :
|
||||
@ -2301,7 +2301,7 @@ SuffFindDeps (gn, slst)
|
||||
GNode *gn; /* node we're dealing with */
|
||||
Lst slst;
|
||||
{
|
||||
if (gn->type & (OP_DEPS_FOUND|OP_PHONY)) {
|
||||
if (gn->type & (OP_DEPS_FOUND|OP_PHONY|OP_NOSUFF)) {
|
||||
/*
|
||||
* If dependencies already found, no need to do it again...
|
||||
* If this is a .PHONY target, we do not apply suffix rules.
|
||||
|
Loading…
Reference in New Issue
Block a user