mirror of
https://github.com/mirror/make.git
synced 2025-01-27 12:51:07 +08:00
Fix a core dump when reading_file is 0 (20033).
Fix some manual typos (20018).
This commit is contained in:
parent
eda0e24ccd
commit
a940199072
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2007-06-13 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* doc/make.texi (Reading Makefiles): "Expansion of deferred" ->
|
||||||
|
"Expansion of a deferred"
|
||||||
|
Fixes Savannah bug #20018.
|
||||||
|
|
||||||
|
* expand.c (variable_expand_for_file): Preserve the value of
|
||||||
|
reading_file rather than setting it to 0 at the end.
|
||||||
|
Fixes Savannah bug #20033.
|
||||||
|
|
||||||
2007-05-11 Paul Smith <psmith@gnu.org>
|
2007-05-11 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
* job.c (new_job): Add debug info to specify where make found the
|
* job.c (new_job): Add debug info to specify where make found the
|
||||||
|
@ -1541,7 +1541,7 @@ constructs within the makefile. We say that expansion is
|
|||||||
@code{make} will expand any variables or functions in that section of a
|
@code{make} will expand any variables or functions in that section of a
|
||||||
construct as the makefile is parsed. We say that expansion is
|
construct as the makefile is parsed. We say that expansion is
|
||||||
@dfn{deferred} if expansion is not performed immediately. Expansion of
|
@dfn{deferred} if expansion is not performed immediately. Expansion of
|
||||||
deferred construct is not performed until either the construct appears
|
a deferred construct is not performed until either the construct appears
|
||||||
later in an immediate context, or until the second phase.
|
later in an immediate context, or until the second phase.
|
||||||
|
|
||||||
You may not be familiar with some of these constructs yet. You can
|
You may not be familiar with some of these constructs yet. You can
|
||||||
|
13
expand.c
13
expand.c
@ -460,20 +460,25 @@ char *
|
|||||||
variable_expand_for_file (const char *line, struct file *file)
|
variable_expand_for_file (const char *line, struct file *file)
|
||||||
{
|
{
|
||||||
char *result;
|
char *result;
|
||||||
struct variable_set_list *save;
|
struct variable_set_list *savev;
|
||||||
|
const struct floc *savef;
|
||||||
|
|
||||||
if (file == 0)
|
if (file == 0)
|
||||||
return variable_expand (line);
|
return variable_expand (line);
|
||||||
|
|
||||||
save = current_variable_set_list;
|
savev = current_variable_set_list;
|
||||||
current_variable_set_list = file->variables;
|
current_variable_set_list = file->variables;
|
||||||
|
|
||||||
|
savef = reading_file;
|
||||||
if (file->cmds && file->cmds->fileinfo.filenm)
|
if (file->cmds && file->cmds->fileinfo.filenm)
|
||||||
reading_file = &file->cmds->fileinfo;
|
reading_file = &file->cmds->fileinfo;
|
||||||
else
|
else
|
||||||
reading_file = 0;
|
reading_file = 0;
|
||||||
|
|
||||||
result = variable_expand (line);
|
result = variable_expand (line);
|
||||||
current_variable_set_list = save;
|
|
||||||
reading_file = 0;
|
current_variable_set_list = savev;
|
||||||
|
reading_file = savef;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
6
read.c
6
read.c
@ -463,7 +463,7 @@ eval (struct ebuffer *ebuf, int set_default)
|
|||||||
|
|
||||||
#define record_waiting_files() \
|
#define record_waiting_files() \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if (filenames != 0) \
|
if (filenames != 0) \
|
||||||
{ \
|
{ \
|
||||||
fi.lineno = tgts_started; \
|
fi.lineno = tgts_started; \
|
||||||
@ -570,7 +570,7 @@ eval (struct ebuffer *ebuf, int set_default)
|
|||||||
remove_comments (collapsed);
|
remove_comments (collapsed);
|
||||||
|
|
||||||
/* Compare a word, both length and contents. */
|
/* Compare a word, both length and contents. */
|
||||||
#define word1eq(s) (wlen == sizeof(s)-1 && strneq (s, p, sizeof(s)-1))
|
#define word1eq(s) (wlen == sizeof(s)-1 && strneq (s, p, sizeof(s)-1))
|
||||||
p = collapsed;
|
p = collapsed;
|
||||||
while (isspace ((unsigned char)*p))
|
while (isspace ((unsigned char)*p))
|
||||||
++p;
|
++p;
|
||||||
@ -608,7 +608,7 @@ eval (struct ebuffer *ebuf, int set_default)
|
|||||||
|
|
||||||
if (!in_ignored_define)
|
if (!in_ignored_define)
|
||||||
{
|
{
|
||||||
int i = conditional_line (p, wlen, fstart);
|
int i = conditional_line (p, wlen, fstart);
|
||||||
if (i != -2)
|
if (i != -2)
|
||||||
{
|
{
|
||||||
if (i == -1)
|
if (i == -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user