2010-11-20 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Code cleanup after removal of option `--output-directory'.
+ * automake.in ($output_directory): Remove, it's unconditionally
+ defined to `.' and used only ...
+ (generate_makefile): ... in this subroutine, which now has been
+ edited and simplified accordingly.
+
Remove obsolete automake option `--output-directory'.
This option has been deprecated since version 1.7 (2002/2003).
* automake.in ($output_directory): Define to `.' unconditionally.
# Names used in AC_CONFIG_LINKS call.
my @config_links = ();
-# Directory where output files go. Actually, output files are
-# relative to this directory.
-my $output_directory = '.';
-
# List of Makefile.am's to process, and their corresponding outputs.
my @input_files = ();
my %output_files = ();
check_typos;
- my ($out_file) = $output_directory . '/' . $makefile_in;
-
if ($exit_code != 0)
{
- verb "not writing $out_file because of earlier errors";
+ verb "not writing $makefile_in because of earlier errors";
return;
}
- if (! -d ($output_directory . '/' . $am_relative_dir))
- {
- mkdir ($output_directory . '/' . $am_relative_dir, 0755);
- }
+ mkdir ($am_relative_dir, 0755) if ! -d $am_relative_dir;
# We make sure that `all:' is the first target.
my $output =
# * other dependencies, specific to the Makefile.am being processed
# (such as the Makefile.am itself, or any Makefile fragment
# it includes).
- my $timestamp = mtime $out_file;
+ my $timestamp = mtime $makefile_in;
if (! $force_generation
&& $configure_deps_greatest_timestamp < $timestamp
&& $output_deps_greatest_timestamp < $timestamp
- && $output eq contents ($out_file))
+ && $output eq contents ($makefile_in))
{
- verb "$out_file unchanged";
+ verb "$makefile_in unchanged";
# No need to update.
return;
}
- if (-e $out_file)
+ if (-e $makefile_in)
{
- unlink ($out_file)
- or fatal "cannot remove $out_file: $!";
+ unlink ($makefile_in)
+ or fatal "cannot remove $makefile_in: $!";
}
- my $gm_file = new Automake::XFile "> $out_file";
- verb "creating $out_file";
+ my $gm_file = new Automake::XFile "> $makefile_in";
+ verb "creating $makefile_in";
print $gm_file $output;
}