From 7e8c37832fc3094699077d03e49ec90c86ba9cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Tue, 22 Oct 2024 11:14:54 +0200 Subject: [PATCH] mock-naja: add .lib file from a macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Øyvind Harboe --- sram/BUILD | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sram/BUILD b/sram/BUILD index 55ae339..bd1214c 100644 --- a/sram/BUILD +++ b/sram/BUILD @@ -61,6 +61,12 @@ filegroup( output_group = "merged.lib", ) +filegroup( + name = "top_lib", + srcs = [":top_generete_abstract"], + output_group = "top.lib", +) + # Read in the renamed synthesis output from above and provide # the original name to the next stage genrule( @@ -68,9 +74,17 @@ genrule( 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 -e + 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