This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Tweaking the order of op creation/op free in Perl_ck_require to Larry's
[perl5.git] / ext / util / make_ext
index 9afbbcc..8bcd7d8 100644 (file)
@@ -75,7 +75,7 @@ makefile=Makefile
 makeargs=''
 makeopts=''
 
-if test ! -d "$src/ext/$pname"; then
+if test ! -d "ext/$pname"; then
     echo "     Skipping $extspec (directory does not exist)"
     exit 0 # not an error ?
 fi
@@ -83,23 +83,21 @@ 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
+# check link type and do any preliminaries.  Valid link types are
+# 'dynamic', 'static', and 'static_pic' (the last one respects
+# CCCDLFLAGS such as -fPIC -- see static_target in the main Makefile.SH)
 case "$target" in
-           # convert 'static' or 'dynamic' into 'all LINKTYPE=XXX'
+dynamic)    makeargs="LINKTYPE=dynamic";
+           target=all
+           ;;
 static)     makeargs="LINKTYPE=static CCCDLFLAGS="
            target=all
            ;;
-dynamic)    makeargs="LINKTYPE=dynamic";
+static_pic) makeargs="LINKTYPE=static"
            target=all
            ;;
-
 nonxs)      makeargs="";
            target=all
            ;;
@@ -121,7 +119,7 @@ nonxs)      makeargs="";
 esac
 
 if test ! -f $makefile ; then
-       test -f Makefile.PL && ../$depth/miniperl -I../$depth/lib -I$src/lib Makefile.PL INSTALLDIRS=perl $passthru
+       test -f Makefile.PL && ../$depth/miniperl -I../$depth/lib Makefile.PL INSTALLDIRS=perl PERL_CORE=1 $passthru
 fi
 if test ! -f $makefile ; then
        if test -f Makefile.SH; then