?RCS: $Id: inc_version_list.U,v $ ?RCS: ?RCS: Copyright (c) 2000 Andy Dougherty ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root ?RCS: of the source tree for dist 3.0. ?RCS: ?RCS: $Log: inc_version_list.U,v $ ?RCS: ?MAKE:inc_version_list inc_version_list_init: cat sed Getfile perl5 \ version api_versionstring rm Myread archname prefix sitelib_stem \ exe_ext ?MAKE: -pick add $@ %< ?Y:TOP ?S:inc_version_list: ?S: This variable specifies the list of subdirectories in over ?S: which perl.c:incpush() and lib/lib.pm will automatically ?S: search when adding directories to @INC. The elements in ?S: the list are separated by spaces. This is only useful ?S: if you have a perl library directory tree structured like the ?S: default one. See INSTALL for how this works. The versioned ?S: site_perl directory was introduced in 5.005, so that is the ?S: lowest possible value. ?S: ?S: This list includes architecture-dependent directories back to ?S: version $api_versionstring (e.g. 5.5.640) and ?S: architecture-independent directories all the way back to ?S: 5.005. ?S:. ?S:inc_version_list_init: ?S: This variable holds the same list as inc_version_list, but ?S: each item is enclosed in double quotes and separated by commas, ?S: suitable for use in the PERL_INC_VERSION_LIST initialization. ?S:. ?C:PERL_INC_VERSION_LIST: ?C: This variable specifies the list of subdirectories in over ?C: which perl.c:incpush() and lib/lib.pm will automatically ?C: search when adding directories to @INC, in a format suitable ?C: for a C initialization string. See the inc_version_list entry ?C: in Porting/Glossary for more details. ?C:. ?H:#define PERL_INC_VERSION_LIST $inc_version_list_init /**/ ?H:. ?T: stem d : Determine list of previous versions to include in @INC $cat > getverlist <> getverlist <<'EOPL' # Can't have leading @ because metaconfig interprets it as a command! ;@inc_version_list=(); # XXX Redo to do opendir/readdir? if (-d $stem) { chdir($stem); ;@candidates = glob("5.*"); } else { ;@candidates = (); } # XXX ToDo: These comparisons must be reworked when two-digit # subversions come along, so that 5.7.10 compares as greater than # 5.7.3! By that time, hope that 5.6.x is sufficiently # widespread that we can use the built-in version vectors rather # than reinventing them here. For 5.6.0, however, we must # assume this script will likely be run by 5.005_0x. --AD 1/2000. foreach $d (@candidates) { if ($d lt $version) { if ($d ge $api_versionstring) { unshift(@inc_version_list, grep { -d } "$d/$archname", $d); } elsif ($d ge "5.005") { unshift(@inc_version_list, grep { -d } $d); } } else { # Skip newer version. I.e. don't look in # 5.7.0 if we're installing 5.6.1. } } if (@inc_version_list) { print join(' ', @inc_version_list); } else { # Blank space to preserve value for next Configure run. print " "; } EOPL chmod +x getverlist case "$inc_version_list" in '') if test -x "$perl5$exe_ext"; then dflt=`$perl5 getverlist` else dflt='none' fi ;; $undef) dflt='none' ;; ?X: Configure -Dinc_version_list='5.6.0/$archname 5.6.0' ... *) eval dflt=\"$inc_version_list\" ;; esac case "$dflt" in ''|' ') dflt=none ;; esac case "$dflt" in 5.005) dflt=none ;; esac $cat <