}
- # read_am_file ($AMFILE, $WHERE)
- # ------------------------------
-# &read_am_file ($AMFILE, $WHERE, $RELDIR)
-# ----------------------------------------
++# read_am_file ($AMFILE, $WHERE, $RELDIR)
++# ---------------------------------------
# Read Makefile.am and set up %contents. Simultaneously copy lines
# from Makefile.am into $output_trailer, or define variables as
# appropriate. NOTE we put rules in the trailer section. We want
push_dist_common ("\$\(srcdir\)/$path");
$path = $relative_dir . "/" . $path if $relative_dir ne '.';
}
+ my $new_reldir = File::Spec->abs2rel ($path, $relative_dir);
+ $new_reldir = '.' if $new_reldir !~ s,/[^/]*$,,;
$where->push_context ("'$path' included from here");
- read_am_file ($path, $where);
- &read_am_file ($path, $where, $new_reldir);
++ read_am_file ($path, $where, $new_reldir);
$where->pop_context;
}
else
# We want to predefine as many variables as possible. This lets
# the user set them with '+=' in Makefile.am.
- &define_standard_variables;
+ define_standard_variables;
# Read user file, which might override some of our values.
- read_am_file ($amfile, new Automake::Location);
- &read_am_file ($amfile, new Automake::Location, '.');
++ read_am_file ($amfile, new Automake::Location, '.');
}