File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919-p prefix: This is the prefix used when you ran
2020 'Make inclinstall libainstall' in the Python build directory.
2121 (If you never ran this, freeze won't work.)
22- The default is /usr/local.
22+ The default is /usr/local.
2323
2424-e extension: A directory containing additional .o files that
2525 may be used to resolve modules. This directory
@@ -227,11 +227,23 @@ def main():
227227 addfiles + libs + \
228228 ['$(MODLIBS)' , '$(LIBS)' , '$(SYSLIBS)' ]
229229
230+ backup = makefile + '~'
231+ try :
232+ os .rename (makefile , backup )
233+ except os .error :
234+ backup = None
230235 outfp = open (makefile , 'w' )
231236 try :
232237 makemakefile .makemakefile (outfp , somevars , files , target )
233238 finally :
234239 outfp .close ()
240+ if backup :
241+ if not cmp .cmp (backup , makefile ):
242+ print 'previous Makefile saved as' , backup
243+ else :
244+ sys .stderr .write ('%s not changed, not written\n ' %
245+ makefile )
246+ os .rename (backup , makefile )
235247
236248 # Done!
237249
You can’t perform that action at this time.
0 commit comments