diff --git a/build.hancho b/build.hancho index 4dfd499..ec2cecc 100644 --- a/build.hancho +++ b/build.hancho @@ -1,10 +1,17 @@ hancho.config.force = True # Check that all our rule files load -hancho.base_rules = hancho.load("{hancho_dir}/base_rules.hancho") -hancho.fpga_rules = hancho.load("{hancho_dir}/fpga_rules.hancho") -hancho.riscv_rules = hancho.load("{hancho_dir}/riscv_rules.hancho") -hancho.wasm_rules = hancho.load("{hancho_dir}/wasm_rules.hancho") +if "base_rules" not in hancho: + hancho.base_rules = hancho.load("{hancho_dir}/base_rules.hancho") + +if "fpga_rules" not in hancho: + hancho.fpga_rules = hancho.load("{hancho_dir}/fpga_rules.hancho") + +if "riscv_rules" not in hancho: + hancho.riscv_rules = hancho.load("{hancho_dir}/riscv_rules.hancho") + +if "wasm_rules" not in hancho: + hancho.wasm_rules = hancho.load("{hancho_dir}/wasm_rules.hancho") #hancho.load("tutorial/tutorial.hancho") hancho.load("examples/examples.hancho") diff --git a/hancho.py b/hancho.py index 50bd8bf..6ddf185 100755 --- a/hancho.py +++ b/hancho.py @@ -671,7 +671,7 @@ class Task: default_command = None default_task_dir = "{mod_dir}" default_build_dir = ( - "{build_root}/{build_tag}/{repo_name}/{rel_path(task_dir, repo_dir)}" + "{build_root}/{repo_name}/{build_tag}/{rel_path(task_dir, repo_dir)}" ) default_build_root = "{root_dir}/build" default_build_tag = "" @@ -1417,8 +1417,8 @@ def main(self): # queue_task = True # task_name = out_file # break - if name := task.get("name", None): - if app.target_regex.search(task.get("name", None)): + if name := task.config.get("name", None): + if app.target_regex.search(name): queue_task = True task_name = name if queue_task: