aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2022-10-18 15:02:44 +0100
committerRon Yorston <rmy@pobox.com>2022-10-18 15:02:44 +0100
commit3c5b4335d36d2aaa5dadc82b004f43e5a18eddfa (patch)
tree40a5eea86d5d6739b486025cb4437a997c1b9534 /miscutils
parent92a127e9f96598b86a4327b70783b9769eaa94fe (diff)
downloadbusybox-w32-3c5b4335d36d2aaa5dadc82b004f43e5a18eddfa.tar.gz
busybox-w32-3c5b4335d36d2aaa5dadc82b004f43e5a18eddfa.tar.bz2
busybox-w32-3c5b4335d36d2aaa5dadc82b004f43e5a18eddfa.zip
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.
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/make.c9
1 files changed, 4 insertions, 5 deletions
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)
1609 } 1609 }
1610 break; 1610 break;
1611 } 1611 }
1612 case '!': 1612 // ':=' is a non-POSIX extension.
1613 // ':=' and '!=' are non-POSIX extensions.
1614 case '+': 1613 case '+':
1615 case '?': 1614 case '?':
1616 // '+=' and '?=' are from POSIX 202X. 1615 case '!':
1616 // '+=', '?=' and '!=' are from POSIX 202X.
1617 if (posix) 1617 if (posix)
1618 break; 1618 break;
1619 eq = q[-1]; 1619 eq = q[-1];
@@ -1662,8 +1662,7 @@ input(FILE *fd, int ilevel)
1662 if (rhs != q) 1662 if (rhs != q)
1663 free(rhs); 1663 free(rhs);
1664 q = newq; 1664 q = newq;
1665 } 1665 } else if (eq == '!') {
1666 else if (eq == '!') {
1667 char *cmd = expand_macros(q, FALSE); 1666 char *cmd = expand_macros(q, FALSE);
1668 q = newq = run_command(cmd); 1667 q = newq = run_command(cmd);
1669 free(cmd); 1668 free(cmd);