+2001-04-09 Akim Demaille <akim@epita.fr>
+
+ * 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 <akim@epita.fr>
* automake.in (&variable_defined, &define_pretty_variable):
# 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;
$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.