• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python
2
3import os, sys
4from subprocess import Popen, STDOUT, PIPE
5
6if 'MAKEFLAGS' in os.environ:
7  del os.environ['MAKEFLAGS']
8proc = Popen(['nmake', 'dll_', 'mt'], stdout=PIPE, stderr=STDOUT,
9             cwd=sys.argv[1])
10
11while True:
12  line = proc.stdout.readline()
13  if line == '':
14    break
15  line = line.rstrip()
16  # explicitly ignore this fatal-sounding non-fatal error
17  if line == "NMAKE : fatal error U1052: file 'makefile.sub' not found" or line == "Stop.":
18    continue
19  print line
20sys.exit(proc.wait())
21