From 036ccd8efa9ca16734b8baf4cc022eacb5d78576 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Tue, 24 Mar 2015 21:29:00 +0300 Subject: Support SunOS make target-specific variables --- read.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'read.c') diff --git a/read.c b/read.c index e67d386..38cdbdd 100644 --- a/read.c +++ b/read.c @@ -1157,6 +1157,10 @@ eval (struct ebuffer *ebuf, int set_default) if (two_colon) p2++; + /* In sunmake mode ":=" means target-specific variable, not ":" */ + if (sun_flag && (*p2 == '=')) + p2++; + /* Test to see if it's a target-specific variable. Copy the rest of the buffer over, possibly temporarily (we'll expand it later if it's not a target-specific variable). PLEN saves the length @@ -2668,7 +2672,8 @@ get_next_mword (char *buffer, char *delim, char **startp, unsigned int *length) case '=': ++p; - wtype = w_varassign; + /* In sunmake mode ":=" acts as ":" in normal mode. */ + wtype = sun_flag ? w_colon : w_varassign; break; } break; -- cgit v1.2.3