# Build patches used to created apache_2.0.x-win32-openssl_0.9.7j.msi
# binary packages
#
# 1. ensure perl Configure no-idea no-rc5 no-mdc2 zlib flags are passed 
#    to all ms\do_masm invoked utilities
# 2. propogate /debug flag to cl/masm/link to produce .PDB debugging symbols
#    and toggle /Oy- to present a legible backtrace in Dr Watson etc.
#
--- ../openssl-0.9.7j-orig/ms/do_masm.bat	Sat Jan 21 16:14:05 2006
+++ ./ms/do_masm.bat	Mon Aug 28 12:27:37 2006
@@ -57,13 +57,8 @@
 echo on
 
 perl util\mkfiles.pl >MINFO
-rem perl util\mk1mf.pl no-sock %1 VC-MSDOS >ms\msdos.mak
-rem perl util\mk1mf.pl %1 VC-W31-32 >ms\w31.mak
-rem perl util\mk1mf.pl dll %1 VC-W31-32 >ms\w31dll.mak
-perl util\mk1mf.pl %1 VC-WIN32 >ms\nt.mak
-perl util\mk1mf.pl dll %1 VC-WIN32 >ms\ntdll.mak
+perl util\mk1mf.pl %* VC-WIN32 >ms\nt.mak
+perl util\mk1mf.pl dll %* VC-WIN32 >ms\ntdll.mak
 
-perl util\mkdef.pl 16 libeay %1 > ms\libeay16.def
-perl util\mkdef.pl 32 libeay %1 > ms\libeay32.def
-perl util\mkdef.pl 16 ssleay %1 > ms\ssleay16.def
-perl util\mkdef.pl 32 ssleay %1 > ms\ssleay32.def
+perl util\mkdef.pl 32 libeay %* > ms\libeay32.def
+perl util\mkdef.pl 32 ssleay %* > ms\ssleay32.def
--- ../openssl-0.9.7j-orig/util/pl/VC-32.pl	Thu Apr 06 19:15:44 2006
+++ ./util/pl/VC-32.pl	Mon Aug 28 13:19:18 2006
@@ -22,10 +22,10 @@
 
 # C compiler stuff
 $cc='cl';
-$cflags=' /MD /W3 /WX /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32';
+$cflags=' /MD /W3 /WX /Ox /O2 /Ob2 /Oy- /Gs0 /GF /Gy /Zi /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32';
 $cflags.=' -D_CRT_SECURE_NO_DEPRECATE';		# shut up VC8
 $cflags.=' -D_CRT_NONSTDC_NO_DEPRECATE';	# shut up VC8
-$lflags="/nologo /subsystem:console /machine:I386 /opt:ref";
+$lflags="/nologo /subsystem:console /machine:I386 /debug /incremental:no /opt:ref";
 $mlflags='';
 
 $out_def="out32";
@@ -35,7 +35,7 @@
 if ($debug)
 	{
 	$cflags=" /MDd /W3 /WX /Zi /Yd /Od /nologo -DOPENSSL_SYSNAME_WIN32 -D_DEBUG -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DDEBUG -DDSO_WIN32";
-	$lflags.=" /debug";
+	$lflags=" /nologo /subsystem:console /machine:I386 /debug";
 	$mlflags.=' /debug';
 	}
 $cflags .= " -DOPENSSL_SYSNAME_WINNT" if $NT == 1;
