ext/DynaLoader/dlutils.c Dynamic loader utilities for dl_*.xs files
ext/DynaLoader/dl_vmesa.xs VM/ESA implementation
ext/DynaLoader/dl_vms.xs VMS implementation
+ext/DynaLoader/dl_win32.xs Win32 implementation
ext/DynaLoader/DynaLoader_pm.PL Dynamic Loader perl module
ext/DynaLoader/hints/aix.pl Hint for DynaLoader for named architecture
ext/DynaLoader/hints/gnukfreebsd.pl Hint for DynaLoader for named architecture
win32/config.vc64 Win64 base line config.sh (Visual C++ build)
win32/create_perllibst_h.pl creates perllibst.h file for inclusion from perllib.c
win32/distclean.bat Remove _ALL_ files not listed here in MANIFEST
-win32/dl_win32.xs Win32 port
win32/fcrypt.c crypt() implementation
win32/FindExt.pm Scan for extensions
win32/FindExt.t Test FindExt.pm
# If '--static' is specified, static extensions will be built.
# If '--dynamic' is specified, dynamic extensions will be built.
# If '--nonxs' is specified, nonxs extensions will be built.
+# If '--dynaloader' is specificied, DynaLoader will be built.
# If '--all' is specified, all extensions will be built.
#
# make_ext.pl "MAKE=make [-make_opts]" --dir=directory [--target=target] [--static|--dynamic|--all] +ext2 !ext1
my $static = $opts{static} || $opts{all};
my $dynamic = $opts{dynamic} || $opts{all};
my $nonxs = $opts{nonxs} || $opts{all};
+my $dynaloader = $opts{dynaloader} || $opts{all};
# The Perl Makefile.SH will expand all extensions to
# lib/auto/X/X.a (or lib/auto/X/Y/Y.a if nested)
die "$0: unknown make target '$target'\n";
}
-if (!@extspec and !$static and !$dynamic and !$nonxs) {
+if (!@extspec and !$static and !$dynamic and !$nonxs and !$dynaloader) {
die "$0: no extension specified\n";
}
push @ext, FindExt::static_ext() if $static;
push @ext, FindExt::dynamic_ext() if $dynamic;
push @ext, FindExt::nonxs_ext() if $nonxs;
+ push @ext, 'DynaLoader' if $dynaloader;
foreach (sort @ext) {
if (%incl and !exists $incl{$_}) {
next;
}
push @extspec, $_;
- if(FindExt::is_static($_)) {
+ if($_ eq 'DynaLoader') {
+ # No, we don't know why nmake can't work out the dependency chain
+ push @{$extra_passthrough{$_}}, 'DynaLoader.c';
+ } elsif(FindExt::is_static($_)) {
push @{$extra_passthrough{$_}}, 'LINKTYPE=static';
}
}
push @extspec, (split ' ', $Config{static_ext}) if $static;
push @extspec, (split ' ', $Config{dynamic_ext}) if $dynamic;
push @extspec, (split ' ', $Config{nonxs_ext}) if $nonxs;
+ push @extspec, 'DynaLoader' if $dynaloader;
}
{
WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC)
!ENDIF
-DLL_SRC = $(DYNALOADER).c
-
X2P_SRC = \
..\x2p\a2p.c \
..\x2p\hash.c \
$(MINIDIR)\perlio$(o)
MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
-DLL_OBJ = $(DLL_SRC:.c=.obj)
+DLL_OBJ = $(DYNALOADER)
X2P_OBJ = $(X2P_SRC:.c=.obj)
GENUUDMAP_OBJ = $(GENUUDMAP:.exe=.obj)
STATIC_EXT = Win32CORE
!ENDIF
-DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
+DYNALOADER = ..\DynaLoader$(o)
CFG_VARS = \
"INST_DRV=$(INST_DRV)" \
$(UNIDATAFILES) $(PERLEXE) $(X2P) Extensions_reonly
@echo Perl and 're' are up to date.
-$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
-
static: $(PERLEXESTATIC)
#------------------------------------------------------------
$(LIBFILES) $(PERLEXEST_OBJ) $(SETARGV_OBJ) $(PERLEXE_RES)
$(EMBED_EXE_MANI)
-$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM) Extensions_nonxs
- if not exist $(AUTODIR) mkdir $(AUTODIR)
- cd $(EXTDIR)\$(*B)
- ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
- ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
- cd ..\..\win32
- $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
- $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
- cd $(EXTDIR)\$(*B)
- $(XSUBPP) dl_win32.xs > $(*B).c
- cd ..\..\win32
-
-$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
- copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
-
MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
$(MINIPERL) -I..\lib $(ICWD) ..\mkppport
-if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\mkppport --clean
#-------------------------------------------------------------------------------
-# The rule for $(DYNALOADER).c makes DynaLoader.pm, and that is needed for
-# ExtUtils::Mkbootstrap. There's no direct way to mark a dependency on
+# There's no direct way to mark a dependency on
# DynaLoader.pm, so this will have to do
-Extensions: ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER).c
+Extensions: ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynamic
-Extensions_reonly: ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER).c
+Extensions_reonly: ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynamic +re
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --nonxs
+$(DYNALOADER) : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
+ $(XCOPY) ..\*.h $(COREDIR)\*.*
+ $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
+
Extensions_clean:
-if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --all --target=clean
$(PERLIMPLIB) ..\miniperl.lib $(MINIMOD) \
$(PERLEXESTATIC) $(PERLSTATICLIB)
-del /f *.def *.map
- -del /f $(DYNALOADER).c
- -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
- -del /f $(EXTDIR)\DynaLoader\DynaLoader.pm
- -del /f $(EXTDIR)\DynaLoader\XSLoader.pm
-del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
-del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
-del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm
WIN32_SRC += .\$(CRYPT_SRC)
.ENDIF
-DLL_SRC = $(DYNALOADER).c
-
X2P_SRC = \
..\x2p\a2p.c \
..\x2p\hash.c \
MINICORE_OBJ = $(MINIDIR)\{$(MICROCORE_OBJ:f) miniperlmain$(o) perlio$(o)}
MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
-DLL_OBJ = $(DLL_SRC:db:+$(o))
+DLL_OBJ = $(DYNALOADER)
X2P_OBJ = $(X2P_SRC:db:+$(o))
GENUUDMAP_OBJ = $(GENUUDMAP:db:+$(o))
STATIC_EXT = Win32CORE
.ENDIF
-DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
+DYNALOADER = ..\DynaLoader$(o)
# vars must be separated by "\t+~\t+", since we're using the tempfile
# version of config_sh.pl (we were overflowing someone's buffer by
$(RIGHTMAKE) $(MINIMOD) $(CONFIGPM) $(UNIDATAFILES) $(PERLEXE) \
$(X2P) Extensions_reonly
-$(DYNALOADER)$(o) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
-
static: $(PERLEXESTATIC)
#----------------------------------------------------------------
$(EMBED_EXE_MANI)
.ENDIF
-$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM) Extensions_nonxs
- if not exist $(AUTODIR) mkdir $(AUTODIR)
- cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
- cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
- $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
- $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
- cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
- $(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
-
-$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
- copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
-
MakePPPort: $(MINIPERL) $(CONFIGPM) Extensions_nonxs
$(MINIPERL) -I..\lib $(ICWD) ..\mkppport
-if exist $(MINIPERL) $(MINIPERL) -I..\lib $(ICWD) ..\mkppport --clean
#-------------------------------------------------------------------------------
-# The rule for $(DYNALOADER).c makes DynaLoader.pm, and that is needed for
-# ExtUtils::Mkbootstrap. There's no direct way to mark a dependency on
+# There's no direct way to mark a dependency on
# DynaLoader.pm, so this will have to do
-Extensions : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER).c
+Extensions : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynamic
-Extensions_reonly : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER).c
+Extensions_reonly : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) $(DYNALOADER)
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynamic +re
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --nonxs
+$(DYNALOADER) : ..\make_ext.pl $(PERLDEP) $(CONFIGPM) Extensions_nonxs
+ $(XCOPY) ..\*.h $(COREDIR)\*.*
+ $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --dynaloader
+
Extensions_clean :
-if exist $(MINIPERL) $(MINIPERL) -I..\lib ..\make_ext.pl "MAKE=$(MAKE)" --dir=$(EXTDIR) --all --target=clean
$(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD) \
$(PERLEXESTATIC) $(PERLSTATICLIB)
-del /f *.def *.map
- -del /f $(DYNALOADER).c
- -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
- -del /f $(EXTDIR)\DynaLoader\DynaLoader.pm
- -del /f $(EXTDIR)\DynaLoader\XSLoader.pm
-del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm
-del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm
-del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm