summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-06-14 16:56:28 +0200
committerNicholas Clark <nick@ccl4.org>2013-07-02 13:56:13 +0200
commitf7b3892b9e45c6994685c9a625d3ea2b52642167 (patch)
tree4a10d69ac4865356044409f4ae003c7e0de78525
parent98962cf902fbf8857644cacbd32ddc075b71d5ab (diff)
downloadperl-f7b3892b9e45c6994685c9a625d3ea2b52642167.tar.gz
Add non-XS extensions to known_extensions.
Previously "known_extensions" was misnamed, as it only contained known XS extensions. grep.cpan.me suggests that there are only 10 mentions of it outside the core, and none of them rely on this existing behaviour. Update the descriptions of extensions, known_extensions and nonxs_ext in Porting/Glossary. These changes need replicating into configure.com.
-rwxr-xr-xConfigure19
-rw-r--r--Porting/Glossary16
-rw-r--r--win32/FindExt.pm6
3 files changed, 25 insertions, 16 deletions
diff --git a/Configure b/Configure
index dbccc28226..e4e7d81b1c 100755
--- a/Configure
+++ b/Configure
@@ -22353,10 +22353,10 @@ esac
: Check extensions
echo " "
echo "Looking for extensions..." >&4
-: If we are using the old config.sh, known_extensions may contain
-: old or inaccurate or duplicate values.
-known_extensions=''
+: If we are using the old config.sh, nonxs_extensions and xs_extensions may
+: contain old or inaccurate or duplicate values.
nonxs_extensions=''
+xs_extensions=''
: We do not use find because it might not be available.
: We do not just use MANIFEST because the user may have dropped
: some additional extensions into the source tree and expect them
@@ -22372,7 +22372,7 @@ find_extensions='
DynaLoader|dynaload) ;;
*)
this_ext=`echo $xxx | $sed -e s/-/\\\//g`;
- echo " $known_extensions $nonxs_extensions" > $$.tmp;
+ echo " $xs_extensions $nonxs_extensions" > $$.tmp;
if $contains " $this_ext " $$.tmp; then
echo >&4;
echo "Duplicate directories detected for extension $xxx" >&4;
@@ -22393,9 +22393,9 @@ find_extensions='
fi;
$ls -1 $xxx > $$.tmp;
if $contains "\.xs$" $$.tmp > /dev/null 2>&1; then
- known_extensions="$known_extensions $this_ext";
+ xs_extensions="$xs_extensions $this_ext";
elif $contains "\.c$" $$.tmp > /dev/null 2>&1; then
- known_extensions="$known_extensions $this_ext";
+ xs_extensions="$xs_extensions $this_ext";
elif $test -d $xxx; then
nonxs_extensions="$nonxs_extensions $this_ext";
fi;
@@ -22416,17 +22416,18 @@ cd "$rsrc/ext"
set X
shift
eval $find_extensions
-set X $known_extensions
+set X $xs_extensions
shift
-known_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '`
+xs_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '`
set X $nonxs_extensions
shift
nonxs_extensions=`echo "$*" | tr ' ' $trnl | $sort | tr $trnl ' '`
cd "$tdir"
+known_extensions=`echo $nonxs_extensions $xs_extensions | tr ' ' $trnl | $sort | tr $trnl ' '`
: Now see which are supported on this system.
avail_ext=''
-for xxx in $known_extensions ; do
+for xxx in $xs_extensions ; do
case "$xxx" in
DB_File|db_file)
case "$i_db" in
diff --git a/Porting/Glossary b/Porting/Glossary
index b57f990aac..1f5b8c92b4 100644
--- a/Porting/Glossary
+++ b/Porting/Glossary
@@ -2666,7 +2666,7 @@ expr (Loc.U):
extensions (Extensions.U):
This variable holds a list of all extension files (both XS and
- non-xs linked into the package. It is propagated to Config.pm
+ non-xs) installed with the package. It is propagated to Config.pm
and is typically used to test whether a particular extension
is available.
@@ -3620,8 +3620,12 @@ ivtype (perlxv.U):
This variable contains the C type used for Perl's IV.
known_extensions (Extensions.U):
- This variable holds a list of all XS extensions included in
- the package.
+ This variable holds a list of all extensions (both XS and non-xs)
+ included in the package source distribution. This information is
+ only really of use during the Perl build, as the list makes no
+ distinction between extensions which were build and installed, and
+ those which where not. See "extensions" for the list of extensions
+ actually built and available.
ksh (Loc.U):
This variable is defined but not used by Configure.
@@ -3990,8 +3994,10 @@ nm_so_opt (usenm.U):
Maybe Linux should just always set usenm=false.
nonxs_ext (Extensions.U):
- This variable holds a list of all non-xs extensions included
- in the package. All of them will be built.
+ This variable holds a list of all non-xs extensions built and
+ installed by the package. By default, all non-xs extensions
+ distributed will be built, with the exception of platform-specific
+ extensions (currently only one VMS specific extension).
nroff (Loc.U):
This variable is used internally by Configure to determine the
diff --git a/win32/FindExt.pm b/win32/FindExt.pm
index 2e4d6c1d40..41065d244d 100644
--- a/win32/FindExt.pm
+++ b/win32/FindExt.pm
@@ -92,8 +92,10 @@ sub _ext_ne {
}
*extensions = _ext_ne('known');
-# faithfully copy Configure in not including nonxs extensions for the nonce
-*known_extensions = _ext_ne('nonxs');
+
+sub known_extensions {
+ sort keys %ext;
+}
sub is_static
{