automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: require Perl 5.6


From: Alexandre Duret-Lutz
Subject: FYI: require Perl 5.6
Date: Sun, 26 Sep 2004 23:11:05 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

I'm checking this in (on HEAD, of course).

More discussion about this here:
  http://sources.redhat.com/ml/automake/2004-02/msg00073.html

There are more 5.005->5.6 cleanup to do in the lib/Automake/*.pm
files that are not shared with Autoconf.  (I believe it won't be
a problem to require 5.6 for Autoconf too, but since I'm longing
for 2.60 I don't want to do anything that may delay the
release.)

2004-09-26  Alexandre Duret-Lutz  <address@hidden>

        * configure.ac: Require Perl 5.6.
        * lib/Automake/Config.in: Require Perl 5.6 (not done in
        lib/Automake/General.pm because it is shared with Autoconf), 
        and use `our' instead of `use vars'.
        * aclocal.in (rel2abs): Remove.
        (scan_configure_dep): Use File::Spec->rel2abs instead.

Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.286
diff -u -r1.286 NEWS
--- NEWS        3 Aug 2004 23:02:53 -0000       1.286
+++ NEWS        26 Sep 2004 20:56:15 -0000
@@ -2,6 +2,8 @@
 
   - Autoconf 2.59a is required.
 
+  - Perl 5.6 or greater is required.
+
   - The new AC_REQUIRE_AUX_FILE Autoconf macro is supported.
 
   - The rebuild rules for distributed Yacc and Lex output will avoid
Index: aclocal.in
===================================================================
RCS file: /cvs/automake/automake/aclocal.in,v
retrieving revision 1.106
diff -u -r1.106 aclocal.in
--- aclocal.in  19 Sep 2004 11:46:40 -0000      1.106
+++ aclocal.in  26 Sep 2004 20:56:15 -0000
@@ -201,25 +201,6 @@
     &add_file ($map{$macro});
 }
 
-# rel2abs ($file, $directory)
-# ---------------------------
-# Similar to File::Spec->rel2abs ($file, $directory), but
-# work with Perl 5.005.  (File::Spec->rel2abs is available
-# only in Perl 5.6.)
-# Remove this once we require 5.6.
-sub rel2abs ($$)
-{
-  my ($file, $dir) = @_;
-  if (! File::Spec->file_name_is_absolute ($file))
-    {
-      $dir = cwd () . "/$dir"
-       unless File::Spec->file_name_is_absolute ($dir);
-      $file = "$dir/$file";
-    }
-  $file = File::Spec->canonpath ($file);
-  return $file;
-}
-
 # scan_configure_dep ($file)
 # --------------------------
 # Scan a configure dependency (configure.ac, or separate m4 files)
@@ -276,7 +257,7 @@
 
   add_macro ($_) foreach (@rlist);
   my $dirname = dirname $file;
-  &scan_configure_dep (rel2abs ($_, $dirname)) foreach (@ilist);
+  &scan_configure_dep (File::Spec->rel2abs ($_, $dirname)) foreach (@ilist);
 }
 
 # Add a file to output.
Index: configure.ac
===================================================================
RCS file: /cvs/automake/automake/configure.ac,v
retrieving revision 1.23
diff -u -r1.23 configure.ac
--- configure.ac        11 Aug 2004 21:20:47 -0000      1.23
+++ configure.ac        26 Sep 2004 20:56:17 -0000
@@ -56,8 +56,11 @@
 if test -z "$PERL"; then
    AC_MSG_ERROR([perl not found])
 fi
-$PERL -e 'require 5.005;' || {
-   AC_MSG_ERROR([perl 5.005 or better is required])
+$PERL -e 'require 5.006;' || {
+   AC_MSG_ERROR(
+[perl 5.6 or better is required.  If you have several perl
+versions installed, select the one Automake should use using
+  ./configure PERL=/path/to/perl])
 }
 
 # The test suite will skip some tests if tex is absent.
Index: lib/Automake/Config.in
===================================================================
RCS file: /cvs/automake/automake/lib/Automake/Config.in,v
retrieving revision 1.3
diff -u -r1.3 Config.in
--- lib/Automake/Config.in      25 Dec 2003 18:09:01 -0000      1.3
+++ lib/Automake/Config.in      26 Sep 2004 20:56:25 -0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2003  Free Software Foundation, Inc.      -*- Perl -*-
+# Copyright (C) 2003, 2004  Free Software Foundation, Inc.      -*- Perl -*-
 # @configure_input@
 
 # This program is free software; you can redistribute it and/or modify
@@ -19,20 +19,18 @@
 package Automake::Config;
 use strict;
 
+use 5.006;
 require Exporter;
-use vars qw (@ISA @EXPORT);
 
address@hidden = qw (Exporter);
address@hidden = qw ($APIVERSION $PACKAGE $VERSION $libdir);
-
-use vars qw ($APIVERSION $PACKAGE $VERSION $libdir);
+our @ISA = qw (Exporter);
+our @EXPORT = qw ($APIVERSION $PACKAGE $VERSION $libdir);
 
 # Parameters set by configure.  Not to be changed.  NOTE: assign
 # VERSION as string so that e.g. version 0.30 will print correctly.
-$APIVERSION = '@APIVERSION@';
-$PACKAGE = '@PACKAGE@';
-$VERSION = '@VERSION@';
-$libdir = '@datadir@/@address@hidden@APIVERSION@';
+our $APIVERSION = '@APIVERSION@';
+our $PACKAGE = '@PACKAGE@';
+our $VERSION = '@VERSION@';
+our $libdir = '@datadir@/@address@hidden@APIVERSION@';
 
 1;;
 

-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]