Rev 9370 | Rev 9377 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
9367 | Boppan | 1 | import sys |
2 | import os |
||
3 | |||
9374 | Boppan | 4 | path_to_tools_workspace = os.path.dirname(os.path.abspath(__file__)) |
5 | path_to_tools = os.path.dirname(path_to_tools_workspace) |
||
9370 | Boppan | 6 | sys.path.append(path_to_tools) |
9367 | Boppan | 7 | |
9370 | Boppan | 8 | from lib.tupfile_parser import parse as parse_tupfile |
9367 | Boppan | 9 | |
10 | def build(): |
||
11 | if not os.path.exists("Tupfile.lua"): |
||
12 | print("No Tupfile.lua, can't build anything") |
||
13 | exit() |
||
14 | |||
9370 | Boppan | 15 | tup_rules = parse_tupfile("Tupfile.lua") |
9367 | Boppan | 16 | program_files = [] |
17 | for rule in tup_rules: |
||
18 | # TODO: Manage source dependencies |
||
19 | # TODO: Inform about tools required for the build |
||
20 | os.system(rule.command) |
||
21 | program_files += rule.output |
||
22 | return program_files |
||
23 | |||
24 | if __name__ == "__main__": |
||
9370 | Boppan | 25 | build() |