summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2020-01-26 12:41:21 +0000
committerespie <espie@openbsd.org>2020-01-26 12:41:21 +0000
commit18cc03285580818394ff95b469a55f2bc9634566 (patch)
tree212f313cdd4fa7754fa905b371be4786463e7aa4
parentremove documentation for .MADE (diff)
downloadwireguard-openbsd-18cc03285580818394ff95b469a55f2bc9634566.tar.xz
wireguard-openbsd-18cc03285580818394ff95b469a55f2bc9634566.zip
remove OP_* for deprecated keywords (document that :: still uses
OP_INVISIBLE) okay millert@
-rw-r--r--usr.bin/make/compat.c26
-rw-r--r--usr.bin/make/dump.c4
-rw-r--r--usr.bin/make/engine.c26
-rw-r--r--usr.bin/make/expandchildren.c4
-rw-r--r--usr.bin/make/gnode.h15
-rw-r--r--usr.bin/make/make.c13
-rw-r--r--usr.bin/make/parse.c10
-rw-r--r--usr.bin/make/targ.c4
8 files changed, 28 insertions, 74 deletions
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c
index 0676defa7e3..97f0524ec13 100644
--- a/usr.bin/make/compat.c
+++ b/usr.bin/make/compat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: compat.c,v 1.92 2020/01/26 12:35:57 espie Exp $ */
+/* $OpenBSD: compat.c,v 1.93 2020/01/26 12:41:21 espie Exp $ */
/* $NetBSD: compat.c,v 1.14 1996/11/06 17:59:01 christos Exp $ */
/*
@@ -101,15 +101,6 @@ CompatMake(void *gnp, /* The node to make */
if (pgn == NULL)
pgn = gn;
- if (pgn->type & OP_MADE) {
- sib = gn;
- do {
- sib->mtime = gn->mtime;
- sib->built_status = UPTODATE;
- sib = sib->sibling;
- } while (sib != gn);
- }
-
switch(gn->built_status) {
case UNKNOWN:
/* First mark ourselves to be built, then apply whatever
@@ -225,10 +216,8 @@ CompatMake(void *gnp, /* The node to make */
if (DEBUG(MAKE))
printf("update time: %s\n",
time_to_string(&gn->mtime));
- if (!(gn->type & OP_EXEC)) {
- pgn->child_rebuilt = true;
- Make_TimeStamp(pgn, gn);
- }
+ pgn->child_rebuilt = true;
+ Make_TimeStamp(pgn, gn);
} else if (keepgoing)
pgn->built_status = ABORTED;
else {
@@ -247,14 +236,11 @@ CompatMake(void *gnp, /* The node to make */
pgn->built_status = ABORTED;
break;
case REBUILT:
- if ((gn->type & OP_EXEC) == 0) {
- pgn->child_rebuilt = true;
- Make_TimeStamp(pgn, gn);
- }
+ pgn->child_rebuilt = true;
+ Make_TimeStamp(pgn, gn);
break;
case UPTODATE:
- if ((gn->type & OP_EXEC) == 0)
- Make_TimeStamp(pgn, gn);
+ Make_TimeStamp(pgn, gn);
break;
default:
break;
diff --git a/usr.bin/make/dump.c b/usr.bin/make/dump.c
index cf00a342048..b56f6af47dd 100644
--- a/usr.bin/make/dump.c
+++ b/usr.bin/make/dump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dump.c,v 1.11 2020/01/13 14:07:35 espie Exp $ */
+/* $OpenBSD: dump.c,v 1.12 2020/01/26 12:41:21 espie Exp $ */
/*
* Copyright (c) 2012 Marc Espie.
*
@@ -117,7 +117,7 @@ TargPrintNode(GNode *gn, bool full)
}
if (full) {
printf("# %d unmade prerequisites\n", gn->children_left);
- if (! (gn->type & (OP_JOIN|OP_USE|OP_EXEC))) {
+ if (! (gn->type & OP_USE)) {
if (!is_out_of_date(gn->mtime)) {
printf("# last modified %s: %s\n",
time_to_string(&gn->mtime),
diff --git a/usr.bin/make/engine.c b/usr.bin/make/engine.c
index ddfe2d4d9bb..d043822b3a2 100644
--- a/usr.bin/make/engine.c
+++ b/usr.bin/make/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.68 2020/01/16 16:07:18 espie Exp $ */
+/* $OpenBSD: engine.c,v 1.69 2020/01/26 12:41:21 espie Exp $ */
/*
* Copyright (c) 2012 Marc Espie.
*
@@ -241,7 +241,7 @@ void
Job_Touch(GNode *gn)
{
handle_all_signals();
- if (gn->type & (OP_JOIN|OP_USE|OP_EXEC|OP_OPTIONAL|OP_PHONY)) {
+ if (gn->type & (OP_USE|OP_OPTIONAL|OP_PHONY)) {
/*
* .JOIN, .USE, and .OPTIONAL targets are "virtual" targets
* and, as such, shouldn't really be created.
@@ -347,7 +347,7 @@ Make_DoAllVar(GNode *gn)
for (ln = Lst_First(&gn->children); ln != NULL; ln = Lst_Adv(ln)) {
child = Lst_Datum(ln);
- if ((child->type & (OP_EXEC|OP_USE|OP_INVISIBLE)) != 0)
+ if ((child->type & (OP_USE|OP_INVISIBLE)) != 0)
continue;
if (OP_NOP(child->type) ||
(target = Var(TARGET_INDEX, child)) == NULL) {
@@ -371,10 +371,7 @@ Make_DoAllVar(GNode *gn)
* hosed.
*/
do_oodate = false;
- if (gn->type & OP_JOIN) {
- if (child->built_status == REBUILT)
- do_oodate = true;
- } else if (is_strictly_before(gn->mtime, child->mtime) ||
+ if (is_strictly_before(gn->mtime, child->mtime) ||
(!is_strictly_before(child->mtime, starttime) &&
child->built_status == REBUILT))
do_oodate = true;
@@ -413,9 +410,6 @@ Make_DoAllVar(GNode *gn)
if (gn->impliedsrc)
Var(IMPSRC_INDEX, gn) = Var(TARGET_INDEX, gn->impliedsrc);
-
- if (gn->type & OP_JOIN)
- Var(TARGET_INDEX, gn) = Var(ALLSRC_INDEX, gn);
}
/* Wrapper to call Make_TimeStamp from a forEach loop. */
@@ -434,7 +428,7 @@ Make_OODate(GNode *gn)
* Certain types of targets needn't even be sought as their datedness
* doesn't depend on their modification time...
*/
- if ((gn->type & (OP_JOIN|OP_USE|OP_EXEC|OP_PHONY)) == 0) {
+ if ((gn->type & (OP_USE|OP_PHONY)) == 0) {
(void)Dir_MTime(gn);
if (DEBUG(MAKE)) {
if (!is_out_of_date(gn->mtime))
@@ -462,15 +456,7 @@ Make_OODate(GNode *gn)
if (DEBUG(MAKE))
printf(".USE node...");
oodate = false;
- } else if (gn->type & OP_JOIN) {
- /*
- * A target with the .JOIN attribute is only considered
- * out-of-date if any of its children was out-of-date.
- */
- if (DEBUG(MAKE))
- printf(".JOIN node...");
- oodate = gn->child_rebuilt;
- } else if (gn->type & (OP_FORCE|OP_EXEC|OP_PHONY)) {
+ } else if (gn->type & (OP_FORCE|OP_PHONY)) {
/*
* A node which is the object of the force (!) operator or which
* has the .EXEC attribute is always considered out-of-date.
diff --git a/usr.bin/make/expandchildren.c b/usr.bin/make/expandchildren.c
index c16ed95691e..1e8f2e20916 100644
--- a/usr.bin/make/expandchildren.c
+++ b/usr.bin/make/expandchildren.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: expandchildren.c,v 1.1 2020/01/13 14:05:21 espie Exp $ */
+/* $OpenBSD: expandchildren.c,v 1.2 2020/01/26 12:41:21 espie Exp $ */
/* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */
/*
@@ -66,7 +66,7 @@ LinkParent(GNode *cgn, GNode *pgn)
Lst_AtEnd(&cgn->parents, pgn);
if (!has_been_built(cgn))
pgn->children_left++;
- else if ( ! (cgn->type & (OP_EXEC|OP_USE))) {
+ else if ( ! (cgn->type & OP_USE)) {
if (cgn->built_status == REBUILT)
pgn->child_rebuilt = true;
(void)Make_TimeStamp(pgn, cgn);
diff --git a/usr.bin/make/gnode.h b/usr.bin/make/gnode.h
index 2052d1fdb8a..9500c696f5d 100644
--- a/usr.bin/make/gnode.h
+++ b/usr.bin/make/gnode.h
@@ -1,6 +1,6 @@
#ifndef GNODE_H
#define GNODE_H
-/* $OpenBSD: gnode.h,v 1.38 2020/01/26 12:37:47 espie Exp $ */
+/* $OpenBSD: gnode.h,v 1.39 2020/01/26 12:41:21 espie Exp $ */
/*
* Copyright (c) 2001 Marc Espie.
@@ -188,10 +188,6 @@ struct command
#define OP_OPTIONAL 0x00000008 /* Don't care if the target doesn't
* exist and can't be created */
#define OP_USE 0x00000010 /* Use associated commands for parents */
-#define OP_EXEC 0x00000020 /* Target is never out of date, but always
- * execute commands anyway. Its time
- * doesn't matter, so it has none...sort
- * of */
#define OP_IGNORE 0x00000040 /* Ignore errors when creating the node */
#define OP_PRECIOUS 0x00000080 /* Don't remove the target when
* interrupted */
@@ -200,13 +196,10 @@ struct command
* commands should always be executed when
* it is out of date, regardless of the
* state of the -n or -t flags */
-#define OP_JOIN 0x00000400 /* Target is out-of-date only if any of its
- * children was out-of-date */
-#define OP_MADE 0x00000800 /* Assume the node is already made; even if
- * it really is out of date */
#define OP_INVISIBLE 0x00001000 /* The node is invisible to its parents.
* I.e. it doesn't show up in the parents's
- * local variables. */
+ * local variables. Used by :: for
+ * supplementary nodes (cohorts). */
#define OP_NOTMAIN 0x00002000 /* The node is exempt from normal 'main
* target' processing in parse.c */
#define OP_PHONY 0x00004000 /* Not a file target; run always */
@@ -234,7 +227,7 @@ struct command
*/
#define OP_NOP(t) (((t) & OP_OPMASK) == OP_ZERO)
-#define OP_NOTARGET (OP_NOTMAIN|OP_USE|OP_EXEC|OP_TRANSFORM)
+#define OP_NOTARGET (OP_NOTMAIN|OP_USE|OP_TRANSFORM)
#endif
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c
index 557988c15f8..11e566c2eff 100644
--- a/usr.bin/make/make.c
+++ b/usr.bin/make/make.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: make.c,v 1.81 2020/01/13 15:41:53 espie Exp $ */
+/* $OpenBSD: make.c,v 1.82 2020/01/26 12:41:21 espie Exp $ */
/* $NetBSD: make.c,v 1.10 1996/11/06 17:59:15 christos Exp $ */
/*
@@ -279,7 +279,7 @@ Make_Update(GNode *cgn) /* the child node */
printf("%s--=%d ",
pgn->name, pgn->children_left);
- if ( ! (cgn->type & (OP_EXEC|OP_USE))) {
+ if ( ! (cgn->type & OP_USE)) {
if (cgn->built_status == REBUILT)
pgn->child_rebuilt = true;
(void)Make_TimeStamp(pgn, cgn);
@@ -388,15 +388,6 @@ try_to_make_node(GNode *gn)
if (DEBUG(MAKE))
printf("up-to-date\n");
gn->built_status = UPTODATE;
- if (gn->type & OP_JOIN) {
- /*
- * Even for an up-to-date .JOIN node, we need its
- * local variables, so that we have the right
- * value for .TARGET when computing the
- * local variables of its parent(s)...
- */
- Make_DoAllVar(gn);
- }
Make_Update(gn);
}
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 76c5638296e..a5518dd6b58 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.131 2020/01/26 12:37:47 espie Exp $ */
+/* $OpenBSD: parse.c,v 1.132 2020/01/26 12:41:21 espie Exp $ */
/* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */
/*
@@ -184,13 +184,13 @@ static struct {
unsigned int special;
unsigned int special_op;
} specials[] = {
- { P(NODE_EXEC), SPECIAL_DEPRECATED, OP_EXEC },
+ { P(NODE_EXEC), SPECIAL_DEPRECATED, 0 },
{ P(NODE_IGNORE), SPECIAL_IGNORE, OP_IGNORE },
{ P(NODE_INCLUDES), SPECIAL_DEPRECATED, 0 },
- { P(NODE_INVISIBLE), SPECIAL_DEPRECATED, OP_INVISIBLE },
- { P(NODE_JOIN), SPECIAL_DEPRECATED, OP_JOIN },
+ { P(NODE_INVISIBLE), SPECIAL_DEPRECATED, 0 },
+ { P(NODE_JOIN), SPECIAL_DEPRECATED, 0 },
{ P(NODE_LIBS), SPECIAL_DEPRECATED, 0 },
- { P(NODE_MADE), SPECIAL_DEPRECATED, OP_MADE },
+ { P(NODE_MADE), SPECIAL_DEPRECATED, 0 },
{ P(NODE_MAIN), SPECIAL_MAIN, 0 },
{ P(NODE_MAKE), SPECIAL_MAKE, OP_MAKE },
{ P(NODE_MAKEFLAGS), SPECIAL_MFLAGS, 0 },
diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c
index 5a7655a4db7..7ca2cda86d5 100644
--- a/usr.bin/make/targ.c
+++ b/usr.bin/make/targ.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: targ.c,v 1.84 2020/01/13 15:41:53 espie Exp $ */
+/* $OpenBSD: targ.c,v 1.85 2020/01/26 12:41:21 espie Exp $ */
/* $NetBSD: targ.c,v 1.11 1997/02/20 16:51:50 christos Exp $ */
/*
@@ -307,12 +307,10 @@ Targ_PrintType(int type)
switch (tbit) {
PRINTBIT(OPTIONAL);
PRINTBIT(USE);
- PRINTBIT(EXEC);
PRINTBIT(IGNORE);
PRINTBIT(PRECIOUS);
PRINTBIT(SILENT);
PRINTBIT(MAKE);
- PRINTBIT(JOIN);
PRINTBIT(INVISIBLE);
PRINTBIT(NOTMAIN);
/*XXX: MEMBER is defined, so CONCAT(OP_,MEMBER) gives OP_"%" */