Changeset 1458 in kBuild
- Timestamp:
- Mar 30, 2008 10:16:15 PM (17 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/expand.c
r1440 r1458 518 518 char *result; 519 519 struct variable_set_list *save; 520 const struct floc *reading_file_saved; 520 521 521 522 if (file == 0) … … 524 525 save = current_variable_set_list; 525 526 current_variable_set_list = file->variables; 527 reading_file_saved = reading_file; 526 528 if (file->cmds && file->cmds->fileinfo.filenm) 527 529 reading_file = &file->cmds->fileinfo; … … 530 532 result = variable_expand_string (o, line, (long)-1); 531 533 current_variable_set_list = save; 532 reading_file = 0;534 reading_file = reading_file_saved; 533 535 534 536 return result; -
trunk/src/kmk/function.c
r1452 r1458 1552 1552 int var_ctx; 1553 1553 size_t off; 1554 const struct floc *reading_file_saved = reading_file; 1554 1555 1555 1556 /* Make a copy of the value to the variable buffer since … … 1568 1569 if (var_ctx) 1569 1570 push_new_variable_scope (); 1571 if (v->fileinfo.filenm) 1572 reading_file = &v->fileinfo; 1570 1573 1571 1574 eval_buffer (o); 1572 1575 1576 reading_file = reading_file_saved; 1573 1577 if (var_ctx) 1574 1578 pop_variable_scope (); … … 4197 4201 else 4198 4202 { 4203 const struct floc *reading_file_saved = reading_file; 4204 4199 4205 if (!strcmp (funcname, "evalcall")) 4200 4206 { … … 4205 4211 o = variable_buffer_output (o, v->value, v->value_length + 1); 4206 4212 o = variable_buffer + off; 4213 if (v->fileinfo.filenm) 4214 reading_file = &v->fileinfo; 4207 4215 } 4208 4216 else … … 4218 4226 eval_buffer (o); 4219 4227 restore_variable_buffer (buf, len); 4228 reading_file = reading_file_saved; 4220 4229 } 4221 4230 #endif /* CONFIG_WITH_EVALPLUS */
Note:
See TracChangeset
for help on using the changeset viewer.