[WS] Use tup to build projects
git-svn-id: svn://kolibrios.org@9377 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -5,21 +5,15 @@ path_to_tools_workspace = os.path.dirname(os.path.abspath(__file__))
|
||||
path_to_tools = os.path.dirname(path_to_tools_workspace)
|
||||
sys.path.append(path_to_tools)
|
||||
|
||||
from lib.tupfile_parser import parse as parse_tupfile
|
||||
from lib.tupfile_parser import parse_tupfile_outputs
|
||||
|
||||
def build():
|
||||
if not os.path.exists("Tupfile.lua"):
|
||||
print("No Tupfile.lua, can't build anything")
|
||||
exit()
|
||||
|
||||
tup_rules = parse_tupfile("Tupfile.lua")
|
||||
program_files = []
|
||||
for rule in tup_rules:
|
||||
# TODO: Manage source dependencies
|
||||
# TODO: Inform about tools required for the build
|
||||
os.system(rule.command)
|
||||
program_files += rule.output
|
||||
return program_files
|
||||
os.system("tup")
|
||||
outputs = parse_tupfile_outputs("Tupfile.lua")
|
||||
for name in outputs:
|
||||
if name.endswith(".inc"):
|
||||
continue
|
||||
return name
|
||||
|
||||
if __name__ == "__main__":
|
||||
build()
|
||||
|
Reference in New Issue
Block a user