diff options
author | Paul Smith <psmith@gnu.org> | 1999-06-14 06:50:28 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 1999-06-14 06:50:28 +0000 |
commit | eb71e300680efe79533b1e57976c0165abef054d (patch) | |
tree | 51c2ec242b3725d7c92689b2277244b3691466c8 /read.c | |
parent | 7067d69664682588f00fd7173411c0d538e2ec4c (diff) | |
download | make-eb71e300680efe79533b1e57976c0165abef054d.tar.gz |
* Various bug fixes.
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 74 |
1 files changed, 40 insertions, 34 deletions
@@ -806,7 +806,7 @@ read_makefile (filename, flags) entirely consistent, since we do an unconditional expand below once we know we don't have a target-specific variable. */ - (void)variable_expand_string(pend, lb_next, -1); + (void)variable_expand_string(pend, lb_next, (long)-1); lb_next += strlen(lb_next); p2 = variable_buffer + p2_off; cmdleft = variable_buffer + cmd_off + 1; @@ -921,7 +921,7 @@ read_makefile (filename, flags) if (*lb_next != '\0') { unsigned int l = p2 - variable_buffer; - (void)variable_expand_string(p2 + plen, lb_next, -1); + (void)variable_expand_string(p2 + plen, lb_next, (long)-1); p2 = variable_buffer + l; /* Look for a semicolon in the expanded line. */ @@ -1305,10 +1305,12 @@ conditional_line (line, flocp) if (*line == '(') ++count; else if (*line == ')') - if (count <= 0) - break; - else - --count; + { + if (count <= 0) + break; + else + --count; + } } } else @@ -1554,35 +1556,38 @@ record_files (filenames, pattern, pattern_percent, deps, cmds_started, this = nextf != 0 ? copy_dep_chain (deps) : deps; if (pattern != 0) - /* If this is an extended static rule: - `targets: target%pattern: dep%pattern; cmds', - translate each dependency pattern into a plain filename - using the target pattern and this target's name. */ - if (!pattern_matches (pattern, pattern_percent, name)) - { - /* Give a warning if the rule is meaningless. */ - error (flocp,"target `%s' doesn't match the target pattern", name); - this = 0; - } - else - { - /* We use patsubst_expand to do the work of translating - the target pattern, the target's name and the dependencies' - patterns into plain dependency names. */ - char *buffer = variable_expand (""); + { + /* If this is an extended static rule: + `targets: target%pattern: dep%pattern; cmds', + translate each dependency pattern into a plain filename + using the target pattern and this target's name. */ + if (!pattern_matches (pattern, pattern_percent, name)) + { + /* Give a warning if the rule is meaningless. */ + error (flocp, + "target `%s' doesn't match the target pattern", name); + this = 0; + } + else + { + /* We use patsubst_expand to do the work of translating + the target pattern, the target's name and the dependencies' + patterns into plain dependency names. */ + char *buffer = variable_expand (""); - for (d = this; d != 0; d = d->next) - { - char *o; - char *percent = find_percent (d->name); - if (percent == 0) - continue; - o = patsubst_expand (buffer, name, pattern, d->name, - pattern_percent, percent); - free (d->name); - d->name = savestring (buffer, o - buffer); - } - } + for (d = this; d != 0; d = d->next) + { + char *o; + char *percent = find_percent (d->name); + if (percent == 0) + continue; + o = patsubst_expand (buffer, name, pattern, d->name, + pattern_percent, percent); + free (d->name); + d->name = savestring (buffer, o - buffer); + } + } + } if (!two_colon) { @@ -2344,6 +2349,7 @@ get_next_mword (buffer, delim, startp, length) case '\\': switch (*p) { + case ':': case ';': case '=': case '\\': |