]> granicus.if.org Git - python/commitdiff
Don't make all the OpenSSL executables, just the library we need.
authorMark Hammond <mhammond@skippinet.com.au>
Tue, 3 Dec 2002 21:00:29 +0000 (21:00 +0000)
committerMark Hammond <mhammond@skippinet.com.au>
Tue, 3 Dec 2002 21:00:29 +0000 (21:00 +0000)
Contributed by David Bolen.

PCbuild/build_ssl.py

index a1f80048cb55b9563dbe68d2b20c9a2ac713cf2d..a369a64ed77f0f96ac72808a3bf17f7a51fe2aed 100644 (file)
@@ -114,7 +114,27 @@ def main():
             os.environ["PATH"] = os.path.split(perl)[0] + \
                                           os.pathsep + \
                                           os.environ["PATH"]
-            rc = os.system("ms\\32all.bat")
+            # ms\32all.bat will reconfigure OpenSSL and then try to build
+            # all outputs (debug/nondebug/dll/lib).  So we filter the file
+            # to exclude any "nmake" commands and then execute.
+            tempname = "ms\\32all_py.bat"
+            
+            in_bat  = open("ms\\32all.bat")
+            temp_bat = open(tempname,"w")
+            while 1:
+                cmd = in_bat.readline()
+                print 'cmd', repr(cmd)
+                if not cmd: break
+                if cmd.strip()[:5].lower() == "nmake":
+                    continue
+                temp_bat.write(cmd)
+            in_bat.close()
+            temp_bat.close()
+            os.system(tempname)
+            try:
+                os.remove(tempname)
+            except:
+                pass
 
         # Now run make.
         print "Executing nmake over the ssl makefiles..."