Rev 9377 | Rev 9380 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9377 | Rev 9379 | ||
---|---|---|---|
Line 5... | Line 5... | ||
5 | path_to_tools = os.path.dirname(path_to_tools_workspace) |
5 | path_to_tools = os.path.dirname(path_to_tools_workspace) |
6 | sys.path.append(path_to_tools) |
6 | sys.path.append(path_to_tools) |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line -... | ||
8 | from lib.tupfile_parser import parse_tupfile_outputs |
- | |
9 | - | ||
10 | def build(): |
8 | from lib.tupfile_parser import parse_tupfile_outputs |
11 | os.system("tup") |
9 | |
12 | outputs = parse_tupfile_outputs("Tupfile.lua") |
10 | def get_executable_file(output_file_list): |
13 | for name in outputs: |
11 | for name in output_file_list: |
14 | if name.endswith(".inc"): |
12 | if name.endswith(".inc"): |
Line -... | Line 13... | ||
- | 13 | continue |
|
- | 14 | return name |
|
- | 15 | ||
- | 16 | def build(): |
|
- | 17 | os.system("tup") |
|
- | 18 | output_file_list = parse_tupfile_outputs("Tupfile.lua") |
|
- | 19 | return get_executable_file(output_file_list) |
|
- | 20 | ||
- | 21 | def clean(): |
|
- | 22 | output_file_list = parse_tupfile_outputs("Tupfile.lua") |
|
- | 23 | for output_file in output_file_list: |
|
15 | continue |
24 | os.remove(output_file) |
- | 25 | ||
- | 26 | def main(argv): |
|
16 | return name |
27 | if len(argv) == 2 and argv[1] == "clean": |
- | 28 | clean() |
|
- | 29 | else: |
|
- | 30 | build() |