summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-05-25 17:51:01 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-05-26 10:22:48 +0200
commitee6d72a6c823dc9dad8d7712608ccae1e2e9b6a0 (patch)
treeeb72cd957330686282451ebf07f95dbeeb7f97a1
parentb89258d708b2bb7960834c521a285bb42d4a404b (diff)
downloadautomake-ee6d72a6c823dc9dad8d7712608ccae1e2e9b6a0.tar.gz
cleanup: get rid of 'Automake::Configure_ac' module
Now that we unconditionally assume the Autoconf input is named configure.ac, it's easier and clearer to inline the checks on the existence of such a file directly in the automake and aclocal scripts. * automake.in (Automake::Configure_ac): Drop this import. (Main code): Check the existence of configure.ac directly, instead of calling the noe-removed 'require_configure_ac' function. * aclocal.in: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
-rw-r--r--Makefile.am1
-rw-r--r--aclocal.in4
-rw-r--r--automake.in3
-rw-r--r--lib/Automake/Configure_ac.pm107
4 files changed, 3 insertions, 112 deletions
diff --git a/Makefile.am b/Makefile.am
index 60d5ab732..4cfdd10f4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -189,7 +189,6 @@ dist_perllib_DATA = \
lib/Automake/ChannelDefs.pm \
lib/Automake/Channels.pm \
lib/Automake/Condition.pm \
- lib/Automake/Configure_ac.pm \
lib/Automake/DisjConditions.pm \
lib/Automake/FileUtils.pm \
lib/Automake/General.pm \
diff --git a/aclocal.in b/aclocal.in
index f3b6e6a35..28e2218f2 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -35,7 +35,6 @@ use strict;
use Automake::Config;
use Automake::General;
-use Automake::Configure_ac;
use Automake::Channels;
use Automake::ChannelDefs;
use Automake::XFile;
@@ -1038,7 +1037,8 @@ sub parse_ACLOCAL_PATH ()
parse_WARNINGS; # Parse the WARNINGS environment variable.
parse_arguments;
parse_ACLOCAL_PATH;
-require_configure_ac;
+
+fatal "$configure_ac is required" unless -f $configure_ac;
# We may have to rerun aclocal if some file have been installed, but
# it should not happen more than once. The reason we must run again
diff --git a/automake.in b/automake.in
index 5ba22f7b9..eeafd295b 100644
--- a/automake.in
+++ b/automake.in
@@ -144,7 +144,6 @@ use Automake::General;
use Automake::XFile;
use Automake::Channels;
use Automake::ChannelDefs;
-use Automake::Configure_ac;
use Automake::FileUtils;
use Automake::Location;
use Automake::Condition qw/TRUE FALSE/;
@@ -8007,7 +8006,7 @@ parse_WARNINGS;
# Parse command line.
parse_arguments;
-require_configure_ac;
+fatal "$configure_ac is required" unless -f $configure_ac;
# Do configure.ac scan only once.
scan_autoconf_files;
diff --git a/lib/Automake/Configure_ac.pm b/lib/Automake/Configure_ac.pm
deleted file mode 100644
index e53913a5c..000000000
--- a/lib/Automake/Configure_ac.pm
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-###############################################################
-# The main copy of this file is in Automake's git repository. #
-# Updates should be sent to automake-patches@gnu.org. #
-###############################################################
-
-package Automake::Configure_ac;
-
-use 5.006;
-use strict;
-use Exporter;
-use Automake::Channels;
-use Automake::ChannelDefs;
-
-use vars qw (@ISA @EXPORT);
-
-@ISA = qw (Exporter);
-@EXPORT = qw (&find_configure_ac &require_configure_ac);
-
-=head1 NAME
-
-Automake::Configure_ac - Locate configure.ac or configure.in.
-
-=head1 SYNOPSIS
-
- use Automake::Configure_ac;
-
- # Try to locate configure.in or configure.ac in the current
- # directory. It may be absent. Complain if both files exist.
- my $file_name = find_configure_ac;
-
- # Likewise, but bomb out if the file does not exist.
- my $file_name = require_configure_ac;
-
- # Likewise, but in $dir.
- my $file_name = find_configure_ac ($dir);
- my $file_name = require_configure_ac ($dir);
-
-=over 4
-
-=back
-
-=head2 Functions
-
-=over 4
-
-=item C<$configure_ac = find_configure_ac ([$directory])>
-
-Find a F<configure.ac> or F<configure.in> file in C<$directory>,
-defaulting to the current directory. Complain if both files are present.
-Return the name of the file found, or the former if neither is present.
-
-=cut
-
-sub find_configure_ac (;@)
-{
- my ($directory) = @_;
- $directory ||= '.';
- return File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.ac'));
-}
-
-
-=item C<$configure_ac = require_configure_ac ([$directory])>
-
-Like C<find_configure_ac>, but fail if neither is present.
-
-=cut
-
-sub require_configure_ac (;$)
-{
- my $res = find_configure_ac (@_);
- fatal "'configure.ac' is required" unless -f $res;
- return $res
-}
-
-1;
-
-### Setup "GNU" style for perl-mode and cperl-mode.
-## Local Variables:
-## perl-indent-level: 2
-## perl-continued-statement-offset: 2
-## perl-continued-brace-offset: 0
-## perl-brace-offset: 0
-## perl-brace-imaginary-offset: 0
-## perl-label-offset: -2
-## cperl-indent-level: 2
-## cperl-brace-offset: 0
-## cperl-continued-brace-offset: 0
-## cperl-label-offset: -2
-## cperl-extra-newline-before-brace: t
-## cperl-merge-trailing-else: nil
-## cperl-continued-statement-offset: 2
-## End: