[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] Code cleanup after removal of option `--output-directory'.
From: |
Stefano Lattarini |
Subject: |
[PATCH 2/2] Code cleanup after removal of option `--output-directory'. |
Date: |
Thu, 18 Nov 2010 18:16:25 +0100 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
* 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.
---
ChangeLog | 6 ++++++
automake.in | 29 ++++++++++-------------------
2 files changed, 16 insertions(+), 19 deletions(-)
From de8ed9daed23df12cafab3d7059ba05189852754 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Thu, 18 Nov 2010 18:09:14 +0100
Subject: [PATCH 2/2] 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.
---
ChangeLog | 6 ++++++
automake.in | 29 ++++++++++-------------------
2 files changed, 16 insertions(+), 19 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 269df31..5898933 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2010-11-18 Stefano Lattarini <address@hidden>
+ 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.
diff --git a/automake.in b/automake.in
index 609e100..5c44767 100644
--- a/automake.in
+++ b/automake.in
@@ -330,10 +330,6 @@ my @config_headers = ();
# 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 = ();
@@ -8280,18 +8276,13 @@ sub generate_makefile ($$)
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 =
@@ -8310,25 +8301,25 @@ sub generate_makefile ($$)
# * 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;
}
--
1.7.1