From: Nathan Kurz Date: Sat, 12 Jun 1999 01:26:04 +0000 (-0500) Subject: Allow for deep ext directories. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7e791ca9f31e269ac77d3bfde8f40ad9f3d38c6f;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/Configure b/Configure index 22f6dd8..718b576 100755 --- a/Configure +++ b/Configure @@ -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$$ <&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="$*"