summaryrefslogtreecommitdiff
path: root/usr.bin/make/make.c
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2020-10-18 11:09:08 +0000
committerrillig <rillig@NetBSD.org>2020-10-18 11:09:08 +0000
commit71c26ae4f192fcc8a32a9f2f0ecf2467d180e52d (patch)
treef630eb4c72af1995b26fb6b06dddbefd1148d240 /usr.bin/make/make.c
parente89b6c8f70a68bc6a84d848fa030b28a1bc7608c (diff)
make(1): convert NoExecute to non-inline
The header make.h is not only used by usr.bin/make but also by usr.bin/xinstall, to get the needshell function. That program does not declare the variables noRecursiveExecute and noExecute, leading to an "unresolved reference" at link time. To fix this, move the inline functions away from make.h. It's a quirk that make.h gets included by other programs since it contains a whole lot of definitions that are only useful in make itself. If any, there should be a separate header that defines the public library API of make, and only that.
Diffstat (limited to 'usr.bin/make/make.c')
-rw-r--r--usr.bin/make/make.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c
index 7d33e0dc685..102811e398d 100644
--- a/usr.bin/make/make.c
+++ b/usr.bin/make/make.c
@@ -1,4 +1,4 @@
-/* $NetBSD: make.c,v 1.158 2020/10/17 17:47:14 rillig Exp $ */
+/* $NetBSD: make.c,v 1.159 2020/10/18 11:09:08 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -107,7 +107,7 @@
#include "job.h"
/* "@(#)make.c 8.1 (Berkeley) 6/6/93" */
-MAKE_RCSID("$NetBSD: make.c,v 1.158 2020/10/17 17:47:14 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.159 2020/10/18 11:09:08 rillig Exp $");
/* Sequence # to detect recursion. */
static unsigned int checked = 1;
@@ -177,6 +177,12 @@ GNode_FprintDetails(FILE *f, const char *prefix, const GNode *gn,
suffix);
}
+Boolean
+NoExecute(GNode *gn)
+{
+ return (gn->type & OP_MAKE) ? noRecursiveExecute : noExecute;
+}
+
/* Update the youngest child of the node, according to the given child. */
void
Make_TimeStamp(GNode *pgn, GNode *cgn)