]> granicus.if.org Git - python/commitdiff
Fix prepare_ssl.py script
authorZachary Ware <zachary.ware@gmail.com>
Thu, 9 Apr 2015 20:48:32 +0000 (15:48 -0500)
committerZachary Ware <zachary.ware@gmail.com>
Thu, 9 Apr 2015 20:48:32 +0000 (15:48 -0500)
Builds using prepared sources that had Perl available anyway were broken
by the previous fix to this script (oops).

PCbuild/prepare_ssl.py

index 16d77d9506adb67b501032945f2802aeaac4e2b3..6894880d4302c1b7e029361c86664deee5b27873 100644 (file)
@@ -115,6 +115,7 @@ def fix_makefile(makefile):
     """
     if not os.path.isfile(makefile):
         return
+    copy_if_different = r'$(PERL) $(SRC_D)\util\copy-if-different.pl'
     with open(makefile) as fin:
         lines = fin.readlines()
     with open(makefile, 'w') as fout:
@@ -132,9 +133,8 @@ def fix_makefile(makefile):
                     if noalgo not in line:
                         line = line + noalgo
                 line = line + '\n'
-            if r'$(SRC_D)\util\copy-if-different.pl' in line:
-                line = line.replace(r'$(SRC_D)\util\copy-if-different.pl',
-                                    'copy /Y')
+            if copy_if_different in line:
+                line = line.replace(copy_if_different, 'copy /Y')
             fout.write(line)
 
 def run_configure(configure, do_script):