push(@m,
q{ $(LD) -out:$@ $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) }
.q{$(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) -def:$(EXPORT_LIST)});
+ if ($Config{cc} eq 'cl' and $Config{ccversion} =~ /^(\d+)/ and $1 >= 14) { # VC 2005 (aka VC 8) or higher
+ push(@m,
+ q{
+ mt -nologo -manifest $@.manifest -outputresource:$@;2 && del $@.manifest});
+ }
}
push @m, '
$(CHMOD) $(PERM_RWX) $@
use vars qw($Revision);
use strict;
-$VERSION = '6.31';
+$VERSION = '6.31_01';
($Revision) = q$Revision: 19606 $ =~ /Revision:\s+(\S+)/;
@ISA = qw(Exporter);
DELAYLOAD = -DELAYLOAD:ws2_32.dll -DELAYLOAD:shell32.dll delayimp.lib
!ENDIF
+# Visual C++ 2005 (VC++ 8.x) creates manifest files for EXEs and DLLs. These
+# either need copying everywhere with the binaries, or else need embedding in
+# them otherwise MSVCR80.dll won't be found. Embed them for simplicity, and
+# delete them afterwards so that they don't get installed too.
+!IF "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE"
+EMBED_EXE_MANI = mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
+ del $@.manifest
+EMBED_DLL_MANI = mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
+ del $@.manifest
+!ENDIF
+
ARCHDIR = ..\lib\$(ARCHNAME)
COREDIR = ..\lib\CORE
AUTODIR = ..\lib\auto
$(o).dll:
$(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
-out:$@ $(LINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
+ $(EMBED_DLL_MANI)
.rc.res:
$(RSC) -i.. $<
$(GLOBEXE) : perlglob$(o)
$(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
perlglob$(o) setargv$(o)
+ $(EMBED_EXE_MANI)
perlglob$(o) : perlglob.c
$(LINK32) -subsystem:console -out:$@ @<<
$(LINK_FLAGS) $(LIBFILES) $(MINI_OBJ)
<<
+ $(EMBED_EXE_MANI)
$(MINIDIR) :
if not exist "$(MINIDIR)" mkdir "$(MINIDIR)"
$(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @Extensions_static @<<
$(LINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES)
<<
+ $(EMBED_DLL_MANI)
$(XCOPY) $(PERLIMPLIB) $(COREDIR)
$(PERLEXE_ICO): $(MINIPERL) makeico.pl
$(LINK32) -subsystem:console -out:$@ @<<
$(LINK_FLAGS) $(LIBFILES) $(X2P_OBJ)
<<
+ $(EMBED_EXE_MANI)
perlmain.c : runperl.c
copy runperl.c perlmain.c
$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
$(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(LINK_FLAGS) \
$(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
+ $(EMBED_EXE_MANI)
copy $(PERLEXE) $(WPERLEXE)
$(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS
copy splittree.pl ..
DELAYLOAD *= -DELAYLOAD:ws2_32.dll -DELAYLOAD:shell32.dll delayimp.lib
.ENDIF
+# Visual C++ 2005 (VC++ 8.x) creates manifest files for EXEs and DLLs. These
+# either need copying everywhere with the binaries, or else need embedding in
+# them otherwise MSVCR80.dll won't be found. Embed them for simplicity, and
+# delete them afterwards so that they don't get installed too.
+.IF "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE"
+EMBED_EXE_MANI = mt -nologo -manifest $@.manifest -outputresource:$@;1 && \
+ del $@.manifest
+EMBED_DLL_MANI = mt -nologo -manifest $@.manifest -outputresource:$@;2 && \
+ del $@.manifest
+.ENDIF
+
ARCHDIR = ..\lib\$(ARCHNAME)
COREDIR = ..\lib\CORE
AUTODIR = ..\lib\auto
.ELSE
$(LINK32) -dll -subsystem:windows -implib:$(*B).lib -def:$(*B).def \
-out:$@ $(BLINK_FLAGS) $(LIBFILES) $< $(LIBPERL)
+ $(EMBED_DLL_MANI)
.ENDIF
.rc.res:
.ELSE
$(LINK32) $(BLINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
perlglob$(o) setargv$(o)
+ $(EMBED_EXE_MANI)
.ENDIF
perlglob$(o) : perlglob.c
.ELSE
$(LINK32) -subsystem:console -out:$@ \
@$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(MINI_OBJ:s,\,$B,))
+ $(EMBED_EXE_MANI)
.ENDIF
$(MINIDIR) :
@Extensions_static \
@$(mktmp -base:0x28000000 $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) \
$(PERLDLL_RES) $(PERLDLL_OBJ:s,\,$B,))
+ $(EMBED_DLL_MANI)
.ENDIF
$(XCOPY) $(PERLIMPLIB) $(COREDIR)
.ELSE
$(LINK32) -subsystem:console -out:$@ \
@$(mktmp $(BLINK_FLAGS) $(LIBFILES) $(X2P_OBJ:s,\,$B,))
+ $(EMBED_EXE_MANI)
.ENDIF
perlmain.c : runperl.c
.ELSE
$(LINK32) -subsystem:console -out:$@ -stack:0x1000000 $(BLINK_FLAGS) \
$(LIBFILES) $(PERLEXE_OBJ) $(SETARGV_OBJ) $(PERLIMPLIB) $(PERLEXE_RES)
+ $(EMBED_EXE_MANI)
.ENDIF
copy $(PERLEXE) $(WPERLEXE)
$(MINIPERL) -I..\lib bin\exetype.pl $(WPERLEXE) WINDOWS