From e4e6ce3175894474dc881704271d40ce7e226694 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 9 Apr 2001 09:02:36 +0000 Subject: [PATCH] * automake.in (&generate_makefile) Use macro_define to define SOURCES and OBJECTS. (&variable_defined): Don't check for $conditional{VAR}{COND} as this would make perl create $condition{VAR}, which we don't want. --- ChangeLog | 7 +++++++ automake.in | 45 ++++++++++++++++++++++++++------------------- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index f9cfaace..4449742f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-04-09 Akim Demaille + + * automake.in (&generate_makefile) Use macro_define to define + SOURCES and OBJECTS. + (&variable_defined): Don't check for $conditional{VAR}{COND} as + this would make perl create $condition{VAR}, which we don't want. + 2001-04-09 Akim Demaille * automake.in (&variable_defined, &define_pretty_variable): diff --git a/automake.in b/automake.in index 153401e9..4512a7b5 100755 --- a/automake.in +++ b/automake.in @@ -1070,8 +1070,10 @@ sub generate_makefile # Re-init SOURCES and OBJECTS. FIXME: other code shouldn't depend # on this (but currently does). - $conditional{'SOURCES'}{'TRUE'} = join (' ', @sources); - $conditional{'OBJECTS'}{'TRUE'} = join (' ', @objects); + macro_define ('SOURCES', 1, '', 'TRUE', + join (' ', @sources), 'internal'); + macro_define ('OBJECTS', 1, '', 'TRUE', + join (' ', @objects), 'internal'); &define_pretty_variable ('DIST_SOURCES', '', @dist_sources); &handle_multilib; @@ -5694,25 +5696,30 @@ sub variable_defined ($$) $cond ||= 'TRUE'; - if (!$var_is_am{$var}) - { - if (!exists $conditional{$var}{$cond}) - { - # The variable is not defined for the given condition. - return 0; - } - - # Even a conditional examination is good enough for us. FIXME: - # really should maintain examined status on a per-condition - # basis. - $content_seen{$var} = 1; - return 1; - } + # Unfortunately we can't just check for $conditional{VAR}{COND} + # as this would make perl create $condition{VAR}, which we + # don't want. + if (!exists $conditional{$var}) + { + if (defined $targets{$var}) + { + &am_line_error ($var, "`$var' is a target; expected a variable") + } + # The variable is not defined + return 0; + } - &am_line_error ($var, "`$var' is a target; expected a variable") - if defined $targets{$var}; + if ($var_is_am{$var} + || !exists $conditional{$var}{$cond}) + { + # The variable is not defined for the given condition. + return 0; + } - return 0; + # Even a conditional examination is good enough for us. FIXME: + # really should maintain examined status on a per-condition basis. + $content_seen{$var} = 1; + return 1; } # Mark a variable as examined. -- 2.43.5