+2001-01-29 Akim Demaille <akim@epita.fr>
+
+ * automake.in (get_object_extension) <$default_includes>: New.
+ Use it and &transform.
+
2001-01-28 Tom Tromey <tromey@redhat.com>
* automake.in (variable_value_as_list_worker): Handle entries in
return 0;
}
+
+# get_object_extension ($OUT)
+# ---------------------------
# Return object extension. Just once, put some code into the output.
-# Argument is the name of the output file
+# OUT is the name of the output file
sub get_object_extension
{
local ($out) = @_;
if (! $included_generic_compile)
{
# Boilerplate.
- local ($xform) = '';
+ local ($default_include) = '';
if (! defined $options{'nostdinc'})
{
- $xform = ' -I. -I\$(srcdir)';
+ $default_include = ' -I. -I$(srcdir)';
if (&variable_defined ('CONFIG_HEADER'))
{
foreach $one_hdr (split (' ',
&variable_value ('CONFIG_HEADER')))
{
- local ($var);
- ($var = &dirname ($one_hdr)) =~ s/(\W)/\\$1/g;
- $xform .= ' -I' . $var;
+ $default_include .= ' -I' . &dirname ($one_hdr);
}
}
}
- $xform = 's/\@DEFAULT_INCLUDES\@/' . $xform . '/go;';
+ local ($xform) = &transform ('DEFAULT_INCLUDES' => $default_include);
$output_vars .= &file_contents_with_transform ($xform,
'comp-vars');