]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
cleanup: get rid of 'Automake::Configure_ac' module
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 25 May 2012 15:51:01 +0000 (17:51 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 26 May 2012 08:22:48 +0000 (10:22 +0200)
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>
Makefile.am
aclocal.in
automake.in
lib/Automake/Configure_ac.pm [deleted file]

index 60d5ab7322797583919469fc9c76c9a60cbb850b..4cfdd10f4a5d6532c4703cff73cac81009013a7e 100644 (file)
@@ -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 \
index f3b6e6a35959be449571398613a7f33068c076b3..28e2218f2e9074feb577b3ebd5db6baef884d0c4 100644 (file)
@@ -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
index 5ba22f7b954cac034f635c51a633c726825a42be..eeafd295bacba1fbc75f47344f529c2fe532415f 100644 (file)
@@ -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 (file)
index e53913a..0000000
+++ /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: