diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2021-02-11 06:01:59 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2021-02-11 06:03:22 +0000 |
commit | dba7b0ef928af88caa38728a73657b837aeeac93 (patch) | |
tree | fd78de6458efc1c445f9de477bfbd0565dcf5f8b /contrib/bmake/compat.c | |
parent | 2a7d4d95450429a0d08232a5019a592c47955de3 (diff) | |
parent | 8b6f73e37baf5c37946844ec335a84856b1a9033 (diff) | |
download | src-dba7b0ef928af88caa38728a73657b837aeeac93.tar.gz src-dba7b0ef928af88caa38728a73657b837aeeac93.zip |
Diffstat (limited to 'contrib/bmake/compat.c')
-rw-r--r-- | contrib/bmake/compat.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/contrib/bmake/compat.c b/contrib/bmake/compat.c index 6c7238318959..59190d8c4354 100644 --- a/contrib/bmake/compat.c +++ b/contrib/bmake/compat.c @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.219 2021/01/10 21:20:46 rillig Exp $ */ +/* $NetBSD: compat.c,v 1.224 2021/02/05 05:15:12 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -69,7 +69,7 @@ * SUCH DAMAGE. */ -/*- +/* * compat.c -- * The routines in this file implement the full-compatibility * mode of PMake. Most of the special functionality of PMake @@ -99,7 +99,7 @@ #include "pathnames.h" /* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: compat.c,v 1.219 2021/01/10 21:20:46 rillig Exp $"); +MAKE_RCSID("$NetBSD: compat.c,v 1.224 2021/02/05 05:15:12 rillig Exp $"); static GNode *curTarg = NULL; static pid_t compatChild; @@ -260,7 +260,7 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) /* * Append the expanded command, to prevent the * local variables from being interpreted in the - * context of the .END node. + * scope of the .END node. * * A probably unintended side effect of this is that * the expanded command will be expanded again in the @@ -360,7 +360,7 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) /* * Fork and execute the single command. If the fork fails, we abort. */ - compatChild = cpid = vFork(); + compatChild = cpid = vfork(); if (cpid < 0) { Fatal("Could not fork"); } @@ -512,7 +512,7 @@ MakeUnmade(GNode *gn, GNode *pgn) } if (Lst_FindDatum(&gn->implicitParents, pgn) != NULL) - Var_Set(IMPSRC, GNode_VarTarget(gn), pgn); + Var_Set(pgn, IMPSRC, GNode_VarTarget(gn)); /* * All the children were made ok. Now youngestChild->mtime contains the @@ -605,7 +605,7 @@ MakeOther(GNode *gn, GNode *pgn) if (Lst_FindDatum(&gn->implicitParents, pgn) != NULL) { const char *target = GNode_VarTarget(gn); - Var_Set(IMPSRC, target != NULL ? target : "", pgn); + Var_Set(pgn, IMPSRC, target != NULL ? target : ""); } switch (gn->made) { @@ -752,6 +752,10 @@ Compat_Run(GNodeList *targs) } if (errorNode != NULL) { + if (DEBUG(GRAPH2)) + Targ_PrintGraph(2); + else if (DEBUG(GRAPH3)) + Targ_PrintGraph(3); PrintOnError(errorNode, "\nStop."); exit(1); } |