This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Subject: Re: dual-life: IO 1.25 and Scalar-List-Utils-1.21
authorH.Merijn Brand <merijn@nb09.procura.nl>
Mon, 29 Jun 2009 22:50:46 +0000 (00:50 +0200)
committerH.Merijn Brand <merijn@nb09.procura.nl>
Mon, 29 Jun 2009 22:50:46 +0000 (00:50 +0200)
From: Andy Dougherty <doughera@lafayette.edu>
Date: Mon, 29 Jun 2009 15:11:30 -0400 (EDT)
Message-ID: <alpine.DEB.2.00.0906291510110.28368@fractal.phys.lafayette.edu>

U/perl/Extensions.U

index 6fad56c..b9ad549 100644 (file)
@@ -12,7 +12,7 @@
        Myread hint usedl d_sem d_socket i_db i_dbm i_rpcsvcdbm i_gdbm \
        i_ndbm usethreads use5005threads package test cat rsrc \
        d_msg d_shm osname use64bitint i_langinfo d_nl_langinfo \
-       libs d_cplusplus sed
+       libs d_cplusplus sed ls rm contains
 ?MAKE: -pick add $@ %<
 ?Y:BOTTOM
 ?S:known_extensions:
@@ -81,11 +81,15 @@ find_extensions='
            this_ext=`echo $xxx | $sed -e s/-/\\\//g`;
            leaf=`echo $xxx | $sed -e s/.*-//`;
            if $test -d File-Glob; then
-               if $test -f $xxx/$leaf.xs -o -f $xxx/$leaf.c; then
+               $ls -1 $xxx > $$.tmp;
+               if $contains "\.xs$" $$.tmp > /dev/null 2>&1; then
+                   known_extensions="$known_extensions $this_ext";
+               elif $contains "\.c$" $$.tmp; then
                    known_extensions="$known_extensions $this_ext";
                elif $test -d $xxx; then
                    nonxs_extensions="$nonxs_extensions $this_ext";
-               fi
+               fi;
+               $rm -f $$.tmp;
            else
                if $test -f $xxx/$leaf.xs -o -f $xxx/$leaf.c; then
                    known_extensions="$known_extensions $1$this_ext";