mirror of
https://github.com/mirror/make.git
synced 2025-01-27 04:40:33 +08:00
bugfix for exported pattern-specific variables
This commit is contained in:
parent
29d78ddb28
commit
341312cc57
@ -1,3 +1,8 @@
|
||||
2004-09-27 Boris Kolpackov <boris@kolpackov.net>
|
||||
|
||||
* variable.c (initialize_file_variables): Mark pattern-specific
|
||||
variable as a per-target and copy export status.
|
||||
|
||||
2004-09-21 Boris Kolpackov <boris@kolpackov.net>
|
||||
|
||||
* file.c (snap_deps): Mark .PHONY prerequisites as targets.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2004-09-27 Boris Kolpackov <boris@kolpackov.net>
|
||||
|
||||
* scripts/features/patspecific_vars: Test exported variables.
|
||||
|
||||
2004-09-22 Paul D. Smith <psmith@gnu.org>
|
||||
|
||||
* run_make_tests.pl (run_make_test): Don't add newlines to the
|
||||
|
@ -61,4 +61,13 @@ $answer = "baz: foo two baz\nfour.x: foo two baz\n";
|
||||
$answer = "aaa bbb\nccc ddd\n";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
|
||||
# TEST #5 -- test pattern-specific exported variables
|
||||
#
|
||||
run_make_test('
|
||||
/%: export foo := foo
|
||||
|
||||
/bar:
|
||||
@test "$(foo)" == "$$foo"
|
||||
', '', '');
|
||||
|
||||
1;
|
||||
|
15
variable.c
15
variable.c
@ -493,10 +493,17 @@ initialize_file_variables (struct file *file, int reading)
|
||||
current_variable_set_list = file->pat_variables;
|
||||
|
||||
do
|
||||
/* We found one, so insert it into the set. */
|
||||
do_variable_definition (&p->variable.fileinfo, p->variable.name,
|
||||
p->variable.value, p->variable.origin,
|
||||
p->variable.flavor, 1);
|
||||
{
|
||||
/* We found one, so insert it into the set. */
|
||||
struct variable *v = do_variable_definition (
|
||||
&p->variable.fileinfo, p->variable.name,
|
||||
p->variable.value, p->variable.origin,
|
||||
p->variable.flavor, 1);
|
||||
|
||||
/* Also mark it as a per-target and copy export status. */
|
||||
v->per_target = p->variable.per_target;
|
||||
v->export = p->variable.export;
|
||||
}
|
||||
while ((p = lookup_pattern_var (p, file->name)) != 0);
|
||||
|
||||
current_variable_set_list = global;
|
||||
|
Loading…
Reference in New Issue
Block a user