diff options
author | Paul Smith <psmith@gnu.org> | 2004-01-21 06:32:59 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2004-01-21 06:32:59 +0000 |
commit | 1f16ee5c2d482a75504fbbcf70e9e2a44acc1339 (patch) | |
tree | fce4f9c32c1345b44f5dcab09c3d8456cf230726 /read.c | |
parent | 2b3ee46f4e4e73cb3d05921391e5cf64990483a7 (diff) | |
download | gunmake-1f16ee5c2d482a75504fbbcf70e9e2a44acc1339.tar.gz |
Many bug fixes etc.
- Apply a fix for the "thundering herd" problem when using "-j -l".
This also fixes bug #4693.
- Fix bug #7257: allow functions as ifdef arguments
- Fix bug #4518: make sure we print all double-colon rules with -p.
- Upgrade to autconf 2.58/automake 1.8/gettext 0.13.1
- Various doc cleanups, etc.
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 45 |
1 files changed, 24 insertions, 21 deletions
@@ -137,7 +137,6 @@ static void record_files PARAMS ((struct nameseq *filenames, char *pattern, char int have_sysv_atvar, const struct floc *flocp, int set_default)); static void record_target_var PARAMS ((struct nameseq *filenames, char *defn, - int two_colon, enum variable_origin origin, int enabled, const struct floc *flocp)); @@ -505,7 +504,7 @@ eval (struct ebuffer *ebuf, int set_default) while (1) { - int linelen; + unsigned int linelen; char *line; int len; char *p; @@ -1053,16 +1052,18 @@ eval (struct ebuffer *ebuf, int set_default) v_origin = o_file; exported = 0; if (wtype == w_static) - if (word1eq ("override")) - { - v_origin = o_override; - wtype = get_next_mword (p+len, NULL, &p, &len); - } - else if (word1eq ("export")) - { - exported = 1; - wtype = get_next_mword (p+len, NULL, &p, &len); - } + { + if (word1eq ("override")) + { + v_origin = o_override; + wtype = get_next_mword (p+len, NULL, &p, &len); + } + else if (word1eq ("export")) + { + exported = 1; + wtype = get_next_mword (p+len, NULL, &p, &len); + } + } if (wtype != w_eol) wtype = get_next_mword (p+len, NULL, NULL, NULL); @@ -1079,8 +1080,7 @@ eval (struct ebuffer *ebuf, int set_default) semip, strlen (semip)+1); p = variable_buffer + l; } - record_target_var (filenames, p, two_colon, v_origin, exported, - fstart); + record_target_var (filenames, p, v_origin, exported, fstart); filenames = 0; continue; } @@ -1457,17 +1457,20 @@ conditional_line (char *line, const struct floc *flocp) /* "Ifdef" or "ifndef". */ char *var; struct variable *v; - register char *p = end_of_token (line); - i = p - line; - p = next_token (p); - if (*p != '\0') - return -1; + register char *p; /* Expand the thing we're looking up, so we can use indirect and constructed variable names. */ - line[i] = '\0'; var = allocated_variable_expand (line); + /* Make sure there's only one variable name to test. */ + p = end_of_token (var); + i = p - var; + p = next_token (p); + if (*p != '\0') + return -1; + + var[i] = '\0'; v = lookup_variable (var, strlen (var)); conditionals->ignoring[conditionals->if_cmds - 1] = (v != 0 && *v->value != '\0') == notdef; @@ -1651,7 +1654,7 @@ uniquize_deps (struct dep *chain) variable value list. */ static void -record_target_var (struct nameseq *filenames, char *defn, int two_colon, +record_target_var (struct nameseq *filenames, char *defn, enum variable_origin origin, int exported, const struct floc *flocp) { |