From 3c5b4335d36d2aaa5dadc82b004f43e5a18eddfa Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Tue, 18 Oct 2022 15:02:44 +0100 Subject: make: shell assignment is a POSIX 202X feature Austin Group defect report 337 has been accepted, thus making macro assignment from the output of a shell command (!=) a POSIX 202X feature. This was previously implemented as a non-POSIX extension. --- miscutils/make.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'miscutils') diff --git a/miscutils/make.c b/miscutils/make.c index 8e3778461..431ac41d4 100644 --- a/miscutils/make.c +++ b/miscutils/make.c @@ -1609,11 +1609,11 @@ input(FILE *fd, int ilevel) } break; } - case '!': - // ':=' and '!=' are non-POSIX extensions. + // ':=' is a non-POSIX extension. case '+': case '?': - // '+=' and '?=' are from POSIX 202X. + case '!': + // '+=', '?=' and '!=' are from POSIX 202X. if (posix) break; eq = q[-1]; @@ -1662,8 +1662,7 @@ input(FILE *fd, int ilevel) if (rhs != q) free(rhs); q = newq; - } - else if (eq == '!') { + } else if (eq == '!') { char *cmd = expand_macros(q, FALSE); q = newq = run_command(cmd); free(cmd); -- cgit v1.2.3-55-g6feb