@@ -320,18 +320,16 @@ def build(project_name, log_name="build_log.txt", cleanup=True):
320
320
321
321
cmd = [
322
322
'eclipse' ,
323
- '--launcher.suppressErrors' ,
324
323
'-nosplash' ,
325
324
'-application org.eclipse.cdt.managedbuilder.core.headlessbuild' ,
326
- '-data' , relpath ( tmp_folder , os . getcwd ()) ,
327
- '-import' , '.' ,
328
- '-cleanBuild' , 'all'
325
+ '-data' , tmp_folder ,
326
+ '-import' , os . getcwd () ,
327
+ '-cleanBuild' , project_name
329
328
]
330
329
331
- p = Popen (' ' .join (cmd ), stdout = PIPE , stderr = PIPE )
330
+ p = Popen (' ' .join (cmd ), shell = True , stdout = PIPE , stderr = PIPE )
332
331
out , err = p .communicate ()
333
332
ret_code = p .returncode
334
-
335
333
stdout_string = "=" * 10 + "STDOUT" + "=" * 10 + "\n "
336
334
err_string = "=" * 10 + "STDERR" + "=" * 10 + "\n "
337
335
err_string += err
@@ -340,7 +338,7 @@ def build(project_name, log_name="build_log.txt", cleanup=True):
340
338
if ret_code != 0 :
341
339
ret_string += "FAILURE\n "
342
340
343
- print "%s\n See %s for STDOUT \n %s\n %s" % (stdout_string , log_name , err_string , ret_string )
341
+ print "%s\n %s \n %s\n %s" % (stdout_string , out , err_string , ret_string )
344
342
345
343
if log_name :
346
344
# Write the output to the log file
@@ -360,6 +358,8 @@ def build(project_name, log_name="build_log.txt", cleanup=True):
360
358
shutil .rmtree ('Debug' )
361
359
if exists ('Release' ):
362
360
shutil .rmtree ('Release' )
361
+ if exists ('makefile.targets' ):
362
+ os .remove ('makefile.targets' )
363
363
364
364
# Always remove the temporary folder.
365
365
if exists (tmp_folder ):
0 commit comments