def fix_makefile(makefile):
 if (not os.path.isfile(makefile)):
  return
 fin = open(makefile)
 if 1:
  lines = fin.readlines()
  fin.close()
 fout = open(makefile, 'w')
 if 1:
  for line in lines:
   if line.startswith('PERL='):
    continue
   if line.startswith('CP='):
    line = 'CP=copy\n'
   if line.startswith('MKDIR='):
    line = 'MKDIR=mkdir\n'
   if line.startswith('CFLAG='):
    line = line.strip()
    for algo in ('RC5', 'MDC2', 'IDEA'):
     noalgo = (' -DOPENSSL_NO_%s' % algo)
     if (noalgo not in line):
      line = (line + noalgo)
    line = (line + '\n')
   fout.write(line)
 fout.close()

def fix_makefile ( makefile ) : if ( not os . path . isfile ( makefile ) ) : return fin = open ( makefile ) if 1 : lines = fin . readlines ( ) fin . close ( ) fout = open ( makefile , 'w' ) if 1 : for line in lines : if line . startswith ( 'PERL=' ) : continue if line . startswith ( 'CP=' ) : line = 'CP=copy\n' if line . startswith ( 'MKDIR=' ) : line = 'MKDIR=mkdir\n' if line . startswith ( 'CFLAG=' ) : line = line . strip ( ) for algo in ( 'RC5' , 'MDC2' , 'IDEA' ) : noalgo = ( ' -DOPENSSL_NO_%s' % algo ) if ( noalgo not in line ) : line = ( line + noalgo ) line = ( line + '\n' ) fout . write ( line ) fout . close ( )
fix some stuff in all makefiles .