summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1994-03-04 05:10:22 +0000
committerRoland McGrath <roland@redhat.com>1994-03-04 05:10:22 +0000
commit5d3189c952993f244470910d0ad208d4d6866166 (patch)
treed0aa7e7a854ebc1db2a6d1482cf6170715a3ee44
parentc71c43c0b53e9108b150afd842f7f38034ad5d08 (diff)
downloadgunmake-5d3189c952993f244470910d0ad208d4d6866166.tar.gz
Formerly read.c.~75~
-rw-r--r--read.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/read.c b/read.c
index 0bf3a50..9da3927 100644
--- a/read.c
+++ b/read.c
@@ -412,7 +412,13 @@ read_makefile (filename, flags)
else
{
p2 = next_token (p + 6);
- p = end_of_token (p2);
+ /* Let the variable name be the whole rest of the line,
+ with trailing blanks stripped (comments have already been
+ removed), so it could be a complex variable/function
+ reference that might contain blanks. */
+ p = index (p2, '\0');
+ while (isblank (p[-1]))
+ --p;
lineno = do_define (p2, p - p2, o_file,
lineno, infile, filename);
}
@@ -431,8 +437,14 @@ read_makefile (filename, flags)
{
unsigned int len;
p2 = end_of_token (p2);
- p = find_next_token (&p2, &len);
- lineno = do_define (p, len, o_override,
+ /* Let the variable name be the whole rest of the line,
+ with trailing blanks stripped (comments have already been
+ removed), so it could be a complex variable/function
+ reference that might contain blanks. */
+ p = index (p2, '\0');
+ while (isblank (p[-1]))
+ --p;
+ lineno = do_define (p2, p - p2, o_override,
lineno, infile, filename);
}
}