summaryrefslogtreecommitdiffstats
path: root/PCbuild
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2010-09-24 16:36:34 (GMT)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2010-09-24 16:36:34 (GMT)
commit5e83da3d0867c36b3cf5d63b1c72ae0615652f99 (patch)
treef940a12756ecc43f8173872fe78897c0b78ac19b /PCbuild
parente8e8042bb5f722481ce22be573e62a6d009c7dfe (diff)
downloadcpython-5e83da3d0867c36b3cf5d63b1c72ae0615652f99.zip
cpython-5e83da3d0867c36b3cf5d63b1c72ae0615652f99.tar.gz
cpython-5e83da3d0867c36b3cf5d63b1c72ae0615652f99.tar.bz2
Issue #9552: Avoid unnecessary rebuild of OpenSSL. (Windows)
Diffstat (limited to 'PCbuild')
-rw-r--r--PCbuild/_hashlib.vcproj8
-rw-r--r--PCbuild/_ssl.vcproj8
-rw-r--r--PCbuild/build_ssl.py26
-rw-r--r--PCbuild/pcbuild.sln23
-rw-r--r--PCbuild/ssl.vcproj189
5 files changed, 232 insertions, 22 deletions
diff --git a/PCbuild/_hashlib.vcproj b/PCbuild/_hashlib.vcproj
index 5184e45..dee8dda 100644
--- a/PCbuild/_hashlib.vcproj
+++ b/PCbuild/_hashlib.vcproj
@@ -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"
@@ -153,7 +151,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"
@@ -216,7 +213,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"
@@ -280,7 +276,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"
@@ -343,7 +338,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"
@@ -408,7 +402,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"
@@ -471,7 +464,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"
diff --git a/PCbuild/_ssl.vcproj b/PCbuild/_ssl.vcproj
index d1fe19f..1e65adf 100644
--- a/PCbuild/_ssl.vcproj
+++ b/PCbuild/_ssl.vcproj
@@ -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"
@@ -153,7 +151,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"
@@ -216,7 +213,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"
@@ -280,7 +276,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"
@@ -343,7 +338,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"
@@ -408,7 +402,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"
@@ -471,7 +464,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"
diff --git a/PCbuild/build_ssl.py b/PCbuild/build_ssl.py
index cfcb0ac..573bf4b 100644
--- a/PCbuild/build_ssl.py
+++ b/PCbuild/build_ssl.py
@@ -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
diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln
index 1f6c6fb..956a7ea 100644
--- a/PCbuild/pcbuild.sln
+++ b/PCbuild/pcbuild.sln
@@ -74,6 +74,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E
{B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}
{86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480}
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0} = {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"
@@ -112,6 +113,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcproj
ProjectSection(ProjectDependencies) = postProject
{B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0} = {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}"
@@ -124,6 +126,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multip
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl", "ssl.vcproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"
+ ProjectSection(ProjectDependencies) = postProject
+ {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}
+ EndProjectSection
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}"
EndProject
Global
@@ -514,6 +521,22 @@ Global
{9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32
{9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64
{9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.Build.0 = Debug|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.ActiveCfg = Debug|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.Build.0 = Debug|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.Build.0 = PGInstrument|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.Build.0 = PGUpdate|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.ActiveCfg = Release|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.Build.0 = Release|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.ActiveCfg = Release|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.Build.0 = Release|x64
{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32
{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32
{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64
diff --git a/PCbuild/ssl.vcproj b/PCbuild/ssl.vcproj
new file mode 100644
index 0000000..ec2be30
--- /dev/null
+++ b/PCbuild/ssl.vcproj
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="ssl"
+ ProjectGUID="{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"
+ RootNamespace="ssl"
+ Keyword="MakeFileProj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="0"
+ InheritedPropertySheets=".\pyd_d.vsprops"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
+ ReBuildCommandLine=""
+ CleanCommandLine=""
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ ConfigurationType="0"
+ InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
+ ReBuildCommandLine=""
+ CleanCommandLine=""
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="0"
+ InheritedPropertySheets=".\pyd.vsprops"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
+ ReBuildCommandLine=""
+ CleanCommandLine=""
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ ConfigurationType="0"
+ InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
+ ReBuildCommandLine=""
+ CleanCommandLine=""
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ <Configuration
+ Name="PGInstrument|Win32"
+ ConfigurationType="0"
+ InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
+ ReBuildCommandLine=""
+ CleanCommandLine=""
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ <Configuration
+ Name="PGInstrument|x64"
+ ConfigurationType="0"
+ InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
+ ReBuildCommandLine=""
+ CleanCommandLine=""
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ <Configuration
+ Name="PGUpdate|Win32"
+ ConfigurationType="0"
+ InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
+ ReBuildCommandLine=""
+ CleanCommandLine=""
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ <Configuration
+ Name="PGUpdate|x64"
+ ConfigurationType="0"
+ InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
+ CharacterSet="0"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
+ ReBuildCommandLine=""
+ CleanCommandLine=""
+ Output=""
+ PreprocessorDefinitions=""
+ IncludeSearchPath=""
+ ForcedIncludes=""
+ AssemblySearchPath=""
+ ForcedUsingAssemblies=""
+ CompileAsManaged=""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>