patch for pp_foo -> Perl_pp_foo changes from Vishal Bhatia;
[p5sagit/p5-mst-13.2.git] / ext / util / make_ext
index 54caf7d..9afbbcc 100644 (file)
@@ -75,7 +75,7 @@ makefile=Makefile
 makeargs=''
 makeopts=''
 
-if test ! -d "ext/$pname"; then
+if test ! -d "$src/ext/$pname"; then
     echo "     Skipping $extspec (directory does not exist)"
     exit 0 # not an error ?
 fi
@@ -83,6 +83,11 @@ fi
 
 echo " Making $mname ($target)"
 
+mkdir ext        2>/dev/null
+mkdir ext/$pname 2>/dev/null
+if test ! -f ext/$pname/Makefile.PL; then
+  cat $src/ext/$pname/Makefile.PL > ext/$pname/Makefile.PL
+fi
 cd ext/$pname
 
 # check link type and do any preliminaries
@@ -116,7 +121,7 @@ nonxs)      makeargs="";
 esac
 
 if test ! -f $makefile ; then
-       test -f Makefile.PL && ../$depth/miniperl -I../$depth/lib Makefile.PL INSTALLDIRS=perl $passthru
+       test -f Makefile.PL && ../$depth/miniperl -I../$depth/lib -I$src/lib Makefile.PL INSTALLDIRS=perl $passthru
 fi
 if test ! -f $makefile ; then
        if test -f Makefile.SH; then