Skip to content

Commit 57e93a5

Browse files
bridadanilg-ul
authored andcommitted
Fixing build step
* Cleaning up makefile
1 parent 7e7b252 commit 57e93a5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tools/export/gnuarmeclipse/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,18 +320,16 @@ def build(project_name, log_name="build_log.txt", cleanup=True):
320320

321321
cmd = [
322322
'eclipse',
323-
'--launcher.suppressErrors',
324323
'-nosplash',
325324
'-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
329328
]
330329

331-
p = Popen(' '.join(cmd), stdout=PIPE, stderr=PIPE)
330+
p = Popen(' '.join(cmd), shell=True, stdout=PIPE, stderr=PIPE)
332331
out, err = p.communicate()
333332
ret_code = p.returncode
334-
335333
stdout_string = "=" * 10 + "STDOUT" + "=" * 10 + "\n"
336334
err_string = "=" * 10 + "STDERR" + "=" * 10 + "\n"
337335
err_string += err
@@ -340,7 +338,7 @@ def build(project_name, log_name="build_log.txt", cleanup=True):
340338
if ret_code != 0:
341339
ret_string += "FAILURE\n"
342340

343-
print "%s\nSee %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)
344342

345343
if log_name:
346344
# Write the output to the log file
@@ -360,6 +358,8 @@ def build(project_name, log_name="build_log.txt", cleanup=True):
360358
shutil.rmtree('Debug')
361359
if exists('Release'):
362360
shutil.rmtree('Release')
361+
if exists('makefile.targets'):
362+
os.remove('makefile.targets')
363363

364364
# Always remove the temporary folder.
365365
if exists(tmp_folder):

0 commit comments

Comments
 (0)