Skip to content

Commit

Permalink
mock-naja: add .lib file from a macro
Browse files Browse the repository at this point in the history
Signed-off-by: Øyvind Harboe <[email protected]>
  • Loading branch information
oharboe committed Oct 22, 2024
1 parent 63b1b19 commit d86d1e7
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion sram/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,30 @@ filegroup(
output_group = "merged.lib",
)

filegroup(
name = "top_lib",
srcs = ["top_generate_abstract"],
output_group = "top.lib",
)

# Read in the renamed synthesis output from above and provide
# the original name to the next stage
genrule(
name = "mock-naja",
srcs = [
":sdq_17x64_synth_unedited",
":sdq_17x64_synth_mergedlib",
":top_lib",
],
outs = ["mock-naja.v"],
cmd = "mkdir -p `dirname $@`; ls $(location :sdq_17x64_synth_mergedlib); echo \"// imagine naja edits in this file\" > $@ && cat $(location :sdq_17x64_synth_unedited) >> $@",
cmd = """
set -ex
mkdir -p `dirname $@`
ls $(location :sdq_17x64_synth_mergedlib)
ls $(location :top_lib)
echo \"// imagine naja edits in this file\" > $@
cat $(location :sdq_17x64_synth_unedited) >> $@
""",
)

# FIXME some better way to deploy naja in Bazel environment is needed
Expand Down

0 comments on commit d86d1e7

Please sign in to comment.