From ba45c2b6a70745a8d19cefaf6fb4e5e7d4b8e1e0 Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Sun, 19 Sep 2010 09:24:20 +0000 Subject: [PATCH] Issue #9552: Avoid unnecessary rebuild of OpenSSL. (Windows) --- Misc/NEWS | 2 ++ PC/VC6/build_ssl.py | 8 ++++---- PC/VS8.0/build_ssl.py | 8 ++++---- PCbuild/build_ssl.py | 10 +++++----- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index cdac64e4137..ab01f475525 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -197,6 +197,8 @@ Tests Build ----- +- Issue #9552: Avoid unnecessary rebuild of OpenSSL. (Windows) + - Issue #9810: Compile bzip2 source files in python's project file directly. It used to be built with bzip2's makefile. diff --git a/PC/VC6/build_ssl.py b/PC/VC6/build_ssl.py index 51f34b6f510..f2adab11ea4 100644 --- a/PC/VC6/build_ssl.py +++ b/PC/VC6/build_ssl.py @@ -173,12 +173,12 @@ def main(): # os.system("perl util\mk1mf.pl debug "+configure+" >"+makefile) 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) + shutil.copy2(r"crypto\buildinf.h", r"crypto\buildinf_%s.h" % arch) + shutil.copy2(r"crypto\opensslconf.h", r"crypto\opensslconf_%s.h" % arch) # Now run make. - shutil.copy(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h") - shutil.copy(r"crypto\opensslconf_%s.h" % arch, r"crypto\opensslconf.h") + shutil.copy2(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h") + shutil.copy2(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/PC/VS8.0/build_ssl.py b/PC/VS8.0/build_ssl.py index 867fd4c4a3f..cb497678fb1 100644 --- a/PC/VS8.0/build_ssl.py +++ b/PC/VS8.0/build_ssl.py @@ -220,8 +220,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) + shutil.copy2(r"crypto\buildinf.h", r"crypto\buildinf_%s.h" % arch) + shutil.copy2(r"crypto\opensslconf.h", r"crypto\opensslconf_%s.h" % arch) # Now run make. if arch == "amd64": @@ -230,8 +230,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") + shutil.copy2(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h") + shutil.copy2(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/build_ssl.py b/PCbuild/build_ssl.py index a75c1fbef3e..6b682e40f22 100644 --- a/PCbuild/build_ssl.py +++ b/PCbuild/build_ssl.py @@ -224,15 +224,15 @@ 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) + shutil.copy2(r"crypto\buildinf.h", r"crypto\buildinf_%s.h" % arch) + shutil.copy2(r"crypto\opensslconf.h", r"crypto\opensslconf_%s.h" % arch) # If the assembler files don't exist in tmpXX, copy them there if not os.path.exists("tmp"+dirsuffix): os.mkdir("tmp"+dirsuffix) for f in os.listdir("asm"+dirsuffix): if not f.endswith(".asm"): continue - shutil.copy(r"asm%s\%s" % (dirsuffix, f), "tmp"+dirsuffix) + shutil.copy2(r"asm%s\%s" % (dirsuffix, f), "tmp"+dirsuffix) # Now run make. if arch == "amd64": @@ -241,8 +241,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") + shutil.copy2(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h") + shutil.copy2(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