Subversion Repositories Kolibri OS

Rev

Rev 9374 | Rev 9379 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9374 Rev 9377
Line 3... Line 3...
3
 
3
 
4
path_to_tools_workspace = os.path.dirname(os.path.abspath(__file__))
4
path_to_tools_workspace = os.path.dirname(os.path.abspath(__file__))
5
path_to_tools = os.path.dirname(path_to_tools_workspace)
5
path_to_tools = os.path.dirname(path_to_tools_workspace)
Line 6... Line 6...
6
sys.path.append(path_to_tools)
6
sys.path.append(path_to_tools)
Line 7... Line 7...
7
 
7
 
8
from lib.tupfile_parser import parse as parse_tupfile
-
 
9
 
-
 
10
def build():
8
from lib.tupfile_parser import parse_tupfile_outputs
11
    if not os.path.exists("Tupfile.lua"):
-
 
12
        print("No Tupfile.lua, can't build anything")
9
 
13
        exit()
-
 
14
 
10
def build():
15
    tup_rules = parse_tupfile("Tupfile.lua")
11
    os.system("tup")
16
    program_files = []
-
 
17
    for rule in tup_rules:
12
    outputs = parse_tupfile_outputs("Tupfile.lua")
18
        # TODO: Manage source dependencies
-
 
19
        # TODO: Inform about tools required for the build
13
    for name in outputs:
Line 20... Line 14...
20
        os.system(rule.command)
14
        if name.endswith(".inc"):
21
        program_files += rule.output
15
            continue