summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-10-14 09:02:11 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-10-14 09:02:11 +0000
commitf5632bb3613ab21fe000ee1c5f6b89b8056f420c (patch)
tree7a007ff75f47aace17d777b8da363304dbec13df /usr.bin/make
parente95bc7165c7f3ffd1f9d64fd421987cf360584ed (diff)
allows node to be run twice, by not destroying the cmdnode contents.
This way, you can run `make .BEGIN'. Okay, this will run .BEGIN twice.
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/compat.c4
-rw-r--r--usr.bin/make/job.c3
2 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c
index b9d7f1a75fa..d0fafa60d0c 100644
--- a/usr.bin/make/compat.c
+++ b/usr.bin/make/compat.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: compat.c,v 1.60 2007/09/17 12:42:09 espie Exp $ */
+/* $OpenBSD: compat.c,v 1.61 2007/10/14 09:02:10 espie Exp $ */
/* $NetBSD: compat.c,v 1.14 1996/11/06 17:59:01 christos Exp $ */
/*
@@ -205,7 +205,6 @@ CompatRunCommand(LstNode cmdNode, /* Command to execute */
return 1;
} else
cmd = cmdStart;
- Lst_Replace(cmdNode, cmdStart);
if ((gn->type & OP_SAVE_CMDS) && (gn != end_node)) {
Lst_AtEnd(&end_node->commands, cmdStart);
@@ -250,7 +249,6 @@ CompatRunCommand(LstNode cmdNode, /* Command to execute */
break;
}
free(cmdStart);
- Lst_Replace(cmdNode, NULL);
/* The child is off and running. Now all we can do is wait... */
while (1) {
diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c
index af8fdfa733d..41112050ecb 100644
--- a/usr.bin/make/job.c
+++ b/usr.bin/make/job.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: job.c,v 1.99 2007/10/09 09:41:51 espie Exp $ */
+/* $OpenBSD: job.c,v 1.100 2007/10/14 09:02:10 espie Exp $ */
/* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */
/*
@@ -593,7 +593,6 @@ JobPrintCommand(LstNode cmdNode, /* command string to print */
/* For debugging, we replace each command with the result of expanding
* the variables in the command. */
cmdStart = cmd = Var_Subst(cmd, &job->node->context, false);
- Lst_Replace(cmdNode, cmdStart);
cmdTemplate = "%s\n";