diff options
author | Nathan Kurz <nate@valleytel.net> | 1999-06-11 20:26:04 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-07-06 10:43:20 +0000 |
commit | 7e791ca9f31e269ac77d3bfde8f40ad9f3d38c6f (patch) | |
tree | 80951e3265d823969522064677c63c35c6c7e3b6 | |
parent | cad2e5aadfceb1a406f657488ea1c699f44a1487 (diff) | |
download | perl-7e791ca9f31e269ac77d3bfde8f40ad9f3d38c6f.tar.gz |
Allow for deep ext directories.
Subject: [ID 19990612.001 compiling three deep modules within ext/]
ply-To: nate@valleytel.net
erl5-porters@perl.org
Message-Id: <199906120626.BAA04996@trinkpad.valleytel.net>
p4raw-id: //depot/cfgperl@3613
-rwxr-xr-x | Configure | 56 |
1 files changed, 29 insertions, 27 deletions
@@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Tue Jul 6 11:02:34 EET DST 1999 [metaconfig 3.0 PL70] +# Generated on Tue Jul 6 13:40:46 EET DST 1999 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <<EOF @@ -12646,8 +12646,6 @@ eval $setvar echo " " echo "Looking for extensions..." >&4 -tdir=`pwd` -cd $rsrc/ext : If we are using the old config.sh, known_extensions may contain : old or inaccurate or duplicate values. known_extensions='' @@ -12656,30 +12654,34 @@ nonxs_extensions='' : We do not just use MANIFEST because the user may have dropped : some additional extensions into the source tree and expect them : to be built. -for xxx in * ; do - case "$xxx" in - DynaLoader|dynaload) ;; - *) if $test -f $xxx/$xxx.xs; then - known_extensions="$known_extensions $xxx" - elif $test -f $xxx/Makefile.PL; then - nonxs_extensions="$nonxs_extensions $xxx" - else - if $test -d $xxx; then - # Look for nested extensions, eg. Devel/Dprof. - cd $xxx - for yyy in * ; do - if $test -f $yyy/$yyy.xs; then - known_extensions="$known_extensions $xxx/$yyy" - elif $test -f $yyy/Makefile.PL; then - nonxs_extensions="$nonxs_extensions $xxx/$yyy" - fi - done - cd .. - fi - fi - ;; - esac -done + +: Function to recursively find available extensions, ignoring DynaLoader +: NOTE: recursion limit of 10 to prevent runaway in case of symlink madness +find_extensions=' + for xxx in *; do + case "$xxx" in + DynaLoader|dynaload) ;; + *) + if $test -f $xxx/$xxx.xs; then + known_extensions="$known_extensions $1$xxx"; + elif $test -f $xxx/Makefile.PL; then + nonxs_extensions="$nonxs_extensions $1$xxx"; + else + if $test -d $xxx -a $# -lt 10; then + set $1$xxx/ $*; + cd $xxx; + eval $find_extensions; + cd ..; + shift; + fi + fi + ;; + esac + done' +tdir=`pwd` +cd $rsrc/ext +set -- +eval $find_extensions set X $nonxs_extensions shift nonxs_extensions="$*" |