Accept whitespace between command specifiers @+- like gmake does. New binutils

does this.
This commit is contained in:
christos 2023-01-17 21:35:19 +00:00
parent 5732ef2398
commit 1934cf4b4f
2 changed files with 8 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: compat.c,v 1.243 2022/12/07 10:28:48 rillig Exp $ */
/* $NetBSD: compat.c,v 1.244 2023/01/17 21:35:19 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@ -91,7 +91,7 @@
#include "pathnames.h"
/* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */
MAKE_RCSID("$NetBSD: compat.c,v 1.243 2022/12/07 10:28:48 rillig Exp $");
MAKE_RCSID("$NetBSD: compat.c,v 1.244 2023/01/17 21:35:19 christos Exp $");
static GNode *curTarg = NULL;
static pid_t compatChild;
@ -280,7 +280,8 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln)
doIt = true;
if (shellName == NULL) /* we came here from jobs */
Shell_Init();
} else
} else if (!ch_isspace(*cmd))
/* Ignore whitespace for compatibility with gnu make */
break;
cmd++;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: job.c,v 1.456 2022/10/10 21:17:25 rillig Exp $ */
/* $NetBSD: job.c,v 1.457 2023/01/17 21:35:19 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@ -142,7 +142,7 @@
#include "trace.h"
/* "@(#)job.c 8.2 (Berkeley) 3/19/94" */
MAKE_RCSID("$NetBSD: job.c,v 1.456 2022/10/10 21:17:25 rillig Exp $");
MAKE_RCSID("$NetBSD: job.c,v 1.457 2023/01/17 21:35:19 christos Exp $");
/*
* A shell defines how the commands are run. All commands for a target are
@ -732,7 +732,8 @@ ParseCommandFlags(char **pp, CommandFlags *out_cmdFlags)
out_cmdFlags->ignerr = true;
else if (*p == '+')
out_cmdFlags->always = true;
else
else if (!ch_isspace(*p))
/* Ignore whitespace for compatibility with gnu make */
break;
p++;
}