Rev 9367 | Rev 9374 | 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 | |||
9370 | Boppan | 4 | path_to_tools = '..' |
5 | sys.path.append(path_to_tools) |
||
9367 | Boppan | 6 | |
9370 | Boppan | 7 | from lib.tupfile_parser import parse as parse_tupfile |
9367 | Boppan | 8 | |
9 | def build(): |
||
10 | if not os.path.exists("Tupfile.lua"): |
||
11 | print("No Tupfile.lua, can't build anything") |
||
12 | exit() |
||
13 | |||
9370 | Boppan | 14 | tup_rules = parse_tupfile("Tupfile.lua") |
9367 | Boppan | 15 | program_files = [] |
16 | for rule in tup_rules: |
||
17 | # TODO: Manage source dependencies |
||
18 | # TODO: Inform about tools required for the build |
||
19 | os.system(rule.command) |
||
20 | program_files += rule.output |
||
21 | return program_files |
||
22 | |||
23 | if __name__ == "__main__": |
||
9370 | Boppan | 24 | build() |