mirror of
https://github.com/mirror/make.git
synced 2025-03-03 14:20:54 +08:00
* read.c (eval): [SV 47960] Skip record waiting files when ignoring.
* tests/scripts/features/conditionals: Test this scenario.
This commit is contained in:
parent
c73ed7dd1c
commit
e2ebea35f1
6
read.c
6
read.c
@ -724,9 +724,6 @@ eval (struct ebuffer *ebuf, int set_default)
|
|||||||
struct variable *v;
|
struct variable *v;
|
||||||
enum variable_origin origin = vmod.override_v ? o_override : o_file;
|
enum variable_origin origin = vmod.override_v ? o_override : o_file;
|
||||||
|
|
||||||
/* Variable assignment ends the previous rule. */
|
|
||||||
record_waiting_files ();
|
|
||||||
|
|
||||||
/* If we're ignoring then we're done now. */
|
/* If we're ignoring then we're done now. */
|
||||||
if (ignoring)
|
if (ignoring)
|
||||||
{
|
{
|
||||||
@ -735,6 +732,9 @@ eval (struct ebuffer *ebuf, int set_default)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Variable assignment ends the previous rule. */
|
||||||
|
record_waiting_files ();
|
||||||
|
|
||||||
if (vmod.undefine_v)
|
if (vmod.undefine_v)
|
||||||
{
|
{
|
||||||
do_undefine (p, origin, ebuf);
|
do_undefine (p, origin, ebuf);
|
||||||
|
@ -141,6 +141,22 @@ all: ; @:',
|
|||||||
'',
|
'',
|
||||||
'success');
|
'success');
|
||||||
|
|
||||||
|
# SV 47960 : ensure variable assignments in non-taken legs don't cause problems
|
||||||
|
run_make_test('
|
||||||
|
ifneq ($(FOO),yes)
|
||||||
|
target:
|
||||||
|
else
|
||||||
|
BAR = bar
|
||||||
|
target:
|
||||||
|
endif
|
||||||
|
@echo one
|
||||||
|
',
|
||||||
|
'', "one\n");
|
||||||
|
|
||||||
|
|
||||||
# This tells the test driver that the perl test script executed properly.
|
# This tells the test driver that the perl test script executed properly.
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
### Local Variables:
|
||||||
|
### eval: (setq whitespace-action (delq 'auto-cleanup whitespace-action))
|
||||||
|
### End:
|
||||||
|
Loading…
Reference in New Issue
Block a user