1999-01-14 Tom Tromey <tromey@cygnus.com>
+ * automake.in (handle_configure): Compute $header_dir based on
+ $one_name, not $one_hdr. Reported by Erez Zadok. Fixes
+ confh2.test.
+ (handle_configure): Compute relative path to input header
+ correctly in all cases.
+
* automake.in (handle_tests): Avoid error messages from dejagnu
test rules. From Karl Heuer.
+* Run automake before libtool. It will report an error but
+ still won't put the file into the disty. This is wrong.
+ From Mark H Wilkinson <mhw@kremvax.demon.co.uk>
+
+* AM_CONFIG_HEADER might generate the wrong stamp file names
+ when given multiple headers. Write a test.
+
+* Currently don't correctly handle multiple inputs to a config header.
+
+* header stamp files still in wrong dirs.
+ stamp-h.in must be in dir with h.in file
+ stamp-h must be in dir with output file
+
* foo=bar
if cond
foo += joe
local ($one_fullname) = shift (@local_fullnames);
local ($one_name) = shift (@local_names);
$hdr_index += 1;
- local ($header_dir) = &dirname ($one_hdr);
+ local ($header_dir) = &dirname ($one_name);
# If the header is in the current directory we want to build
# the header here. Otherwise, if we're at the topmost
local ($ch_sans_dir, $cn_sans_dir, $stamp_dir);
if ($relative_dir eq $header_dir)
{
- $ch_sans_dir = &basename ($one_hdr);
$cn_sans_dir = &basename ($one_name);
$stamp_dir = '';
}
else
{
- $ch_sans_dir = $one_hdr;
$cn_sans_dir = $one_name;
if ($header_dir eq '.')
{
}
}
+ # Compute relative path from directory holding output
+ # header to directory holding input header. FIXME:
+ # doesn't handle case where we have multiple inputs.
+ if (&dirname ($one_hdr) eq $relative_dir)
+ {
+ $ch_sans_dir = &basename ($one_hdr);
+ }
+ else
+ {
+ local (@rel_out_path, $rel_path);
+ # FIXME this chunk of code should be its own sub.
+ # It is used elsewhere.
+ foreach (split (/\//, $relative_dir))
+ {
+ next if $_ eq '' || $_ eq '.';
+ if ($_ eq '..')
+ {
+ # FIXME: actually this is an error.
+ pop @rel_out_path;
+ }
+ else
+ {
+ push (@rel_out_path, '..');
+ }
+ }
+ if (@rel_out_path)
+ {
+ $ch_sans_dir = join ('/', @rel_out_path) . '/' . $one_hdr;
+ }
+ else
+ {
+ $ch_sans_dir = $one_hdr;
+ }
+ }
+
&require_file_with_conf_line ($config_header_line,
$FOREIGN, $ch_sans_dir);
$output_rules .= &file_contents_with_transform ($xform,
'remake-hdr');
- &create ("${relative_dir}/${stamp_dir}${stamp_name}.in");
+ local ($out_dir) = &dirname ($ch_sans_dir);
+ &create ("${relative_dir}/${out_dir}/${stamp_name}.in");
&require_file_with_conf_line ($config_header_line, $FOREIGN,
- "${stamp_dir}${stamp_name}.in");
+ "${out_dir}/${stamp_name}.in");
$distclean_config .= ' ' if $distclean_config;
$distclean_config .= $cn_sans_dir;