]> granicus.if.org Git - python/commitdiff
Issue #9552: Avoid unnecessary rebuild of OpenSSL. (Windows)
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Fri, 24 Sep 2010 16:36:34 +0000 (16:36 +0000)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Fri, 24 Sep 2010 16:36:34 +0000 (16:36 +0000)
PC/VS8.0/_hashlib.vcproj
PC/VS8.0/_ssl.vcproj
PC/VS8.0/build_ssl.py
PC/VS8.0/pcbuild.sln
PC/VS8.0/ssl.vcproj [new file with mode: 0644]
PCbuild/_hashlib.vcproj
PCbuild/_ssl.vcproj
PCbuild/build_ssl.py
PCbuild/pcbuild.sln
PCbuild/ssl.vcproj [new file with mode: 0644]

index f8bb9622db7c857ba943b9a0e136b93f62412374..3be656f1edcd210910107d9f3171b8e07fcc9ab8 100644 (file)
@@ -27,7 +27,6 @@
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
@@ -89,7 +88,6 @@
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
index 2d12e5635e7c81810c21b6a19d407d9016269158..3d1945c4e3ac2ffab43c343c5972db581dea2167 100644 (file)
@@ -27,7 +27,6 @@
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
@@ -89,7 +88,6 @@
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
index 5a08a016af6a294982672306231e0116a90d4eea..f41e024a2b3d50378181c5d038008a91520503be 100644 (file)
@@ -146,6 +146,22 @@ def run_configure(configure, do_script):
     print(do_script)
     os.system(do_script)
 
+def cmp(f1, f2):
+    bufsize = 1024 * 8
+    with open(f1, 'rb') as fp1, open(f2, 'rb') as fp2:
+        while True:
+            b1 = fp1.read(bufsize)
+            b2 = fp2.read(bufsize)
+            if b1 != b2:
+                return False
+            if not b1:
+                return True
+
+def copy(src, dst):
+    if os.path.isfile(dst) and cmp(src, dst):
+        return
+    shutil.copy(src, dst)
+
 def main():
     build_all = "-a" in sys.argv
     if sys.argv[1] == "Release":
@@ -222,8 +238,8 @@ def main():
             if arch == "amd64":
                 create_makefile64(makefile, m32)
             fix_makefile(makefile)
-            shutil.copy(r"crypto\buildinf.h", r"crypto\buildinf_%s.h" % arch)
-            shutil.copy(r"crypto\opensslconf.h", r"crypto\opensslconf_%s.h" % arch)
+            copy(r"crypto\buildinf.h", r"crypto\buildinf_%s.h" % arch)
+            copy(r"crypto\opensslconf.h", r"crypto\opensslconf_%s.h" % arch)
 
         # If the assembler files don't exist in tmpXX, copy them there
         if perl is None:
@@ -241,8 +257,8 @@ def main():
                 print("ml64 assembler has failed.")
                 sys.exit(rc)
 
-        shutil.copy(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h")
-        shutil.copy(r"crypto\opensslconf_%s.h" % arch, r"crypto\opensslconf.h")
+        copy(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h")
+        copy(r"crypto\opensslconf_%s.h" % arch, r"crypto\opensslconf.h")
 
         #makeCommand = "nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile)
         makeCommand = "nmake /nologo -f \"%s\"" % makefile
index b4fe99fa9f223d92c2a6ed04f2021b9afed7bd3e..9aca4aaa8cc5470fc3dbc2e7dd530f44124f993e 100644 (file)
@@ -74,6 +74,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E
                {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}\r
                {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480}\r
                {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0} = {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"\r
@@ -112,6 +113,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcproj
        ProjectSection(ProjectDependencies) = postProject\r
                {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}\r
                {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0} = {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}"\r
@@ -124,6 +126,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multip
                {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
        EndProjectSection\r
 EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl", "ssl.vcproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}\r
+       EndProjectSection\r
+EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}"\r
 EndProject\r
 Global\r
@@ -514,6 +521,22 @@ Global
                {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32\r
                {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64\r
                {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.Build.0 = Debug|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.ActiveCfg = Debug|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.Build.0 = Debug|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.ActiveCfg = Release|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.Build.0 = Release|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.ActiveCfg = Release|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.Build.0 = Release|x64\r
                {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32\r
                {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64\r
diff --git a/PC/VS8.0/ssl.vcproj b/PC/VS8.0/ssl.vcproj
new file mode 100644 (file)
index 0000000..f0d635e
--- /dev/null
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="ssl"\r
+       ProjectGUID="{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"\r
+       RootNamespace="ssl"\r
+       Keyword="MakeFileProj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
index 5184e45a635bb38e31a64771b76a6000c7012755..dee8dda6d850d45e2e31eadf48f9e6402f065fa3 100644 (file)
@@ -27,7 +27,6 @@
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
@@ -89,7 +88,6 @@
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
index d1fe19f6a8c7ac919ec3340875b6093ba7e0e85d..1e65adfe475092c725de95cab276af3bc38d8eed 100644 (file)
@@ -27,7 +27,6 @@
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
@@ -89,7 +88,6 @@
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
                        >
                        <Tool
                                Name="VCPreBuildEventTool"
-                               CommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
                        />
                        <Tool
                                Name="VCCustomBuildTool"
index cfcb0ac8f1c366a45a8735ca720735bd29899787..573bf4b84b696a0b63594b70d21ad3d47c8a9131 100644 (file)
@@ -23,7 +23,6 @@
 # python.exe build_ssl.py Release x64
 # python.exe build_ssl.py Release Win32
 
-from __future__ import with_statement
 import os, sys, re, shutil
 
 # Find all "foo.exe" files on the PATH.
@@ -122,7 +121,6 @@ def fix_makefile(makefile):
     """
     if not os.path.isfile(makefile):
         return
-    fin = open(makefile)
     with open(makefile) as fin:
         lines = fin.readlines()
     with open(makefile, 'w') as fout:
@@ -148,6 +146,22 @@ def run_configure(configure, do_script):
     print(do_script)
     os.system(do_script)
 
+def cmp(f1, f2):
+    bufsize = 1024 * 8
+    with open(f1, 'rb') as fp1, open(f2, 'rb') as fp2:
+        while True:
+            b1 = fp1.read(bufsize)
+            b2 = fp2.read(bufsize)
+            if b1 != b2:
+                return False
+            if not b1:
+                return True
+
+def copy(src, dst):
+    if os.path.isfile(dst) and cmp(src, dst):
+        return
+    shutil.copy(src, dst)
+
 def main():
     build_all = "-a" in sys.argv
     if sys.argv[1] == "Release":
@@ -224,8 +238,8 @@ def main():
             if arch == "amd64":
                 create_makefile64(makefile, m32)
             fix_makefile(makefile)
-            shutil.copy(r"crypto\buildinf.h", r"crypto\buildinf_%s.h" % arch)
-            shutil.copy(r"crypto\opensslconf.h", r"crypto\opensslconf_%s.h" % arch)
+            copy(r"crypto\buildinf.h", r"crypto\buildinf_%s.h" % arch)
+            copy(r"crypto\opensslconf.h", r"crypto\opensslconf_%s.h" % arch)
 
         # If the assembler files don't exist in tmpXX, copy them there
         if perl is None:
@@ -243,8 +257,8 @@ def main():
                 print("ml64 assembler has failed.")
                 sys.exit(rc)
 
-        shutil.copy(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h")
-        shutil.copy(r"crypto\opensslconf_%s.h" % arch, r"crypto\opensslconf.h")
+        copy(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h")
+        copy(r"crypto\opensslconf_%s.h" % arch, r"crypto\opensslconf.h")
 
         #makeCommand = "nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile)
         makeCommand = "nmake /nologo -f \"%s\"" % makefile
index 1f6c6fb2bab8cc9e98258a9099e2df4381ad3596..956a7eab4870481a0ae742c76f703b43285d1120 100644 (file)
@@ -74,6 +74,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E
                {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}\r
                {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480}\r
                {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0} = {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"\r
@@ -112,6 +113,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcproj
        ProjectSection(ProjectDependencies) = postProject\r
                {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}\r
                {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0} = {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}\r
        EndProjectSection\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}"\r
@@ -124,6 +126,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multip
                {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}\r
        EndProjectSection\r
 EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl", "ssl.vcproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}\r
+       EndProjectSection\r
+EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}"\r
 EndProject\r
 Global\r
@@ -514,6 +521,22 @@ Global
                {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32\r
                {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64\r
                {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.Build.0 = Debug|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.ActiveCfg = Debug|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.Build.0 = Debug|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.Build.0 = PGInstrument|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.ActiveCfg = PGInstrument|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.Build.0 = PGInstrument|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.Build.0 = PGUpdate|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.ActiveCfg = PGUpdate|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.Build.0 = PGUpdate|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.ActiveCfg = Release|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.Build.0 = Release|Win32\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.ActiveCfg = Release|x64\r
+               {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.Build.0 = Release|x64\r
                {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32\r
                {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64\r
diff --git a/PCbuild/ssl.vcproj b/PCbuild/ssl.vcproj
new file mode 100644 (file)
index 0000000..ec2be30
--- /dev/null
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="ssl"\r
+       ProjectGUID="{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"\r
+       RootNamespace="ssl"\r
+       Keyword="MakeFileProj"\r
+       TargetFrameworkVersion="196613"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|Win32"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGInstrument|x64"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|Win32"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="PGUpdate|x64"\r
+                       ConfigurationType="0"\r
+                       InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"\r
+                       CharacterSet="0"\r
+                       >\r
+                       <Tool\r
+                               Name="VCNMakeTool"\r
+                               BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"\r
+                               ReBuildCommandLine=""\r
+                               CleanCommandLine=""\r
+                               Output=""\r
+                               PreprocessorDefinitions=""\r
+                               IncludeSearchPath=""\r
+                               ForcedIncludes=""\r
+                               AssemblySearchPath=""\r
+                               ForcedUsingAssemblies=""\r
+                               CompileAsManaged=""\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r