]> sourceware.org Git - automake.git/commitdiff
* aclocal.in: Use Automake::General and Automake::XFile.
authorAkim Demaille <akim@epita.fr>
Mon, 15 Oct 2001 07:51:48 +0000 (07:51 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 15 Oct 2001 07:51:48 +0000 (07:51 +0000)
Use find_configure_ac.
Output the Emacs tags for Autoconf mode selection.

ChangeLog
aclocal.in
lib/am/Makefile.in
tests/Makefile.in

index e56d47289323bf5cc2dffe44f74afd3da5c36429..d9f9b60b46d5bf29420eb66378d90441f6467546 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-15  Akim Demaille  <akim@epita.fr>
+
+       * aclocal.in: Use Automake::General and Automake::XFile.
+       Use find_configure_ac.
+       Output the Emacs tags for Autoconf mode selection.
+
 2001-10-10  Akim Demaille  <akim@epita.fr>
 
        * lib/COPYING, COPYING, lib/config.guess, lib/config.sub: Update
index b04ebaab1250bf8afdf2588e7f80337c902ab0f5..585f18bf68b0d3192e3e03c6057c91341b394ec1 100644 (file)
@@ -2,6 +2,9 @@
 # -*- perl -*-
 # @configure_input@
 
+eval 'exec @PERL@ -S $0 ${1+"$@"}'
+    if 0;
+
 # aclocal - create aclocal.m4 by scanning configure.ac
 # Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 
 # Written by Tom Tromey <tromey@cygnus.com>.
 
-eval 'exec @PERL@ -S $0 ${1+"$@"}'
-    if 0;
+BEGIN
+{
+  my $prefix = "@prefix@";
+  my $perllibdir = $ENV{'perllibdir'} || "@datadir@/@PACKAGE@";
+  unshift @INC, "$perllibdir";
+}
 
-# aclocal - scan configure.ac and generate aclocal.m4.
+use Automake::General;
+use Automake::XFile;
 
 # Some constants.
 $VERSION = "@VERSION@";
@@ -40,7 +48,7 @@ $acdir = "@datadir@/aclocal";
 $exit_status = 0;
 
 # Name of the top autoconf input: `configure.ac' or `configure.in'.
-$configure_ac = '';
+$configure_ac = find_configure_ac;
 
 # Text to output.
 $output = '';
@@ -216,13 +224,6 @@ sub parse_arguments
 
 sub scan_configure
 {
-    warn "aclocal: both `configure.ac' and `configure.in' present:"
-         . " ignoring `configure.in'\n"
-        if -f 'configure.ac' && -f 'configure.in';
-    $configure_ac = 'configure.in'
-        if -f 'configure.in';
-    $configure_ac = 'configure.ac'
-        if -f 'configure.ac';
     die "aclocal: `configure.ac' or `configure.in' is required\n"
         if !$configure_ac;
 
@@ -407,10 +408,9 @@ sub scan_file
 {
     local ($file) = @_;
 
-    open (FILE, $file)
-       || die "aclocal: couldn't open `$file': $!\n";
-    local ($contents) = '';
-    while (<FILE>)
+    my $fh = new Automake::XFile $file;
+    my $contents = '';
+    while ($_ = $fh->getline)
     {
        # Ignore `##' lines.
        next if /^##/;
@@ -433,7 +433,6 @@ sub scan_file
            print STDERR "aclocal: found macro $1 in $file: $.\n" if $verbose;
        }
     }
-    close (FILE);
 
     return $contents;
 }
@@ -447,17 +446,10 @@ sub write_aclocal
 
     print STDERR "aclocal: writing $output_file\n" if $verbose;
 
-    open (ACLOCAL, "> " . $output_file)
-       || die "aclocal: couldn't open `$output_file' for writing: $!\n";
-
-    # In case we're running under MSWindows, don't write with CRLF.
-    # (This circumvents a bug in at least Cygwin bash where the shell
-    # parsing fails on lines ending with the continuation character '\'
-    # and CRLF.)
-    binmode ACLOCAL;
+    my $out = new Automake::XFile "> $output_file";
+    print $out
+"# $output_file generated automatically by aclocal $VERSION -*- Autoconf -*-
 
-    print ACLOCAL "# $output_file generated automatically by aclocal $VERSION\n";
-    print ACLOCAL "\
 # Copyright 1996, 1997, 1998, 1999, 2000, 2001
 # Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -469,7 +461,5 @@ sub write_aclocal
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-";
-    print ACLOCAL $output;
-    close (ACLOCAL);
+$output";
 }
index cb7ae92d5adc37a1c2b64efa0869bc073b24f82e..eb25af63607af6e60ef958545c20cc8d94fec8d8 100644 (file)
@@ -43,6 +43,7 @@ AUTOCONF = @AUTOCONF@
 AUTOMAKE = @AUTOMAKE@
 AUTOHEADER = @AUTOHEADER@
 
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
index 93d43052b5e0cef9fd62f865b8c9c4d56f870f3e..3d994a590881ea7a684b048d34ea4ebd0f20f22e 100644 (file)
@@ -43,6 +43,7 @@ AUTOCONF = @AUTOCONF@
 AUTOMAKE = @AUTOMAKE@
 AUTOHEADER = @AUTOHEADER@
 
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
This page took 0.034475 seconds and 5 git commands to generate.