summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/DB_File/Makefile.PL2
-rw-r--r--ext/DB_File/Makefile.SH207
-rw-r--r--ext/DynaLoader/DynaLoader.pm9
-rw-r--r--ext/DynaLoader/Makefile.PL24
-rw-r--r--ext/DynaLoader/Makefile.SH185
-rw-r--r--ext/Fcntl/Makefile.PL2
-rw-r--r--ext/Fcntl/Makefile.SH207
-rw-r--r--ext/GDBM_File/Makefile.PL2
-rw-r--r--ext/GDBM_File/Makefile.SH213
-rw-r--r--ext/NDBM_File/Makefile.PL2
-rw-r--r--ext/NDBM_File/Makefile.SH213
-rw-r--r--ext/ODBM_File/Makefile.PL2
-rw-r--r--ext/ODBM_File/Makefile.SH213
-rw-r--r--ext/POSIX/Makefile.PL2
-rw-r--r--ext/POSIX/Makefile.SH207
-rw-r--r--ext/SDBM_File/Makefile.PL19
-rw-r--r--ext/SDBM_File/Makefile.SH216
-rw-r--r--ext/SDBM_File/sdbm/Makefile.PL49
-rw-r--r--ext/SDBM_File/sdbm/Makefile.SH99
-rw-r--r--ext/Socket/Makefile.PL2
-rw-r--r--ext/Socket/Makefile.SH207
-rw-r--r--ext/util/make_ext48
22 files changed, 139 insertions, 1991 deletions
diff --git a/ext/DB_File/Makefile.PL b/ext/DB_File/Makefile.PL
new file mode 100644
index 0000000000..7100ce671a
--- /dev/null
+++ b/ext/DB_File/Makefile.PL
@@ -0,0 +1,2 @@
+use ExtUtils::MakeMaker;
+WriteMakefile(LIBS => ["-ldb"]);
diff --git a/ext/DB_File/Makefile.SH b/ext/DB_File/Makefile.SH
deleted file mode 100644
index 7422b00eab..0000000000
--- a/ext/DB_File/Makefile.SH
+++ /dev/null
@@ -1,207 +0,0 @@
-: This forces SH files to create target in same directory as SH file.
-: This is so that make depend always knows where to find SH derivatives.
-
-case "$0" in
-*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
-esac
-
-if test -f config.sh; then TOP=.;
-elif test -f ../config.sh; then TOP=..;
-elif test -f ../../config.sh; then TOP=../..;
-elif test -f ../../../config.sh; then TOP=../../..;
-elif test -f ../../../../config.sh; then TOP=../../../..;
-else
- echo "Can't find config.sh."; exit 1
-fi
-
-: Find absolute path name for TOP. This is needed when we cd to TOP
-: to run perl on autosplit.
-oldpwd=`pwd`; cd $TOP; ABSTOP=`pwd`; cd $oldpwd
-
-case $CONFIG in
-'')
- . $TOP/config.sh
- ;;
-esac
-
-: Find out directory name. This is also the extension name.
-ext=`pwd | $sed -e 's@.*/@@'`
-
-: This extension might have its own typemap
-if test -f typemap; then
- exttypemap='typemap'
-else
- exttypemap=''
-fi
-
-: This extension might need additional libraries.
-potential_libs="-ldb "
-. $TOP/ext/util/extliblist
-
-: This extension might need bootstrap support
-if test -f ${ext}_BS; then
- bootdep=${ext}_BS
-else
- bootdep=''
-fi
-
-case "$dlsrc" in
-dl_aix*)
- echo "#!" > $ext.exp
- echo "boot_$ext" >> $ext.exp
- ;;
-esac
-
-echo "Extracting ext/$ext/Makefile (with variable substitutions)"
-: This section of the file will have variable substitutions done on it.
-: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
-: Protect any dollar signs and backticks that you do not want interpreted
-: by putting a backslash in front. You may delete these comments.
-$spitshell >Makefile << !GROK!THIS!
-#
-# This Makefile is for the $ext extension to perl.
-#
-CC = $cc
-RANLIB = $ranlib
-TOP = $TOP
-ABSTOP = $ABSTOP
-LDFLAGS = $ldflags
-CLDFLAGS = $ldflags
-SMALL = $small
-LARGE = $large $split
-
-# To use an alternate make, set \$altmake in config.sh.
-MAKE = ${altmake-make}
-
-EXT = $ext
-
-# $ext might have its own typemap
-EXTTYPEMAP = $exttypemap
-
-# $ext might have its own bootstrap support
-BOOTDEP = $bootdep
-BOOTSTRAP = $ext.bs
-
-# The following are used to build and install shared libraries for
-# dynamic loading.
-LDDLFLAGS = $lddlflags
-CCDLFLAGS = $ccdlflags
-CCCDLFLAGS = $cccdlflags
-SO = $so
-DLEXT = $dlext
-
-# $ext might need to be linked with some extra libraries.
-# EXTRALIBS = full list of libraries needed for static linking.
-# Only those libraries that actually exist are included.
-# DYNLOADLIBS = list of those libraries that are needed but can be
-# linked in dynamically on this platform. On SunOS, for
-# example, this would be .so* libraries, but not archive
-# libraries. The bootstrap file is installed only if
-# this list is not empty.
-# STATLOADLIBS = list of those libraries which must be statically
-# linked into the shared library. On SunOS 4.1.3,
-# for example, I have only an archive version of
-# -lm, and it must be linked in statically.
-EXTRALIBS = $extralibs
-DYNALOADLIBS = $dynaloadlibs
-STATLOADLIBS = $statloadlibs
-
-!GROK!THIS!
-
-$spitshell >>Makefile <<'!NO!SUBS!'
-
-# Where to put things:
-AUTO = $(TOP)/lib/auto
-INSTALLBOOT = $(AUTO)/$(EXT)/$(EXT).bs
-INSTALLDYNAMIC = $(AUTO)/$(EXT)/$(EXT).$(DLEXT)
-INSTALLSTATIC = $(EXT).a
-INSTALLPM = $(TOP)/lib/$(EXT).pm
-
-PERL = $(ABSTOP)/miniperl
-XSUBPP = $(TOP)/ext/xsubpp
-SHELL = /bin/sh
-CCCMD = `sh $(shellflags) $(TOP)/cflags $@`
-
-.c.o:
- $(CCCMD) $(CCCDLFLAGS) -I$(TOP) $*.c
-
-all: dynamic
-# Phony target to force checking subdirectories.
-FORCE:
-
-config:
-
-# Target for Dynamic Loading:
-dynamic: $(INSTALLDYNAMIC) $(INSTALLPM) $(INSTALLBOOT)
-
-$(INSTALLDYNAMIC): $(EXT).o
- @test -d $(AUTO) || mkdir $(AUTO)
- @test -d $(AUTO)/$(EXT) || mkdir $(AUTO)/$(EXT)
- ld $(LDDLFLAGS) -o $@ $(EXT).o $(STATLOADLIBS)
-
-$(BOOTSTRAP): Makefile $(BOOTDEP)
- $(PERL) -I$(TOP)/lib $(TOP)/ext/util/mkbootstrap $(DYNALOADLIBS)
- touch $(BOOTSTRAP)
-
-$(INSTALLBOOT): $(BOOTSTRAP)
- @test ! -s $(BOOTSTRAP) || cp $(BOOTSTRAP) $@
-
-# Target for Static Loading:
-static: $(INSTALLSTATIC) $(INSTALLPM)
-
-$(INSTALLSTATIC): $(EXT).o
- ar cr $@ $(EXT).o
- $(RANLIB) $@
- echo $(EXTRALIBS) >> $(TOP)/ext.libs
-
-$(EXT).c: $(EXT).xs $(XSUBPP) $(TOP)/ext/typemap $(EXTTYPEMAP) $(TOP)/cflags Makefile
- $(PERL) $(XSUBPP) $(EXT).xs >tmp
- mv tmp $@
-
-$(INSTALLPM): $(EXT).pm
- rm -f $@
- cp $(EXT).pm $@
- cd $(TOP); $(PERL) autosplit $(EXT)
-
-clean:
- rm -f *.o *.a mon.out core $(EXT).c so_locations $(BOOTSTRAP) $(EXT).exp
-
-realclean: clean
- rm -f makefile Makefile
- rm -f $(INSTALLPM) $(INSTALLDYNAMIC) $(INSTALLSTATIC) $(INSTALLBOOT)
- rm -rf $(AUTO)/$(EXT)
-
-purge: realclean
-
-$(EXT).o : $(TOP)/EXTERN.h
-$(EXT).o : $(TOP)/perl.h
-$(EXT).o : $(TOP)/embed.h
-$(EXT).o : $(TOP)/config.h
-$(EXT).o : $(TOP)/unixish.h
-$(EXT).o : $(TOP)/handy.h
-$(EXT).o : $(TOP)/regexp.h
-$(EXT).o : $(TOP)/sv.h
-$(EXT).o : $(TOP)/util.h
-$(EXT).o : $(TOP)/form.h
-$(EXT).o : $(TOP)/gv.h
-$(EXT).o : $(TOP)/cv.h
-$(EXT).o : $(TOP)/opcode.h
-$(EXT).o : $(TOP)/op.h
-$(EXT).o : $(TOP)/cop.h
-$(EXT).o : $(TOP)/av.h
-$(EXT).o : $(TOP)/hv.h
-$(EXT).o : $(TOP)/mg.h
-$(EXT).o : $(TOP)/scope.h
-$(EXT).o : $(TOP)/pp.h
-$(EXT).o : $(TOP)/proto.h
-$(EXT).o : $(TOP)/XSUB.h
-
-Makefile: Makefile.SH $(TOP)/config.sh ; /bin/sh Makefile.SH
-$(TOP)/config.h: $(TOP)/config.sh; cd $(TOP); /bin/sh config_h.SH
-$(TOP)/embed.h: $(TOP)/config.sh; cd $(TOP); /bin/sh embed_h.SH
-$(TOP)/cflags: $(TOP)/config.sh; cd $(TOP); /bin/sh cflags.SH
-
-!NO!SUBS!
-chmod 644 Makefile
-$eunicefix Makefile
-
diff --git a/ext/DynaLoader/DynaLoader.pm b/ext/DynaLoader/DynaLoader.pm
index 61d9a8566e..6bf0062d12 100644
--- a/ext/DynaLoader/DynaLoader.pm
+++ b/ext/DynaLoader/DynaLoader.pm
@@ -112,12 +112,11 @@ sub bootstrap {
# The .bs file can be used to configure @dl_resolve_using etc to
# match the needs of the individual module on this architecture.
my $bs = $file;
- $bs =~ s/\.$dl_dlext$/\.bs/o; # look for .bs 'beside' the library
- if (-f $bs) {
+ $bs =~ s/(\.\w+)?$/\.bs/; # look for .bs 'beside' the library
+ if (-s $bs) { # only read file if it's not empty
local($osname, $dlsrc) = @Config{'osname','dlsrc'};
- print STDERR "$bs ($osname, $dlsrc)\n" if $dl_debug;
- $@ = "";
- do $bs;
+ print STDERR "BS: $bs ($osname, $dlsrc)\n" if $dl_debug;
+ eval { do $bs; };
warn "$bs: $@\n" if $@;
}
diff --git a/ext/DynaLoader/Makefile.PL b/ext/DynaLoader/Makefile.PL
new file mode 100644
index 0000000000..6ce9527061
--- /dev/null
+++ b/ext/DynaLoader/Makefile.PL
@@ -0,0 +1,24 @@
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ 'LINKTYPE' => 'static',
+ 'DEFINE' => '-DLIBC="$(LIBC)"',
+ 'SKIP' => [qw(dynamic dynamic_lib dynamic_bs)],
+ 'clean' => {FILES => 'DynaLoader.c'},
+);
+
+
+sub MY::postamble {
+ '
+DynaLoader.c: $(DLSRC)
+ $(PERL) $(XSUBPP) $(XSUBPPARGS) $(DLSRC) >tmp && mv tmp $@
+
+# Perform very simple tests just to check for major gaffs.
+# We can\'t do much more for platforms we are not executing on.
+test-xs:
+ for i in dl_*xs; \
+ do $(PERL) $(XSUBPP) $(XSUBPPARGS) $$i > /dev/null; \
+ done
+';
+}
+
diff --git a/ext/DynaLoader/Makefile.SH b/ext/DynaLoader/Makefile.SH
deleted file mode 100644
index 2b10fefd1a..0000000000
--- a/ext/DynaLoader/Makefile.SH
+++ /dev/null
@@ -1,185 +0,0 @@
-: This forces SH files to create target in same directory as SH file.
-: This is so that make depend always knows where to find SH derivatives.
-
-case "$0" in
-*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
-esac
-
-if test -f config.sh; then TOP=.;
-elif test -f ../config.sh; then TOP=..;
-elif test -f ../../config.sh; then TOP=../..;
-elif test -f ../../../config.sh; then TOP=../../..;
-elif test -f ../../../../config.sh; then TOP=../../../..;
-else
- echo "Can't find config.sh."; exit 1
-fi
-
-: Find absolute path name for TOP. This is needed when we cd to TOP
-: to run perl on autosplit.
-oldpwd=`pwd`; cd $TOP; ABSTOP=`pwd`; cd $oldpwd
-
-case $CONFIG in
-'')
- . $TOP/config.sh
- ;;
-esac
-
-: Find out directory name. This is also the extension name.
-ext=`pwd | $sed -e 's@.*/@@'`
-
-: This extension might have its own typemap
-if test -f typemap; then
- exttypemap='typemap'
-else
- exttypemap=''
-fi
-
-: This extension might need additional libraries.
-potential_libs=""
-. $TOP/ext/util/extliblist
-
-echo "Extracting ext/$ext/Makefile (with variable substitutions)"
-: This section of the file will have variable substitutions done on it.
-: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
-: Protect any dollar signs and backticks that you do not want interpreted
-: by putting a backslash in front. You may delete these comments.
-$spitshell >Makefile << !GROK!THIS!
-#
-# This Makefile is for the $ext extension to perl.
-#
-
-DLSRC = $dlsrc
-CC = $cc
-RANLIB = $ranlib
-TOP = $TOP
-ABSTOP = $ABSTOP
-LDFLAGS = $ldflags
-CLDFLAGS = $ldflags
-SMALL = $small
-LARGE = $large $split
-
-# To use an alternate make, set \$altmake in config.sh.
-MAKE = ${altmake-make}
-
-EXT = $ext
-
-# $ext might have its own typemap
-EXTTYPEMAP = $exttypemap
-
-# The following are used to build and install shared libraries for
-# dynamic loading.
-LDDLFLAGS = $lddlflags
-CCDLFLAGS = $ccdlflags
-CCCDLFLAGS = $cccdlflags
-SO = $so
-DLEXT = $dlext
-
-# $ext might need to be linked with some extra libraries.
-# EXTRALIBS = full list of libraries needed for static linking.
-# Only those libraries that actually exist are included.
-# DYNLOADLIBS = list of those libraries that are needed but can be
-# linked in dynamically on this platform. On SunOS, for
-# example, this would be .so* libraries, but not archive
-# libraries. The bootstrap file is installed only if
-# this list is not empty.
-# STATLOADLIBS = list of those libraries which must be statically
-# linked into the shared library. On SunOS 4.1.3,
-# for example, I have only an archive version of
-# -lm, and it must be linked in statically.
-EXTRALIBS = $extralibs
-DYNALOADLIBS = $dynaloadlibs
-STATLOADLIBS = $statloadlibs
-
-!GROK!THIS!
-
-$spitshell >>Makefile <<'!NO!SUBS!'
-
-# Where to put things:
-AUTO = $(TOP)/lib/auto
-INSTALLSTATIC = $(EXT).a
-INSTALLPM = $(TOP)/lib/$(EXT).pm
-
-PERL = $(ABSTOP)/miniperl
-XSUBPP = $(TOP)/ext/xsubpp
-SHELL = /bin/sh
-CCCMD = `sh $(shellflags) $(TOP)/cflags $@`
-
-.c.o:
- $(CCCMD) $(CCCDLFLAGS) -I$(TOP) $*.c
-
-all: static
-# Phony target to force checking subdirectories.
-FORCE:
-
-config:
-
-# Target for Dynamic Loading:
-# If we hit here, there's a mistake somewhere.
-dynamic: static
- @echo "The DynaLoader extension must be built for static linking"
- false
-
-# Target for Static Loading:
-static: $(INSTALLSTATIC) $(INSTALLPM)
-
-$(INSTALLSTATIC): $(EXT).o
- ar cr $@ $(EXT).o
- $(RANLIB) $@
- echo $(EXTRALIBS) >> $(TOP)/ext.libs
-
-$(EXT).c: $(DLSRC) dlutils.c $(XSUBPP) $(TOP)/ext/typemap $(EXTTYPEMAP) $(TOP)/cflags Makefile
- $(PERL) $(XSUBPP) $(DLSRC) >tmp
- mv tmp $@
-
-$(INSTALLPM): $(EXT).pm
- rm -f $@
- cp $(EXT).pm $@
- cd $(TOP); $(PERL) autosplit $(EXT)
-
-# Perform very simple tests just to check for major gaffs.
-# We can't do much more for platforms we are not executing on.
-test-xs:
- for i in dl_*xs; do $(PERL) $(XSUBPP) $$i > /dev/null; done
-
-clean:
- rm -f *.o *.a mon.out core $(EXT).c so_locations $(BOOTSTRAP)
-
-realclean: clean
- rm -f makefile Makefile
- rm -f $(INSTALLPM) $(INSTALLSTATIC)
- rm -rf $(AUTO)/$(EXT)
-
-purge: realclean
-
-$(EXT).o : $(TOP)/EXTERN.h
-$(EXT).o : $(TOP)/perl.h
-$(EXT).o : $(TOP)/embed.h
-$(EXT).o : $(TOP)/config.h
-$(EXT).o : $(TOP)/unixish.h
-$(EXT).o : $(TOP)/handy.h
-$(EXT).o : $(TOP)/regexp.h
-$(EXT).o : $(TOP)/sv.h
-$(EXT).o : $(TOP)/util.h
-$(EXT).o : $(TOP)/form.h
-$(EXT).o : $(TOP)/gv.h
-$(EXT).o : $(TOP)/cv.h
-$(EXT).o : $(TOP)/opcode.h
-$(EXT).o : $(TOP)/op.h
-$(EXT).o : $(TOP)/cop.h
-$(EXT).o : $(TOP)/av.h
-$(EXT).o : $(TOP)/hv.h
-$(EXT).o : $(TOP)/mg.h
-$(EXT).o : $(TOP)/scope.h
-$(EXT).o : $(TOP)/pp.h
-$(EXT).o : $(TOP)/proto.h
-$(EXT).o : $(TOP)/XSUB.h
-
-Makefile: Makefile.SH $(TOP)/config.sh ; /bin/sh Makefile.SH
-$(TOP)/config.h: $(TOP)/config.sh; cd $(TOP); /bin/sh config_h.SH
-$(TOP)/embed.h: $(TOP)/config.sh; cd $(TOP); /bin/sh embed_h.SH
-$(TOP)/cflags: $(TOP)/config.sh; cd $(TOP); /bin/sh cflags.SH
-
-!NO!SUBS!
-chmod 644 Makefile
-$eunicefix Makefile
-
diff --git a/ext/Fcntl/Makefile.PL b/ext/Fcntl/Makefile.PL
new file mode 100644
index 0000000000..414df14f22
--- /dev/null
+++ b/ext/Fcntl/Makefile.PL
@@ -0,0 +1,2 @@
+use ExtUtils::MakeMaker;
+WriteMakefile();
diff --git a/ext/Fcntl/Makefile.SH b/ext/Fcntl/Makefile.SH
deleted file mode 100644
index 064228e512..0000000000
--- a/ext/Fcntl/Makefile.SH
+++ /dev/null
@@ -1,207 +0,0 @@
-: This forces SH files to create target in same directory as SH file.
-: This is so that make depend always knows where to find SH derivatives.
-
-case "$0" in
-*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
-esac
-
-if test -f config.sh; then TOP=.;
-elif test -f ../config.sh; then TOP=..;
-elif test -f ../../config.sh; then TOP=../..;
-elif test -f ../../../config.sh; then TOP=../../..;
-elif test -f ../../../../config.sh; then TOP=../../../..;
-else
- echo "Can't find config.sh."; exit 1
-fi
-
-: Find absolute path name for TOP. This is needed when we cd to TOP
-: to run perl on autosplit.
-oldpwd=`pwd`; cd $TOP; ABSTOP=`pwd`; cd $oldpwd
-
-case $CONFIG in
-'')
- . $TOP/config.sh
- ;;
-esac
-
-: Find out directory name. This is also the extension name.
-ext=`pwd | $sed -e 's@.*/@@'`
-
-: This extension might have its own typemap
-if test -f typemap; then
- exttypemap='typemap'
-else
- exttypemap=''
-fi
-
-: This extension might need additional libraries.
-potential_libs=" "
-. $TOP/ext/util/extliblist
-
-: This extension might need bootstrap support
-if test -f ${ext}_BS; then
- bootdep=${ext}_BS
-else
- bootdep=''
-fi
-
-case "$dlsrc" in
-dl_aix*)
- echo "#!" > $ext.exp
- echo "boot_$ext" >> $ext.exp
- ;;
-esac
-
-echo "Extracting ext/$ext/Makefile (with variable substitutions)"
-: This section of the file will have variable substitutions done on it.
-: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
-: Protect any dollar signs and backticks that you do not want interpreted
-: by putting a backslash in front. You may delete these comments.
-$spitshell >Makefile << !GROK!THIS!
-#
-# This Makefile is for the $ext extension to perl.
-#
-CC = $cc
-RANLIB = $ranlib
-TOP = $TOP
-ABSTOP = $ABSTOP
-LDFLAGS = $ldflags
-CLDFLAGS = $ldflags
-SMALL = $small
-LARGE = $large $split
-
-# To use an alternate make, set \$altmake in config.sh.
-MAKE = ${altmake-make}
-
-EXT = $ext
-
-# $ext might have its own typemap
-EXTTYPEMAP = $exttypemap
-
-# $ext might have its own bootstrap support
-BOOTDEP = $bootdep
-BOOTSTRAP = $ext.bs
-
-# The following are used to build and install shared libraries for
-# dynamic loading.
-LDDLFLAGS = $lddlflags
-CCDLFLAGS = $ccdlflags
-CCCDLFLAGS = $cccdlflags
-SO = $so
-DLEXT = $dlext
-
-# $ext might need to be linked with some extra libraries.
-# EXTRALIBS = full list of libraries needed for static linking.
-# Only those libraries that actually exist are included.
-# DYNLOADLIBS = list of those libraries that are needed but can be
-# linked in dynamically on this platform. On SunOS, for
-# example, this would be .so* libraries, but not archive
-# libraries. The bootstrap file is installed only if
-# this list is not empty.
-# STATLOADLIBS = list of those libraries which must be statically
-# linked into the shared library. On SunOS 4.1.3,
-# for example, I have only an archive version of
-# -lm, and it must be linked in statically.
-EXTRALIBS = $extralibs
-DYNALOADLIBS = $dynaloadlibs
-STATLOADLIBS = $statloadlibs
-
-!GROK!THIS!
-
-$spitshell >>Makefile <<'!NO!SUBS!'
-
-# Where to put things:
-AUTO = $(TOP)/lib/auto
-INSTALLBOOT = $(AUTO)/$(EXT)/$(EXT).bs
-INSTALLDYNAMIC = $(AUTO)/$(EXT)/$(EXT).$(DLEXT)
-INSTALLSTATIC = $(EXT).a
-INSTALLPM = $(TOP)/lib/$(EXT).pm
-
-PERL = $(ABSTOP)/miniperl
-XSUBPP = $(TOP)/ext/xsubpp
-SHELL = /bin/sh
-CCCMD = `sh $(shellflags) $(TOP)/cflags $@`
-
-.c.o:
- $(CCCMD) $(CCCDLFLAGS) -I$(TOP) $*.c
-
-all: dynamic
-# Phony target to force checking subdirectories.
-FORCE:
-
-config:
-
-# Target for Dynamic Loading:
-dynamic: $(INSTALLDYNAMIC) $(INSTALLPM) $(INSTALLBOOT)
-
-$(INSTALLDYNAMIC): $(EXT).o
- @test -d $(AUTO) || mkdir $(AUTO)
- @test -d $(AUTO)/$(EXT) || mkdir $(AUTO)/$(EXT)
- ld $(LDDLFLAGS) -o $@ $(EXT).o $(STATLOADLIBS)
-
-$(BOOTSTRAP): Makefile $(BOOTDEP)
- $(PERL) -I$(TOP)/lib $(TOP)/ext/util/mkbootstrap $(DYNALOADLIBS)
- touch $(BOOTSTRAP)
-
-$(INSTALLBOOT): $(BOOTSTRAP)
- @test ! -s $(BOOTSTRAP) || cp $(BOOTSTRAP) $@
-
-# Target for Static Loading:
-static: $(INSTALLSTATIC) $(INSTALLPM)
-
-$(INSTALLSTATIC): $(EXT).o
- ar cr $@ $(EXT).o
- $(RANLIB) $@
- echo $(EXTRALIBS) >> $(TOP)/ext.libs
-
-$(EXT).c: $(EXT).xs $(XSUBPP) $(TOP)/ext/typemap $(EXTTYPEMAP) $(TOP)/cflags Makefile
- $(PERL) $(XSUBPP) $(EXT).xs >tmp
- mv tmp $@
-
-$(INSTALLPM): $(EXT).pm
- rm -f $@
- cp $(EXT).pm $@
- cd $(TOP); $(PERL) autosplit $(EXT)
-
-clean:
- rm -f *.o *.a mon.out core $(EXT).c so_locations $(BOOTSTRAP) $(EXT).exp
-
-realclean: clean
- rm -f makefile Makefile
- rm -f $(INSTALLPM) $(INSTALLDYNAMIC) $(INSTALLSTATIC) $(INSTALLBOOT)
- rm -rf $(AUTO)/$(EXT)
-
-purge: realclean
-
-$(EXT).o : $(TOP)/EXTERN.h
-$(EXT).o : $(TOP)/perl.h
-$(EXT).o : $(TOP)/embed.h
-$(EXT).o : $(TOP)/config.h
-$(EXT).o : $(TOP)/unixish.h
-$(EXT).o : $(TOP)/handy.h
-$(EXT).o : $(TOP)/regexp.h
-$(EXT).o : $(TOP)/sv.h
-$(EXT).o : $(TOP)/util.h
-$(EXT).o : $(TOP)/form.h
-$(EXT).o : $(TOP)/gv.h
-$(EXT).o : $(TOP)/cv.h
-$(EXT).o : $(TOP)/opcode.h
-$(EXT).o : $(TOP)/op.h
-$(EXT).o : $(TOP)/cop.h
-$(EXT).o : $(TOP)/av.h
-$(EXT).o : $(TOP)/hv.h
-$(EXT).o : $(TOP)/mg.h
-$(EXT).o : $(TOP)/scope.h
-$(EXT).o : $(TOP)/pp.h
-$(EXT).o : $(TOP)/proto.h
-$(EXT).o : $(TOP)/XSUB.h
-
-Makefile: Makefile.SH $(TOP)/config.sh ; /bin/sh Makefile.SH
-$(TOP)/config.h: $(TOP)/config.sh; cd $(TOP); /bin/sh config_h.SH
-$(TOP)/embed.h: $(TOP)/config.sh; cd $(TOP); /bin/sh embed_h.SH
-$(TOP)/cflags: $(TOP)/config.sh; cd $(TOP); /bin/sh cflags.SH
-
-!NO!SUBS!
-chmod 644 Makefile
-$eunicefix Makefile
-
diff --git a/ext/GDBM_File/Makefile.PL b/ext/GDBM_File/Makefile.PL
new file mode 100644
index 0000000000..bd91b80f5e
--- /dev/null
+++ b/ext/GDBM_File/Makefile.PL
@@ -0,0 +1,2 @@
+use ExtUtils::MakeMaker;
+WriteMakefile(LIBS => ["-lgdbm", "-ldbm"]);
diff --git a/ext/GDBM_File/Makefile.SH b/ext/GDBM_File/Makefile.SH
deleted file mode 100644
index 974c8deef8..0000000000
--- a/ext/GDBM_File/Makefile.SH
+++ /dev/null
@@ -1,213 +0,0 @@
-: This forces SH files to create target in same directory as SH file.
-: This is so that make depend always knows where to find SH derivatives.
-
-case "$0" in
-*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
-esac
-
-if test -f config.sh; then TOP=.;
-elif test -f ../config.sh; then TOP=..;
-elif test -f ../../config.sh; then TOP=../..;
-elif test -f ../../../config.sh; then TOP=../../..;
-elif test -f ../../../../config.sh; then TOP=../../../..;
-else
- echo "Can't find config.sh."; exit 1
-fi
-
-: Find absolute path name for TOP. This is needed when we cd to TOP
-: to run perl on autosplit.
-oldpwd=`pwd`; cd $TOP; ABSTOP=`pwd`; cd $oldpwd
-
-case $CONFIG in
-'')
- . $TOP/config.sh
- ;;
-esac
-
-: Find out directory name. This is also the extension name.
-ext=`pwd | $sed -e 's@.*/@@'`
-
-: This extension might have its own typemap
-if test -f typemap; then
- exttypemap='typemap'
-else
- exttypemap=''
-fi
-
-: This extension might need additional libraries.
-potential_libs="-lgdbm"
-. $TOP/ext/util/extliblist
-case "${extralibs}${dynaloadlibs}${statloadlibs}" in
-'') : Try again. Maybe they have -ldbm instead
- potential_libs='-ldbm'
- . $TOP/ext/util/extliblist
- ;;
-esac
-
-: This extension might need bootstrap support
-if test -f ${ext}_BS; then
- bootdep=${ext}_BS
-else
- bootdep=''
-fi
-
-case "$dlsrc" in
-dl_aix*)
- echo "#!" > $ext.exp
- echo "boot_$ext" >> $ext.exp
- ;;
-esac
-
-echo "Extracting ext/$ext/Makefile (with variable substitutions)"
-: This section of the file will have variable substitutions done on it.
-: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
-: Protect any dollar signs and backticks that you do not want interpreted
-: by putting a backslash in front. You may delete these comments.
-$spitshell >Makefile << !GROK!THIS!
-#
-# This Makefile is for the $ext extension to perl.
-#
-CC = $cc
-RANLIB = $ranlib
-TOP = $TOP
-ABSTOP = $ABSTOP
-LDFLAGS = $ldflags
-CLDFLAGS = $ldflags
-SMALL = $small
-LARGE = $large $split
-
-# To use an alternate make, set \$altmake in config.sh.
-MAKE = ${altmake-make}
-
-EXT = $ext
-
-# $ext might have its own typemap
-EXTTYPEMAP = $exttypemap
-
-# $ext might have its own bootstrap support
-BOOTDEP = $bootdep
-BOOTSTRAP = $ext.bs
-
-# The following are used to build and install shared libraries for
-# dynamic loading.
-LDDLFLAGS = $lddlflags
-CCDLFLAGS = $ccdlflags
-CCCDLFLAGS = $cccdlflags
-SO = $so
-DLEXT = $dlext
-
-# $ext might need to be linked with some extra libraries.
-# EXTRALIBS = full list of libraries needed for static linking.
-# Only those libraries that actually exist are included.
-# DYNLOADLIBS = list of those libraries that are needed but can be
-# linked in dynamically on this platform. On SunOS, for
-# example, this would be .so* libraries, but not archive
-# libraries. The bootstrap file is installed only if
-# this list is not empty.
-# STATLOADLIBS = list of those libraries which must be statically
-# linked into the shared library. On SunOS 4.1.3,
-# for example, I have only an archive version of
-# -lm, and it must be linked in statically.
-EXTRALIBS = $extralibs
-DYNALOADLIBS = $dynaloadlibs
-STATLOADLIBS = $statloadlibs
-
-!GROK!THIS!
-
-$spitshell >>Makefile <<'!NO!SUBS!'
-
-# Where to put things:
-AUTO = $(TOP)/lib/auto
-INSTALLBOOT = $(AUTO)/$(EXT)/$(EXT).bs
-INSTALLDYNAMIC = $(AUTO)/$(EXT)/$(EXT).$(DLEXT)
-INSTALLSTATIC = $(EXT).a
-INSTALLPM = $(TOP)/lib/$(EXT).pm
-
-PERL = $(ABSTOP)/miniperl
-XSUBPP = $(TOP)/ext/xsubpp
-SHELL = /bin/sh
-CCCMD = `sh $(shellflags) $(TOP)/cflags $@`
-
-.c.o:
- $(CCCMD) $(CCCDLFLAGS) -I$(TOP) $*.c
-
-all: dynamic
-# Phony target to force checking subdirectories.
-FORCE:
-
-config:
-
-# Target for Dynamic Loading:
-dynamic: $(INSTALLDYNAMIC) $(INSTALLPM) $(INSTALLBOOT)
-
-$(INSTALLDYNAMIC): $(EXT).o
- @test -d $(AUTO) || mkdir $(AUTO)
- @test -d $(AUTO)/$(EXT) || mkdir $(AUTO)/$(EXT)
- ld $(LDDLFLAGS) -o $@ $(EXT).o $(STATLOADLIBS)
-
-$(BOOTSTRAP): Makefile $(BOOTDEP)
- $(PERL) -I$(TOP)/lib $(TOP)/ext/util/mkbootstrap $(DYNALOADLIBS)
- touch $(BOOTSTRAP)
-
-$(INSTALLBOOT): $(BOOTSTRAP)
- @test ! -s $(BOOTSTRAP) || cp $(BOOTSTRAP) $@
-
-# Target for Static Loading:
-static: $(INSTALLSTATIC) $(INSTALLPM)
-
-$(INSTALLSTATIC): $(EXT).o
- ar cr $@ $(EXT).o
- $(RANLIB) $@
- echo $(EXTRALIBS) >> $(TOP)/ext.libs
-
-$(EXT).c: $(EXT).xs $(XSUBPP) $(TOP)/ext/typemap $(EXTTYPEMAP) $(TOP)/cflags Makefile
- $(PERL) $(XSUBPP) $(EXT).xs >tmp
- mv tmp $@
-
-$(INSTALLPM): $(EXT).pm
- rm -f $@
- cp $(EXT).pm $@
- cd $(TOP); $(PERL) autosplit $(EXT)
-
-clean:
- rm -f *.o *.a mon.out core $(EXT).c so_locations $(BOOTSTRAP) $(EXT).exp
-
-realclean: clean
- rm -f makefile Makefile
- rm -f $(INSTALLPM) $(INSTALLDYNAMIC) $(INSTALLSTATIC) $(INSTALLBOOT)
- rm -rf $(AUTO)/$(EXT)
-
-purge: realclean
-
-$(EXT).o : $(TOP)/EXTERN.h
-$(EXT).o : $(TOP)/perl.h
-$(EXT).o : $(TOP)/embed.h
-$(EXT).o : $(TOP)/config.h
-$(EXT).o : $(TOP)/unixish.h
-$(EXT).o : $(TOP)/handy.h
-$(EXT).o : $(TOP)/regexp.h
-$(EXT).o : $(TOP)/sv.h
-$(EXT).o : $(TOP)/util.h
-$(EXT).o : $(TOP)/form.h
-$(EXT).o : $(TOP)/gv.h
-$(EXT).o : $(TOP)/cv.h
-$(EXT).o : $(TOP)/opcode.h
-$(EXT).o : $(TOP)/op.h
-$(EXT).o : $(TOP)/cop.h
-$(EXT).o : $(TOP)/av.h
-$(EXT).o : $(TOP)/hv.h
-$(EXT).o : $(TOP)/mg.h
-$(EXT).o : $(TOP)/scope.h
-$(EXT).o : $(TOP)/pp.h
-$(EXT).o : $(TOP)/proto.h
-$(EXT).o : $(TOP)/XSUB.h
-
-Makefile: Makefile.SH $(TOP)/config.sh ; /bin/sh Makefile.SH
-$(TOP)/config.h: $(TOP)/config.sh; cd $(TOP); /bin/sh config_h.SH
-$(TOP)/embed.h: $(TOP)/config.sh; cd $(TOP); /bin/sh embed_h.SH
-$(TOP)/cflags: $(TOP)/config.sh; cd $(TOP); /bin/sh cflags.SH
-
-!NO!SUBS!
-chmod 644 Makefile
-$eunicefix Makefile
-
diff --git a/ext/NDBM_File/Makefile.PL b/ext/NDBM_File/Makefile.PL
new file mode 100644
index 0000000000..b334525212
--- /dev/null
+++ b/ext/NDBM_File/Makefile.PL
@@ -0,0 +1,2 @@
+use ExtUtils::MakeMaker;
+WriteMakefile(LIBS => ["-lndbm", "-ldbm"]);
diff --git a/ext/NDBM_File/Makefile.SH b/ext/NDBM_File/Makefile.SH
deleted file mode 100644
index 56016cae03..0000000000
--- a/ext/NDBM_File/Makefile.SH
+++ /dev/null
@@ -1,213 +0,0 @@
-: This forces SH files to create target in same directory as SH file.
-: This is so that make depend always knows where to find SH derivatives.
-
-case "$0" in
-*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
-esac
-
-if test -f config.sh; then TOP=.;
-elif test -f ../config.sh; then TOP=..;
-elif test -f ../../config.sh; then TOP=../..;
-elif test -f ../../../config.sh; then TOP=../../..;
-elif test -f ../../../../config.sh; then TOP=../../../..;
-else
- echo "Can't find config.sh."; exit 1
-fi
-
-: Find absolute path name for TOP. This is needed when we cd to TOP
-: to run perl on autosplit.
-oldpwd=`pwd`; cd $TOP; ABSTOP=`pwd`; cd $oldpwd
-
-case $CONFIG in
-'')
- . $TOP/config.sh
- ;;
-esac
-
-: Find out directory name. This is also the extension name.
-ext=`pwd | $sed -e 's@.*/@@'`
-
-: This extension might have its own typemap
-if test -f typemap; then
- exttypemap='typemap'
-else
- exttypemap=''
-fi
-
-: This extension might need additional libraries.
-potential_libs="-lndbm"
-. $TOP/ext/util/extliblist
-case "${extralibs}${dynaloadlibs}${statloadlibs}" in
-'') : Try again. Maybe they have -ldbm instead
- potential_libs='-ldbm'
- . $TOP/ext/util/extliblist
- ;;
-esac
-
-: This extension might need bootstrap support
-if test -f ${ext}_BS; then
- bootdep=${ext}_BS
-else
- bootdep=''
-fi
-
-case "$dlsrc" in
-dl_aix*)
- echo "#!" > $ext.exp
- echo "boot_$ext" >> $ext.exp
- ;;
-esac
-
-echo "Extracting ext/$ext/Makefile (with variable substitutions)"
-: This section of the file will have variable substitutions done on it.
-: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
-: Protect any dollar signs and backticks that you do not want interpreted
-: by putting a backslash in front. You may delete these comments.
-$spitshell >Makefile << !GROK!THIS!
-#
-# This Makefile is for the $ext extension to perl.
-#
-CC = $cc
-RANLIB = $ranlib
-TOP = $TOP
-ABSTOP = $ABSTOP
-LDFLAGS = $ldflags
-CLDFLAGS = $ldflags
-SMALL = $small
-LARGE = $large $split
-
-# To use an alternate make, set \$altmake in config.sh.
-MAKE = ${altmake-make}
-
-EXT = $ext
-
-# $ext might have its own typemap
-EXTTYPEMAP = $exttypemap
-
-# $ext might have its own bootstrap support
-BOOTDEP = $bootdep
-BOOTSTRAP = $ext.bs
-
-# The following are used to build and install shared libraries for
-# dynamic loading.
-LDDLFLAGS = $lddlflags
-CCDLFLAGS = $ccdlflags
-CCCDLFLAGS = $cccdlflags
-SO = $so
-DLEXT = $dlext
-
-# $ext might need to be linked with some extra libraries.
-# EXTRALIBS = full list of libraries needed for static linking.
-# Only those libraries that actually exist are included.
-# DYNLOADLIBS = list of those libraries that are needed but can be
-# linked in dynamically on this platform. On SunOS, for
-# example, this would be .so* libraries, but not archive
-# libraries. The bootstrap file is installed only if
-# this list is not empty.
-# STATLOADLIBS = list of those libraries which must be statically
-# linked into the shared library. On SunOS 4.1.3,
-# for example, I have only an archive version of
-# -lm, and it must be linked in statically.
-EXTRALIBS = $extralibs
-DYNALOADLIBS = $dynaloadlibs
-STATLOADLIBS = $statloadlibs
-
-!GROK!THIS!
-
-$spitshell >>Makefile <<'!NO!SUBS!'
-
-# Where to put things:
-AUTO = $(TOP)/lib/auto
-INSTALLBOOT = $(AUTO)/$(EXT)/$(EXT).bs
-INSTALLDYNAMIC = $(AUTO)/$(EXT)/$(EXT).$(DLEXT)
-INSTALLSTATIC = $(EXT).a
-INSTALLPM = $(TOP)/lib/$(EXT).pm
-
-PERL = $(ABSTOP)/miniperl
-XSUBPP = $(TOP)/ext/xsubpp
-SHELL = /bin/sh
-CCCMD = `sh $(shellflags) $(TOP)/cflags $@`
-
-.c.o:
- $(CCCMD) $(CCCDLFLAGS) -I$(TOP) $*.c
-
-all: dynamic
-# Phony target to force checking subdirectories.
-FORCE:
-
-config:
-
-# Target for Dynamic Loading:
-dynamic: $(INSTALLDYNAMIC) $(INSTALLPM) $(INSTALLBOOT)
-
-$(INSTALLDYNAMIC): $(EXT).o
- @test -d $(AUTO) || mkdir $(AUTO)
- @test -d $(AUTO)/$(EXT) || mkdir $(AUTO)/$(EXT)
- ld $(LDDLFLAGS) -o $@ $(EXT).o $(STATLOADLIBS)
-
-$(BOOTSTRAP): Makefile $(BOOTDEP)
- $(PERL) -I$(TOP)/lib $(TOP)/ext/util/mkbootstrap $(DYNALOADLIBS)
- touch $(BOOTSTRAP)
-
-$(INSTALLBOOT): $(BOOTSTRAP)
- @test ! -s $(BOOTSTRAP) || cp $(BOOTSTRAP) $@
-
-# Target for Static Loading:
-static: $(INSTALLSTATIC) $(INSTALLPM)
-
-$(INSTALLSTATIC): $(EXT).o
- ar cr $@ $(EXT).o
- $(RANLIB) $@
- echo $(EXTRALIBS) >> $(TOP)/ext.libs
-
-$(EXT).c: $(EXT).xs $(XSUBPP) $(TOP)/ext/typemap $(EXTTYPEMAP) $(TOP)/cflags Makefile
- $(PERL) $(XSUBPP) $(EXT).xs >tmp
- mv tmp $@
-
-$(INSTALLPM): $(EXT).pm
- rm -f $@
- cp $(EXT).pm $@
- cd $(TOP); $(PERL) autosplit $(EXT)
-
-clean:
- rm -f *.o *.a mon.out core $(EXT).c so_locations $(BOOTSTRAP) $(EXT).exp
-
-realclean: clean
- rm -f makefile Makefile
- rm -f $(INSTALLPM) $(INSTALLDYNAMIC) $(INSTALLSTATIC) $(INSTALLBOOT)
- rm -rf $(AUTO)/$(EXT)
-
-purge: realclean
-
-$(EXT).o : $(TOP)/EXTERN.h
-$(EXT).o : $(TOP)/perl.h
-$(EXT).o : $(TOP)/embed.h
-$(EXT).o : $(TOP)/config.h
-$(EXT).o : $(TOP)/unixish.h
-$(EXT).o : $(TOP)/handy.h
-$(EXT).o : $(TOP)/regexp.h
-$(EXT).o : $(TOP)/sv.h
-$(EXT).o : $(TOP)/util.h
-$(EXT).o : $(TOP)/form.h
-$(EXT).o : $(TOP)/gv.h
-$(EXT).o : $(TOP)/cv.h
-$(EXT).o : $(TOP)/opcode.h
-$(EXT).o : $(TOP)/op.h
-$(EXT).o : $(TOP)/cop.h
-$(EXT).o : $(TOP)/av.h
-$(EXT).o : $(TOP)/hv.h
-$(EXT).o : $(TOP)/mg.h
-$(EXT).o : $(TOP)/scope.h
-$(EXT).o : $(TOP)/pp.h
-$(EXT).o : $(TOP)/proto.h
-$(EXT).o : $(TOP)/XSUB.h
-
-Makefile: Makefile.SH $(TOP)/config.sh ; /bin/sh Makefile.SH
-$(TOP)/config.h: $(TOP)/config.sh; cd $(TOP); /bin/sh config_h.SH
-$(TOP)/embed.h: $(TOP)/config.sh; cd $(TOP); /bin/sh embed_h.SH
-$(TOP)/cflags: $(TOP)/config.sh; cd $(TOP); /bin/sh cflags.SH
-
-!NO!SUBS!
-chmod 644 Makefile
-$eunicefix Makefile
-
diff --git a/ext/ODBM_File/Makefile.PL b/ext/ODBM_File/Makefile.PL
new file mode 100644
index 0000000000..a25faace3b
--- /dev/null
+++ b/ext/ODBM_File/Makefile.PL
@@ -0,0 +1,2 @@
+use ExtUtils::MakeMaker;
+WriteMakefile(LIBS => ["-ldbm.nfs", "-ldbm"]);
diff --git a/ext/ODBM_File/Makefile.SH b/ext/ODBM_File/Makefile.SH
deleted file mode 100644
index 02cf6e13ab..0000000000
--- a/ext/ODBM_File/Makefile.SH
+++ /dev/null
@@ -1,213 +0,0 @@
-: This forces SH files to create target in same directory as SH file.
-: This is so that make depend always knows where to find SH derivatives.
-
-case "$0" in
-*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
-esac
-
-if test -f config.sh; then TOP=.;
-elif test -f ../config.sh; then TOP=..;
-elif test -f ../../config.sh; then TOP=../..;
-elif test -f ../../../config.sh; then TOP=../../..;
-elif test -f ../../../../config.sh; then TOP=../../../..;
-else
- echo "Can't find config.sh."; exit 1
-fi
-
-: Find absolute path name for TOP. This is needed when we cd to TOP
-: to run perl on autosplit.
-oldpwd=`pwd`; cd $TOP; ABSTOP=`pwd`; cd $oldpwd
-
-case $CONFIG in
-'')
- . $TOP/config.sh
- ;;
-esac
-
-: Find out directory name. This is also the extension name.
-ext=`pwd | $sed -e 's@.*/@@'`
-
-: This extension might have its own typemap
-if test -f typemap; then
- exttypemap='typemap'
-else
- exttypemap=''
-fi
-
-: This extension might need additional libraries.
-: dbm.nfs is an SCO library.
-potential_libs="-ldbm.nfs"
-. $TOP/ext/util/extliblist
-case "${extralibs}${dynaloadlibs}${statloadlibs}" in
-'') : Try again. Most systems have -ldbm instead
- potential_libs='-ldbm'
- . $TOP/ext/util/extliblist
- ;;
-esac
-
-: This extension might need bootstrap support
-if test -f ${ext}_BS; then
- bootdep=${ext}_BS
-else
- bootdep=''
-fi
-
-case "$dlsrc" in
-dl_aix*)
- echo "#!" > $ext.exp
- echo "boot_$ext" >> $ext.exp
- ;;
-esac
-
-echo "Extracting ext/$ext/Makefile (with variable substitutions)"
-: This section of the file will have variable substitutions done on it.
-: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
-: Protect any dollar signs and backticks that you do not want interpreted
-: by putting a backslash in front. You may delete these comments.
-$spitshell >Makefile << !GROK!THIS!
-#
-# This Makefile is for the $ext extension to perl.
-#
-CC = $cc
-RANLIB = $ranlib
-TOP = $TOP
-ABSTOP = $ABSTOP
-LDFLAGS = $ldflags
-CLDFLAGS = $ldflags
-SMALL = $small
-LARGE = $large $split
-
-# To use an alternate make, set \$altmake in config.sh.
-MAKE = ${altmake-make}
-
-EXT = $ext
-
-# $ext might have its own typemap
-EXTTYPEMAP = $exttypemap
-
-# $ext might have its own bootstrap support
-BOOTDEP = $bootdep
-BOOTSTRAP = $ext.bs
-
-# The following are used to build and install shared libraries for
-# dynamic loading.
-LDDLFLAGS = $lddlflags
-CCDLFLAGS = $ccdlflags
-CCCDLFLAGS = $cccdlflags
-SO = $so
-DLEXT = $dlext
-
-# $ext might need to be linked with some extra libraries.
-# EXTRALIBS = full list of libraries needed for static linking.
-# Only those libraries that actually exist are included.
-# DYNLOADLIBS = list of those libraries that are needed but can be
-# linked in dynamically on this platform. On SunOS, for
-# example, this would be .so* libraries, but not archive
-# libraries. The bootstrap file is installed only if
-# this list is not empty.
-# STATLOADLIBS = list of those libraries which must be statically
-# linked into the shared library. On SunOS 4.1.3,
-# for example, I have only an archive version of
-# -lm, and it must be linked in statically.
-EXTRALIBS = $extralibs
-DYNALOADLIBS = $dynaloadlibs
-STATLOADLIBS = $statloadlibs
-
-!GROK!THIS!
-
-$spitshell >>Makefile <<'!NO!SUBS!'
-
-# Where to put things:
-AUTO = $(TOP)/lib/auto
-INSTALLBOOT = $(AUTO)/$(EXT)/$(EXT).bs
-INSTALLDYNAMIC = $(AUTO)/$(EXT)/$(EXT).$(DLEXT)
-INSTALLSTATIC = $(EXT).a
-INSTALLPM = $(TOP)/lib/$(EXT).pm
-
-PERL = $(ABSTOP)/miniperl
-XSUBPP = $(TOP)/ext/xsubpp
-SHELL = /bin/sh
-CCCMD = `sh $(shellflags) $(TOP)/cflags $@`
-
-.c.o:
- $(CCCMD) $(CCCDLFLAGS) -I$(TOP) $*.c
-
-all: dynamic
-# Phony target to force checking subdirectories.
-FORCE:
-
-config:
-
-# Target for Dynamic Loading:
-dynamic: $(INSTALLDYNAMIC) $(INSTALLPM) $(INSTALLBOOT)
-
-$(INSTALLDYNAMIC): $(EXT).o
- @test -d $(AUTO) || mkdir $(AUTO)
- @test -d $(AUTO)/$(EXT) || mkdir $(AUTO)/$(EXT)
- ld $(LDDLFLAGS) -o $@ $(EXT).o $(STATLOADLIBS)
-
-$(BOOTSTRAP): Makefile $(BOOTDEP)
- $(PERL) -I$(TOP)/lib $(TOP)/ext/util/mkbootstrap $(DYNALOADLIBS)
- touch $(BOOTSTRAP)
-
-$(INSTALLBOOT): $(BOOTSTRAP)
- @test ! -s $(BOOTSTRAP) || cp $(BOOTSTRAP) $@
-
-# Target for Static Loading:
-static: $(INSTALLSTATIC) $(INSTALLPM)
-
-$(INSTALLSTATIC): $(EXT).o
- ar cr $@ $(EXT).o
- $(RANLIB) $@
- echo $(EXTRALIBS) >> $(TOP)/ext.libs
-
-$(EXT).c: $(EXT).xs $(XSUBPP) $(TOP)/ext/typemap $(EXTTYPEMAP) $(TOP)/cflags Makefile
- $(PERL) $(XSUBPP) $(EXT).xs >tmp
- mv tmp $@
-
-$(INSTALLPM): $(EXT).pm
- rm -f $@
- cp $(EXT).pm $@
- cd $(TOP); $(PERL) autosplit $(EXT)
-
-clean:
- rm -f *.o *.a mon.out core $(EXT).c so_locations $(BOOTSTRAP) $(EXT).exp
-
-realclean: clean
- rm -f makefile Makefile
- rm -f $(INSTALLPM) $(INSTALLDYNAMIC) $(INSTALLSTATIC) $(INSTALLBOOT)
- rm -rf $(AUTO)/$(EXT)
-
-purge: realclean
-
-$(EXT).o : $(TOP)/EXTERN.h
-$(EXT).o : $(TOP)/perl.h
-$(EXT).o : $(TOP)/embed.h
-$(EXT).o : $(TOP)/config.h
-$(EXT).o : $(TOP)/unixish.h
-$(EXT).o : $(TOP)/handy.h
-$(EXT).o : $(TOP)/regexp.h
-$(EXT).o : $(TOP)/sv.h
-$(EXT).o : $(TOP)/util.h
-$(EXT).o : $(TOP)/form.h
-$(EXT).o : $(TOP)/gv.h
-$(EXT).o : $(TOP)/cv.h
-$(EXT).o : $(TOP)/opcode.h
-$(EXT).o : $(TOP)/op.h
-$(EXT).o : $(TOP)/cop.h
-$(EXT).o : $(TOP)/av.h
-$(EXT).o : $(TOP)/hv.h
-$(EXT).o : $(TOP)/mg.h
-$(EXT).o : $(TOP)/scope.h
-$(EXT).o : $(TOP)/pp.h
-$(EXT).o : $(TOP)/proto.h
-$(EXT).o : $(TOP)/XSUB.h
-
-Makefile: Makefile.SH $(TOP)/config.sh ; /bin/sh Makefile.SH
-$(TOP)/config.h: $(TOP)/config.sh; cd $(TOP); /bin/sh config_h.SH
-$(TOP)/embed.h: $(TOP)/config.sh; cd $(TOP); /bin/sh embed_h.SH
-$(TOP)/cflags: $(TOP)/config.sh; cd $(TOP); /bin/sh cflags.SH
-
-!NO!SUBS!
-chmod 644 Makefile
-$eunicefix Makefile
diff --git a/ext/POSIX/Makefile.PL b/ext/POSIX/Makefile.PL
new file mode 100644
index 0000000000..3717a0a2a7
--- /dev/null
+++ b/ext/POSIX/Makefile.PL
@@ -0,0 +1,2 @@
+use ExtUtils::MakeMaker;
+WriteMakefile(LIBS => ["-lm -lposix -lcposix"]);
diff --git a/ext/POSIX/Makefile.SH b/ext/POSIX/Makefile.SH
deleted file mode 100644
index 13a8faa116..0000000000
--- a/ext/POSIX/Makefile.SH
+++ /dev/null
@@ -1,207 +0,0 @@
-: This forces SH files to create target in same directory as SH file.
-: This is so that make depend always knows where to find SH derivatives.
-
-case "$0" in
-*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
-esac
-
-if test -f config.sh; then TOP=.;
-elif test -f ../config.sh; then TOP=..;
-elif test -f ../../config.sh; then TOP=../..;
-elif test -f ../../../config.sh; then TOP=../../..;
-elif test -f ../../../../config.sh; then TOP=../../../..;
-else
- echo "Can't find config.sh."; exit 1
-fi
-
-: Find absolute path name for TOP. This is needed when we cd to TOP
-: to run perl on autosplit.
-oldpwd=`pwd`; cd $TOP; ABSTOP=`pwd`; cd $oldpwd
-
-case $CONFIG in
-'')
- . $TOP/config.sh
- ;;
-esac
-
-: Find out directory name. This is also the extension name.
-ext=`pwd | $sed -e 's@.*/@@'`
-
-: This extension might have its own typemap
-if test -f typemap; then
- exttypemap='typemap'
-else
- exttypemap=''
-fi
-
-: This extension might need additional libraries.
-potential_libs="-lm -lposix -lcposix "
-. $TOP/ext/util/extliblist
-
-: This extension might need bootstrap support
-if test -f ${ext}_BS; then
- bootdep=${ext}_BS
-else
- bootdep=''
-fi
-
-case "$dlsrc" in
-dl_aix*)
- echo "#!" > $ext.exp
- echo "boot_$ext" >> $ext.exp
- ;;
-esac
-
-echo "Extracting ext/$ext/Makefile (with variable substitutions)"
-: This section of the file will have variable substitutions done on it.
-: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
-: Protect any dollar signs and backticks that you do not want interpreted
-: by putting a backslash in front. You may delete these comments.
-$spitshell >Makefile << !GROK!THIS!
-#
-# This Makefile is for the $ext extension to perl.
-#
-CC = $cc
-RANLIB = $ranlib
-TOP = $TOP
-ABSTOP = $ABSTOP
-LDFLAGS = $ldflags
-CLDFLAGS = $ldflags
-SMALL = $small
-LARGE = $large $split
-
-# To use an alternate make, set \$altmake in config.sh.
-MAKE = ${altmake-make}
-
-EXT = $ext
-
-# $ext might have its own typemap
-EXTTYPEMAP = $exttypemap
-
-# $ext might have its own bootstrap support
-BOOTDEP = $bootdep
-BOOTSTRAP = $ext.bs
-
-# The following are used to build and install shared libraries for
-# dynamic loading.
-LDDLFLAGS = $lddlflags
-CCDLFLAGS = $ccdlflags
-CCCDLFLAGS = $cccdlflags
-SO = $so
-DLEXT = $dlext
-
-# $ext might need to be linked with some extra libraries.
-# EXTRALIBS = full list of libraries needed for static linking.
-# Only those libraries that actually exist are included.
-# DYNLOADLIBS = list of those libraries that are needed but can be
-# linked in dynamically on this platform. On SunOS, for
-# example, this would be .so* libraries, but not archive
-# libraries. The bootstrap file is installed only if
-# this list is not empty.
-# STATLOADLIBS = list of those libraries which must be statically
-# linked into the shared library. On SunOS 4.1.3,
-# for example, I have only an archive version of
-# -lm, and it must be linked in statically.
-EXTRALIBS = $extralibs
-DYNALOADLIBS = $dynaloadlibs
-STATLOADLIBS = $statloadlibs
-
-!GROK!THIS!
-
-$spitshell >>Makefile <<'!NO!SUBS!'
-
-# Where to put things:
-AUTO = $(TOP)/lib/auto
-INSTALLBOOT = $(AUTO)/$(EXT)/$(EXT).bs
-INSTALLDYNAMIC = $(AUTO)/$(EXT)/$(EXT).$(DLEXT)
-INSTALLSTATIC = $(EXT).a
-INSTALLPM = $(TOP)/lib/$(EXT).pm
-
-PERL = $(ABSTOP)/miniperl
-XSUBPP = $(TOP)/ext/xsubpp
-SHELL = /bin/sh
-CCCMD = `sh $(shellflags) $(TOP)/cflags $@`
-
-.c.o:
- $(CCCMD) $(CCCDLFLAGS) -I$(TOP) $*.c
-
-all: dynamic
-# Phony target to force checking subdirectories.
-FORCE:
-
-config:
-
-# Target for Dynamic Loading:
-dynamic: $(INSTALLDYNAMIC) $(INSTALLPM) $(INSTALLBOOT)
-
-$(INSTALLDYNAMIC): $(EXT).o
- @test -d $(AUTO) || mkdir $(AUTO)
- @test -d $(AUTO)/$(EXT) || mkdir $(AUTO)/$(EXT)
- ld $(LDDLFLAGS) -o $@ $(EXT).o $(STATLOADLIBS)
-
-$(BOOTSTRAP): Makefile $(BOOTDEP)
- $(PERL) -I$(TOP)/lib $(TOP)/ext/util/mkbootstrap $(DYNALOADLIBS)
- touch $(BOOTSTRAP)
-
-$(INSTALLBOOT): $(BOOTSTRAP)
- @test ! -s $(BOOTSTRAP) || cp $(BOOTSTRAP) $@
-
-# Target for Static Loading:
-static: $(INSTALLSTATIC) $(INSTALLPM)
-
-$(INSTALLSTATIC): $(EXT).o
- ar cr $@ $(EXT).o
- $(RANLIB) $@
- echo $(EXTRALIBS) >> $(TOP)/ext.libs
-
-$(EXT).c: $(EXT).xs $(XSUBPP) $(TOP)/ext/typemap $(EXTTYPEMAP) $(TOP)/cflags Makefile
- $(PERL) $(XSUBPP) $(EXT).xs >tmp
- mv tmp $@
-
-$(INSTALLPM): $(EXT).pm
- rm -f $@
- cp $(EXT).pm $@
- cd $(TOP); $(PERL) autosplit $(EXT)
-
-clean:
- rm -f *.o *.a mon.out core $(EXT).c so_locations $(BOOTSTRAP) $(EXT).exp
-
-realclean: clean
- rm -f makefile Makefile
- rm -f $(INSTALLPM) $(INSTALLDYNAMIC) $(INSTALLSTATIC) $(INSTALLBOOT)
- rm -rf $(AUTO)/$(EXT)
-
-purge: realclean
-
-$(EXT).o : $(TOP)/EXTERN.h
-$(EXT).o : $(TOP)/perl.h
-$(EXT).o : $(TOP)/embed.h
-$(EXT).o : $(TOP)/config.h
-$(EXT).o : $(TOP)/unixish.h
-$(EXT).o : $(TOP)/handy.h
-$(EXT).o : $(TOP)/regexp.h
-$(EXT).o : $(TOP)/sv.h
-$(EXT).o : $(TOP)/util.h
-$(EXT).o : $(TOP)/form.h
-$(EXT).o : $(TOP)/gv.h
-$(EXT).o : $(TOP)/cv.h
-$(EXT).o : $(TOP)/opcode.h
-$(EXT).o : $(TOP)/op.h
-$(EXT).o : $(TOP)/cop.h
-$(EXT).o : $(TOP)/av.h
-$(EXT).o : $(TOP)/hv.h
-$(EXT).o : $(TOP)/mg.h
-$(EXT).o : $(TOP)/scope.h
-$(EXT).o : $(TOP)/pp.h
-$(EXT).o : $(TOP)/proto.h
-$(EXT).o : $(TOP)/XSUB.h
-
-Makefile: Makefile.SH $(TOP)/config.sh ; /bin/sh Makefile.SH
-$(TOP)/config.h: $(TOP)/config.sh; cd $(TOP); /bin/sh config_h.SH
-$(TOP)/embed.h: $(TOP)/config.sh; cd $(TOP); /bin/sh embed_h.SH
-$(TOP)/cflags: $(TOP)/config.sh; cd $(TOP); /bin/sh cflags.SH
-
-!NO!SUBS!
-chmod 644 Makefile
-$eunicefix Makefile
-
diff --git a/ext/SDBM_File/Makefile.PL b/ext/SDBM_File/Makefile.PL
new file mode 100644
index 0000000000..17c16b104b
--- /dev/null
+++ b/ext/SDBM_File/Makefile.PL
@@ -0,0 +1,19 @@
+use ExtUtils::MakeMaker;
+
+# The existence of the ./sdbm/Makefile.PL file causes MakeMaker
+# to automatically include Makefile code for the targets
+# config, all, clean, realclean and sdbm/Makefile
+# which perform the corresponding actions in the subdirectory.
+
+WriteMakefile(
+ 'MYEXTLIB' => 'sdbm/libsdbm.a',
+);
+
+
+sub MY::postamble {
+ '
+$(MYEXTLIB): sdbm/Makefile
+ cd sdbm; $(MAKE) all
+';
+}
+
diff --git a/ext/SDBM_File/Makefile.SH b/ext/SDBM_File/Makefile.SH
deleted file mode 100644
index 1f181e3b09..0000000000
--- a/ext/SDBM_File/Makefile.SH
+++ /dev/null
@@ -1,216 +0,0 @@
-: This forces SH files to create target in same directory as SH file.
-: This is so that make depend always knows where to find SH derivatives.
-
-case "$0" in
-*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
-esac
-
-if test -f config.sh; then TOP=.;
-elif test -f ../config.sh; then TOP=..;
-elif test -f ../../config.sh; then TOP=../..;
-elif test -f ../../../config.sh; then TOP=../../..;
-elif test -f ../../../../config.sh; then TOP=../../../..;
-else
- echo "Can't find config.sh."; exit 1
-fi
-
-: Find absolute path name for TOP. This is needed when we cd to TOP
-: to run perl on autosplit.
-oldpwd=`pwd`; cd $TOP; ABSTOP=`pwd`; cd $oldpwd
-
-case $CONFIG in
-'')
- . $TOP/config.sh
- ;;
-esac
-
-: Find out directory name. This is also the extension name.
-ext=`pwd | $sed -e 's@.*/@@'`
-
-: This extension might have its own typemap
-if test -f typemap; then
- exttypemap='typemap'
-else
- exttypemap=''
-fi
-
-: This extension might need additional libraries.
-potential_libs=" "
-. $TOP/ext/util/extliblist
-
-: This extension might need bootstrap support
-if test -f ${ext}_BS; then
- bootdep=${ext}_BS
-else
- bootdep=''
-fi
-
-case "$dlsrc" in
-dl_aix*)
- echo "#!" > $ext.exp
- echo "boot_$ext" >> $ext.exp
- ;;
-esac
-
-echo "Extracting ext/$ext/Makefile (with variable substitutions)"
-: This section of the file will have variable substitutions done on it.
-: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
-: Protect any dollar signs and backticks that you do not want interpreted
-: by putting a backslash in front. You may delete these comments.
-$spitshell >Makefile << !GROK!THIS!
-#
-# This Makefile is for the $ext extension to perl.
-#
-CC = $cc
-RANLIB = $ranlib
-TOP = $TOP
-ABSTOP = $ABSTOP
-LDFLAGS = $ldflags
-CLDFLAGS = $ldflags
-SMALL = $small
-LARGE = $large $split
-
-# To use an alternate make, set \$altmake in config.sh.
-MAKE = ${altmake-make}
-
-EXT = $ext
-
-# $ext might have its own typemap
-EXTTYPEMAP = $exttypemap
-
-# $ext might have its own bootstrap support
-BOOTDEP = $bootdep
-BOOTSTRAP = $ext.bs
-
-# The following are used to build and install shared libraries for
-# dynamic loading.
-LDDLFLAGS = $lddlflags
-CCDLFLAGS = $ccdlflags
-CCCDLFLAGS = $cccdlflags
-SO = $so
-DLEXT = $dlext
-
-# $ext might need to be linked with some extra libraries.
-# EXTRALIBS = full list of libraries needed for static linking.
-# Only those libraries that actually exist are included.
-# DYNLOADLIBS = list of those libraries that are needed but can be
-# linked in dynamically on this platform. On SunOS, for
-# example, this would be .so* libraries, but not archive
-# libraries. The bootstrap file is installed only if
-# this list is not empty.
-# STATLOADLIBS = list of those libraries which must be statically
-# linked into the shared library. On SunOS 4.1.3,
-# for example, I have only an archive version of
-# -lm, and it must be linked in statically.
-EXTRALIBS = $extralibs
-DYNALOADLIBS = $dynaloadlibs
-STATLOADLIBS = $statloadlibs
-
-!GROK!THIS!
-
-$spitshell >>Makefile <<'!NO!SUBS!'
-
-# Where to put things:
-AUTO = $(TOP)/lib/auto
-INSTALLBOOT = $(AUTO)/$(EXT)/$(EXT).bs
-INSTALLDYNAMIC = $(AUTO)/$(EXT)/$(EXT).$(DLEXT)
-INSTALLSTATIC = $(EXT).a
-INSTALLPM = $(TOP)/lib/$(EXT).pm
-
-PERL = $(ABSTOP)/miniperl
-XSUBPP = $(TOP)/ext/xsubpp
-SHELL = /bin/sh
-CCCMD = `sh $(shellflags) $(TOP)/cflags $@`
-
-.c.o:
- $(CCCMD) $(CCCDLFLAGS) -I$(TOP) $*.c
-
-all: dynamic
-# Phony target to force checking subdirectories.
-FORCE:
-
-config:
-
-# Target for Dynamic Loading:
-dynamic: $(INSTALLDYNAMIC) $(INSTALLPM) $(INSTALLBOOT)
-
-$(INSTALLDYNAMIC): $(EXT).o sdbm/libsdbm.a
- @test -d $(AUTO) || mkdir $(AUTO)
- @test -d $(AUTO)/$(EXT) || mkdir $(AUTO)/$(EXT)
- ld $(LDDLFLAGS) -o $@ $(EXT).o sdbm/libsdbm.a $(STATLOADLIBS)
-
-$(BOOTSTRAP): Makefile $(BOOTDEP)
- $(PERL) -I$(TOP)/lib $(TOP)/ext/util/mkbootstrap $(DYNALOADLIBS)
- touch $(BOOTSTRAP)
-
-$(INSTALLBOOT): $(BOOTSTRAP)
- @test ! -s $(BOOTSTRAP) || cp $(BOOTSTRAP) $@
-
-# Target for Static Loading:
-static: $(INSTALLSTATIC) $(INSTALLPM)
-
-$(INSTALLSTATIC): $(EXT).o sdbm/libsdbm.a
- cp sdbm/libsdbm.a $@
- ar r $@ $(EXT).o
- $(RANLIB) $@
- echo $(EXTRALIBS) >> $(TOP)/ext.libs
-
-$(EXT).c: $(EXT).xs $(XSUBPP) $(TOP)/ext/typemap $(EXTTYPEMAP) $(TOP)/cflags Makefile
- $(PERL) $(XSUBPP) $(EXT).xs >tmp
- mv tmp $@
-
-sdbm/libsdbm.a: FORCE
- @cd sdbm; \
- if test ! -f Makefile ; then \
- test -f Makefile.SH && sh Makefile.SH ; \
- fi ; $(MAKE)
-
-$(INSTALLPM): $(EXT).pm
- rm -f $@
- cp $(EXT).pm $@
- cd $(TOP); $(PERL) autosplit $(EXT)
-
-clean:
- -cd sdbm; $(MAKE) clean
- rm -f *.o *.a mon.out core $(EXT).c so_locations $(BOOTSTRAP) $(EXT).exp
-
-realclean: clean
- -cd sdbm; $(MAKE) realclean
- rm -f makefile Makefile
- rm -f $(INSTALLPM) $(INSTALLDYNAMIC) $(INSTALLSTATIC) $(INSTALLBOOT)
- rm -rf $(AUTO)/$(EXT)
-
-purge: realclean
-
-$(EXT).o : $(TOP)/EXTERN.h
-$(EXT).o : $(TOP)/perl.h
-$(EXT).o : $(TOP)/embed.h
-$(EXT).o : $(TOP)/config.h
-$(EXT).o : $(TOP)/unixish.h
-$(EXT).o : $(TOP)/handy.h
-$(EXT).o : $(TOP)/regexp.h
-$(EXT).o : $(TOP)/sv.h
-$(EXT).o : $(TOP)/util.h
-$(EXT).o : $(TOP)/form.h
-$(EXT).o : $(TOP)/gv.h
-$(EXT).o : $(TOP)/cv.h
-$(EXT).o : $(TOP)/opcode.h
-$(EXT).o : $(TOP)/op.h
-$(EXT).o : $(TOP)/cop.h
-$(EXT).o : $(TOP)/av.h
-$(EXT).o : $(TOP)/hv.h
-$(EXT).o : $(TOP)/mg.h
-$(EXT).o : $(TOP)/scope.h
-$(EXT).o : $(TOP)/pp.h
-$(EXT).o : $(TOP)/proto.h
-$(EXT).o : $(TOP)/XSUB.h
-
-Makefile: Makefile.SH $(TOP)/config.sh ; /bin/sh Makefile.SH
-$(TOP)/config.h: $(TOP)/config.sh; cd $(TOP); /bin/sh config_h.SH
-$(TOP)/embed.h: $(TOP)/config.sh; cd $(TOP); /bin/sh embed_h.SH
-$(TOP)/cflags: $(TOP)/config.sh; cd $(TOP); /bin/sh cflags.SH
-
-!NO!SUBS!
-chmod 644 Makefile
-$eunicefix Makefile
-
diff --git a/ext/SDBM_File/sdbm/Makefile.PL b/ext/SDBM_File/sdbm/Makefile.PL
new file mode 100644
index 0000000000..1994f052b4
--- /dev/null
+++ b/ext/SDBM_File/sdbm/Makefile.PL
@@ -0,0 +1,49 @@
+use ExtUtils::MakeMaker;
+WriteMakefile(
+ 'LINKTYPE' => 'static',
+ 'DEFINE' => '-DSDBM -DDUFF',
+ 'SKIP' => [qw(static static_lib dynamic dynamic_lib)],
+ 'clean'
+ => {'FILES' => 'dbu libsdbm.a dbd dba dbe x-dbu *.dir *.pag'}
+);
+
+
+sub MY::top_targets {
+ '
+LIBOBJS = sdbm.o pair.o hash.o
+LIBSRCS = sdbm.c pair.c hash.c
+HDRS = tune.h sdbm.h pair.h
+
+all :: static
+
+static :: libsdbm.a
+
+libsdbm.a: $(LIBOBJS)
+ ar cr libsdbm.a $(LIBOBJS)
+ $(RANLIB) libsdbm.a
+
+$(LIBOBJS): $(HDRS) $(PERL_INC)/config.h
+
+config ::
+
+lint:
+ lint -abchx $(LIBSRCS)
+';
+}
+
+
+sub MY::realclean {
+ '
+realclean :: clean
+ rm -f Makefile
+';
+}
+
+
+sub MY::postamble {
+ '
+sdbm.o : sdbm.c $(PERL_INC)/config.h sdbm.h tune.h pair.h
+hash.o : hash.c $(PERL_INC)/config.h sdbm.h
+pair.o : pair.c $(PERL_INC)/config.h sdbm.h tune.h pair.h
+';
+}
diff --git a/ext/SDBM_File/sdbm/Makefile.SH b/ext/SDBM_File/sdbm/Makefile.SH
deleted file mode 100644
index 521c97270a..0000000000
--- a/ext/SDBM_File/sdbm/Makefile.SH
+++ /dev/null
@@ -1,99 +0,0 @@
-: This forces SH files to create target in same directory as SH file.
-: This is so that make depend always knows where to find SH derivatives.
-
-case "$0" in
-*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
-esac
-
-if test -f config.sh; then TOP=.;
-elif test -f ../config.sh; then TOP=..;
-elif test -f ../../config.sh; then TOP=../..;
-elif test -f ../../../config.sh; then TOP=../../..;
-elif test -f ../../../../config.sh; then TOP=../../../..;
-else
- echo "Can't find config.sh."; exit 1
-fi
-
-: Find absolute path name for TOP. This is needed when we cd to TOP
-: to run perl on autosplit.
-oldpwd=`pwd`; cd $TOP; ABSTOP=`pwd`; cd $oldpwd
-
-case $CONFIG in
-'')
- . $TOP/config.sh
- ;;
-esac
-
-echo "Extracting ext/SDBM_File/sdbm/Makefile (with variable substitutions)"
-: This section of the file will have variable substitutions done on it.
-: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
-: Protect any dollar signs and backticks that you do not want interpreted
-: by putting a backslash in front. You may delete these comments.
-$spitshell >Makefile <<!GROK!THIS!
-#
-# This Makefile is for the library part of sdbm. For the
-# Full package, see makefile.sdbm.
-#
-# Makefile for public domain ndbm-clone: sdbm
-# DUFF: use duff's device (loop unroll) in parts of the code
-#
-#
-CC = $cc
-RANLIB = $ranlib
-TOP = $TOP
-ABSTOP = $ABSTOP
-LDFLAGS = $ldflags
-CLDFLAGS = $ldflags
-SMALL = $small
-LARGE = $large $split
-
-# To use an alternate make, set \$altmake in config.sh.
-MAKE = ${altmake-make}
-
-# The following are used to build and install shared libraries for
-# dynamic loading.
-LDDLFLAGS = $lddlflags
-CCDLFLAGS = $ccdlflags
-CCCDLFLAGS = $cccdlflags
-
-!GROK!THIS!
-
-: In the following dollars and backticks do not need the extra backslash.
-$spitshell >>Makefile <<'!NO!SUBS!'
-SHELL = /bin/sh
-CCCMD = `sh $(shellflags) $(TOP)/cflags $@`
-
-.c.o:
- $(CCCMD) $(CCCDLFLAGS) -I$(TOP) -DSDBM -DDUFF $*.c
-
-LIBOBJS = sdbm.o pair.o hash.o
-LIBSRCS = sdbm.c pair.c hash.c
-HDRS = tune.h sdbm.h pair.h $(TOP)/config.h
-
-all: libsdbm.a
-
-libsdbm.a: $(LIBOBJS)
- ar cr libsdbm.a $(LIBOBJS)
- $(RANLIB) libsdbm.a
-
-$(LIBOBJS): $(HDRS)
-
-lint:
- lint -abchx $(LIBSRCS)
-
-clean:
- rm -f *.o *.a mon.out core
-
-realclean: clean
- rm -f dbu libsdbm.a dbd dba dbe x-dbu *.dir *.pag
- rm -f makefile Makefile
-
-purge: realclean
-
-sdbm.o : sdbm.c $(TOP)/config.h sdbm.h tune.h pair.h
-hash.o : hash.c $(TOP)/config.h sdbm.h
-pair.o : pair.c $(TOP)/config.h sdbm.h tune.h pair.h
-
-!NO!SUBS!
-chmod 755 Makefile
-$eunicefix Makefile
diff --git a/ext/Socket/Makefile.PL b/ext/Socket/Makefile.PL
new file mode 100644
index 0000000000..414df14f22
--- /dev/null
+++ b/ext/Socket/Makefile.PL
@@ -0,0 +1,2 @@
+use ExtUtils::MakeMaker;
+WriteMakefile();
diff --git a/ext/Socket/Makefile.SH b/ext/Socket/Makefile.SH
deleted file mode 100644
index 064228e512..0000000000
--- a/ext/Socket/Makefile.SH
+++ /dev/null
@@ -1,207 +0,0 @@
-: This forces SH files to create target in same directory as SH file.
-: This is so that make depend always knows where to find SH derivatives.
-
-case "$0" in
-*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
-esac
-
-if test -f config.sh; then TOP=.;
-elif test -f ../config.sh; then TOP=..;
-elif test -f ../../config.sh; then TOP=../..;
-elif test -f ../../../config.sh; then TOP=../../..;
-elif test -f ../../../../config.sh; then TOP=../../../..;
-else
- echo "Can't find config.sh."; exit 1
-fi
-
-: Find absolute path name for TOP. This is needed when we cd to TOP
-: to run perl on autosplit.
-oldpwd=`pwd`; cd $TOP; ABSTOP=`pwd`; cd $oldpwd
-
-case $CONFIG in
-'')
- . $TOP/config.sh
- ;;
-esac
-
-: Find out directory name. This is also the extension name.
-ext=`pwd | $sed -e 's@.*/@@'`
-
-: This extension might have its own typemap
-if test -f typemap; then
- exttypemap='typemap'
-else
- exttypemap=''
-fi
-
-: This extension might need additional libraries.
-potential_libs=" "
-. $TOP/ext/util/extliblist
-
-: This extension might need bootstrap support
-if test -f ${ext}_BS; then
- bootdep=${ext}_BS
-else
- bootdep=''
-fi
-
-case "$dlsrc" in
-dl_aix*)
- echo "#!" > $ext.exp
- echo "boot_$ext" >> $ext.exp
- ;;
-esac
-
-echo "Extracting ext/$ext/Makefile (with variable substitutions)"
-: This section of the file will have variable substitutions done on it.
-: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
-: Protect any dollar signs and backticks that you do not want interpreted
-: by putting a backslash in front. You may delete these comments.
-$spitshell >Makefile << !GROK!THIS!
-#
-# This Makefile is for the $ext extension to perl.
-#
-CC = $cc
-RANLIB = $ranlib
-TOP = $TOP
-ABSTOP = $ABSTOP
-LDFLAGS = $ldflags
-CLDFLAGS = $ldflags
-SMALL = $small
-LARGE = $large $split
-
-# To use an alternate make, set \$altmake in config.sh.
-MAKE = ${altmake-make}
-
-EXT = $ext
-
-# $ext might have its own typemap
-EXTTYPEMAP = $exttypemap
-
-# $ext might have its own bootstrap support
-BOOTDEP = $bootdep
-BOOTSTRAP = $ext.bs
-
-# The following are used to build and install shared libraries for
-# dynamic loading.
-LDDLFLAGS = $lddlflags
-CCDLFLAGS = $ccdlflags
-CCCDLFLAGS = $cccdlflags
-SO = $so
-DLEXT = $dlext
-
-# $ext might need to be linked with some extra libraries.
-# EXTRALIBS = full list of libraries needed for static linking.
-# Only those libraries that actually exist are included.
-# DYNLOADLIBS = list of those libraries that are needed but can be
-# linked in dynamically on this platform. On SunOS, for
-# example, this would be .so* libraries, but not archive
-# libraries. The bootstrap file is installed only if
-# this list is not empty.
-# STATLOADLIBS = list of those libraries which must be statically
-# linked into the shared library. On SunOS 4.1.3,
-# for example, I have only an archive version of
-# -lm, and it must be linked in statically.
-EXTRALIBS = $extralibs
-DYNALOADLIBS = $dynaloadlibs
-STATLOADLIBS = $statloadlibs
-
-!GROK!THIS!
-
-$spitshell >>Makefile <<'!NO!SUBS!'
-
-# Where to put things:
-AUTO = $(TOP)/lib/auto
-INSTALLBOOT = $(AUTO)/$(EXT)/$(EXT).bs
-INSTALLDYNAMIC = $(AUTO)/$(EXT)/$(EXT).$(DLEXT)
-INSTALLSTATIC = $(EXT).a
-INSTALLPM = $(TOP)/lib/$(EXT).pm
-
-PERL = $(ABSTOP)/miniperl
-XSUBPP = $(TOP)/ext/xsubpp
-SHELL = /bin/sh
-CCCMD = `sh $(shellflags) $(TOP)/cflags $@`
-
-.c.o:
- $(CCCMD) $(CCCDLFLAGS) -I$(TOP) $*.c
-
-all: dynamic
-# Phony target to force checking subdirectories.
-FORCE:
-
-config:
-
-# Target for Dynamic Loading:
-dynamic: $(INSTALLDYNAMIC) $(INSTALLPM) $(INSTALLBOOT)
-
-$(INSTALLDYNAMIC): $(EXT).o
- @test -d $(AUTO) || mkdir $(AUTO)
- @test -d $(AUTO)/$(EXT) || mkdir $(AUTO)/$(EXT)
- ld $(LDDLFLAGS) -o $@ $(EXT).o $(STATLOADLIBS)
-
-$(BOOTSTRAP): Makefile $(BOOTDEP)
- $(PERL) -I$(TOP)/lib $(TOP)/ext/util/mkbootstrap $(DYNALOADLIBS)
- touch $(BOOTSTRAP)
-
-$(INSTALLBOOT): $(BOOTSTRAP)
- @test ! -s $(BOOTSTRAP) || cp $(BOOTSTRAP) $@
-
-# Target for Static Loading:
-static: $(INSTALLSTATIC) $(INSTALLPM)
-
-$(INSTALLSTATIC): $(EXT).o
- ar cr $@ $(EXT).o
- $(RANLIB) $@
- echo $(EXTRALIBS) >> $(TOP)/ext.libs
-
-$(EXT).c: $(EXT).xs $(XSUBPP) $(TOP)/ext/typemap $(EXTTYPEMAP) $(TOP)/cflags Makefile
- $(PERL) $(XSUBPP) $(EXT).xs >tmp
- mv tmp $@
-
-$(INSTALLPM): $(EXT).pm
- rm -f $@
- cp $(EXT).pm $@
- cd $(TOP); $(PERL) autosplit $(EXT)
-
-clean:
- rm -f *.o *.a mon.out core $(EXT).c so_locations $(BOOTSTRAP) $(EXT).exp
-
-realclean: clean
- rm -f makefile Makefile
- rm -f $(INSTALLPM) $(INSTALLDYNAMIC) $(INSTALLSTATIC) $(INSTALLBOOT)
- rm -rf $(AUTO)/$(EXT)
-
-purge: realclean
-
-$(EXT).o : $(TOP)/EXTERN.h
-$(EXT).o : $(TOP)/perl.h
-$(EXT).o : $(TOP)/embed.h
-$(EXT).o : $(TOP)/config.h
-$(EXT).o : $(TOP)/unixish.h
-$(EXT).o : $(TOP)/handy.h
-$(EXT).o : $(TOP)/regexp.h
-$(EXT).o : $(TOP)/sv.h
-$(EXT).o : $(TOP)/util.h
-$(EXT).o : $(TOP)/form.h
-$(EXT).o : $(TOP)/gv.h
-$(EXT).o : $(TOP)/cv.h
-$(EXT).o : $(TOP)/opcode.h
-$(EXT).o : $(TOP)/op.h
-$(EXT).o : $(TOP)/cop.h
-$(EXT).o : $(TOP)/av.h
-$(EXT).o : $(TOP)/hv.h
-$(EXT).o : $(TOP)/mg.h
-$(EXT).o : $(TOP)/scope.h
-$(EXT).o : $(TOP)/pp.h
-$(EXT).o : $(TOP)/proto.h
-$(EXT).o : $(TOP)/XSUB.h
-
-Makefile: Makefile.SH $(TOP)/config.sh ; /bin/sh Makefile.SH
-$(TOP)/config.h: $(TOP)/config.sh; cd $(TOP); /bin/sh config_h.SH
-$(TOP)/embed.h: $(TOP)/config.sh; cd $(TOP); /bin/sh embed_h.SH
-$(TOP)/cflags: $(TOP)/config.sh; cd $(TOP); /bin/sh cflags.SH
-
-!NO!SUBS!
-chmod 644 Makefile
-$eunicefix Makefile
-
diff --git a/ext/util/make_ext b/ext/util/make_ext
index fba77c0c9f..05f43761e9 100644
--- a/ext/util/make_ext
+++ b/ext/util/make_ext
@@ -7,8 +7,10 @@
# It may be deleted in a later release of perl so try to
# avoid using it for other purposes.
-linktype=$1
-extspec=$2
+target=$1; shift
+extspec=$1; shift
+passthru="$*" # allow extra macro=value to be passed through
+echo ""
case $CONFIG in
'')
@@ -31,33 +33,39 @@ fi
# convert old style Name.a into ext/Name/Name.a format
case "$extspec" in
-ext/*) ;;
-*) extspec=`echo "$extspec" | sed -e 's:\(.*\)\.\(.*\):ext/\1/\1.\2:'`
+ext/*) ;;
+*::*) extspec=`echo "$extspec" | sed -e 's!\(.*\)::\(.*\)!ext/\1/\2/\2.a!'` ;;
+*) extspec=`echo "$extspec" | sed -e 's:\(.*\)\.\(.*\):ext/\1/\1.\2:'` ;;
esac
# get extension directory path, module name and depth
pname=`echo "$extspec" | sed -e 's:^ext/::' -e 's:/[^/]*$::'`
mname=`echo "$pname" | sed -e 's!/!::!'`
depth=`echo "$pname" | sed -e 's![^/][^/]*!..!g'`
+make=${altmake-make}
+makeargs=''
if test ! -d "ext/$pname"; then
- echo " Skipping $extspec (directory does not exist)"
- exit 0 # not an error ?
+ echo " Skipping $extspec (directory does not exist)"
+ exit 0 # not an error ?
fi
-# check link type and do any preliminaries
-case "$linktype" in
-static) makeargs='CCCDLFLAGS=' ;;
-dynamic) makeargs='' ;;
-*) echo "make_ext: unknown link type '$linktype'"; exit 1;;
-'') echo "make_ext: no link type specified (eg static or dynamic)"; exit 1;;
-esac
-echo ""
-echo " Making $mname ($linktype)"
+echo " Making $mname ($target)"
cd ext/$pname
+# check link type and do any preliminaries
+case "$target" in
+ # convert 'static' or 'dynamic' into 'all LINKTYPE=XXX'
+static) makeargs="LINKTYPE=static CCCDLFLAGS="; target=all ;;
+dynamic) makeargs="LINKTYPE=dynamic"; target=all ;;
+*clean) ;;
+*) # for the time being we are strict about what make_ext is used for
+ echo "make_ext: unknown make target '$target'"; exit 1;;
+'') echo "make_ext: no make target specified (eg static or dynamic)"; exit 1;;
+esac
+
if test ! -f Makefile ; then
test -f Makefile.PL && ../$depth/miniperl -I../$depth/lib Makefile.PL
fi
@@ -65,10 +73,12 @@ if test ! -f Makefile ; then
test -f Makefile.SH && sh Makefile.SH
fi
-make=${altmake-make}
-
-$make config
+case "$target" in
+clean) ;;
+realclean) ;;
+*) $make config $passthru;;
+esac
-$make $linktype $makeargs
+$make $target $makeargs $passthru || exit
exit $?