Skip to content

Commit

Permalink
Always create rime-out directory in Solution.Build().
Browse files Browse the repository at this point in the history
  • Loading branch information
nya3jp committed Jul 22, 2012
1 parent 8666915 commit 597ccd6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 0 additions & 6 deletions rime/basic/codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,10 @@ def __init__(self, src_name, src_dir, out_dir, compile_args, run_args):
self.compile_args = tuple(compile_args)
self.run_args = tuple(run_args)

def MakeOutDir(self):
"""Create output directory."""
if self.out_dir:
files.MakeDir(self.out_dir)

@taskgraph.task_method
def Compile(self):
"""Compile the code and return RunResult."""
try:
self.MakeOutDir()
if not self.compile_args:
result = codes.RunResult(codes.RunResult.OK, None)
else:
Expand Down
1 change: 1 addition & 0 deletions rime/basic/targets/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def Build(self, ui):
if self.IsBuildCached():
ui.console.PrintAction('COMPILE', self, 'up-to-date', progress=True)
yield True
files.MakeDir(self.out_dir)
if not self.code.QUIET_COMPILE:
ui.console.PrintAction('COMPILE', self)
res = yield self.code.Compile()
Expand Down

0 comments on commit 597ccd6

Please sign in to comment.