From: Stefano Lattarini Date: Fri, 16 Nov 2012 11:45:59 +0000 (+0100) Subject: maint: get rid of $perllibdir environment variable hack X-Git-Tag: v1.12.5~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4872dfe765470157af6276f7e9bd8c5d3f0e34eb;p=thirdparty%2Fautomake.git maint: get rid of $perllibdir environment variable hack That was needed when the automake-$APIVERSION and aclocal-$APIVERSION wrapper scripts used by the testsuite were shell script, rather than perl scripts acting as a thin layers. * aclocal.in (BEGIN): Update @INC based on the contents of the array '@Aclocal::perl_libdirs', rather than of the environment variable 'perllibdir'. * t/wrap/aclocal.in (BEGIN): Initialize '@Aclocal::perl_libdirs' rather than $ENV{'perllibdir'}. * automake.in (BEGIN): Update @INC based on the contents of the array '@Automake::perl_libdirs', rather than of the environment variable 'perllibdir'. * t/wrap/automake.in (BEGIN): Initialize '@Automake::perl_libdirs' rather than $ENV{'perllibdir'}. * NEWS: Update. Signed-off-by: Stefano Lattarini --- diff --git a/NEWS b/NEWS index 637723439..438ec6807 100644 --- a/NEWS +++ b/NEWS @@ -85,6 +85,12 @@ New in 1.12.5: the error possibly going unnoticed or triggering harder-to-diagnose fallout failures in later steps. +* Miscellaneous changes: + + - automake and aclocal no longer honours the 'perllibdir' environment + variable. That had always been intended only as an hack required in + the testsuite, not meant for any use beyond that. + Bugs fixed in 1.12.5: * Long-standing bugs: diff --git a/aclocal.in b/aclocal.in index e8855d554..8f02b0079 100644 --- a/aclocal.in +++ b/aclocal.in @@ -27,8 +27,9 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' BEGIN { - my $perllibdir = $ENV{'perllibdir'} || '@datadir@/@PACKAGE@-@APIVERSION@'; - unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir); + @Aclocal::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@') + unless @Aclocal::perl_libdirs; + unshift @INC, @Aclocal::perl_libdirs; } use strict; diff --git a/automake.in b/automake.in index 4c5ed2cc0..11c670a4e 100644 --- a/automake.in +++ b/automake.in @@ -29,8 +29,9 @@ package Language; BEGIN { - my $perllibdir = $ENV{'perllibdir'} || '@datadir@/@PACKAGE@-@APIVERSION@'; - unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir); + @Automake::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@') + unless @Automake::perl_libdirs; + unshift @INC, @Automake::perl_libdirs; # Override SHELL. This is required on DJGPP so that system() uses # bash, not COMMAND.COM which doesn't quote arguments properly. diff --git a/t/wrap/aclocal.in b/t/wrap/aclocal.in index a3defa930..ea3819a40 100644 --- a/t/wrap/aclocal.in +++ b/t/wrap/aclocal.in @@ -19,11 +19,9 @@ BEGIN { use strict; - my $libdir; - $libdir = '@abs_top_srcdir@/lib'; - $libdir = '@abs_top_builddir@/lib' . '@PATH_SEPARATOR@' . $libdir + @Aclocal::perl_libdirs = ('@abs_top_srcdir@/lib'); + unshift @Aclocal::perl_libdirs, '@abs_top_builddir@/lib' if '@srcdir@' ne '.'; - $ENV{perllibdir} = $libdir; unshift @ARGV, '--automake-acdir=@abs_top_srcdir@/m4', '--system-acdir=@abs_top_srcdir@/m4/acdir'; diff --git a/t/wrap/automake.in b/t/wrap/automake.in index 841736049..3302b3f17 100644 --- a/t/wrap/automake.in +++ b/t/wrap/automake.in @@ -19,11 +19,9 @@ BEGIN { use strict; - my $libdir; - $libdir = '@abs_top_srcdir@/lib'; - $libdir = '@abs_top_builddir@/lib' . '@PATH_SEPARATOR@' . $libdir + @Automake::perl_libdirs = ('@abs_top_srcdir@/lib'); + unshift @Automake::perl_libdirs, '@abs_top_builddir@/lib' if '@srcdir@' ne '.'; - $ENV{perllibdir} = $libdir; unshift @ARGV, '--libdir=@abs_top_srcdir@/lib'; } require '@abs_top_builddir@/automake';