memory/jemalloc/build-crt.py
author Robert Sayre <sayrer@gmail.com>
Wed, 19 Aug 2009 15:30:06 -0400
changeset 31895 9dd844f6397244a87632f9008cb8264ffca3cbce
parent 29239 2e1cacdcdd165c626ba94feeb96f4bccb23b4da6
child 31983 d25e72de30f1a518690f10499d5852d8a3713816
permissions -rw-r--r--
Backed out changeset 5817b38a8686

#!/usr/bin/env python

import os, sys
from subprocess import Popen, STDOUT, PIPE

if 'MAKEFLAGS' in os.environ:
  del os.environ['MAKEFLAGS']
proc = Popen(['nmake', 'dll_', 'mt'], stdout=PIPE, stderr=STDOUT,
             cwd=sys.argv[1])

while True:
  line = proc.stdout.readline()
  if line == '':
    break
  line = line.rstrip()
  # explicitly ignore this fatal-sounding non-fatal error
  if line == "NMAKE : fatal error U1052: file 'makefile.sub' not found" or line == "Stop.":
    continue
  print line
sys.exit(proc.wait())