mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-22 18:09:41 +00:00
Add proper deps
This commit is contained in:
parent
f04532bbac
commit
bfd3e150fa
2 changed files with 7 additions and 3 deletions
|
|
@ -12,13 +12,17 @@ common_mk = os.path.relpath(os.path.join(os.path.dirname(__file__), "common.mk")
|
|||
def _cwd_base():
|
||||
return os.path.basename(os.getcwd())
|
||||
|
||||
def generate_target(name, command):
|
||||
def generate_target(name, command, deps = None):
|
||||
#target = f"{_cwd_base()}-{name}"
|
||||
target = f"{name}"
|
||||
print(f"all: {target}")
|
||||
print(f".PHONY: {target}")
|
||||
print(f"{target}_cmd={command}")
|
||||
print(f"{target}:")
|
||||
if deps:
|
||||
print(f"{target}: {' '.join(deps)}")
|
||||
else:
|
||||
print(f"{target}:")
|
||||
|
||||
print(f"\t@$(call run_test,{target}, $({target}_cmd))")
|
||||
|
||||
def generate_ys_test(ys_file, yosys_args="", commands=""):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue