FEATURE: Adding library output in the "list-json" command
We have found value in having libraries listed in the output of the list-json
command as it eases integration with our scripts for continuous integration tests. I suppose, as a principle, any additional information in the list-json
output could be helpful.
Here is a diff from the develop branch, but if you add me to the project, I could make a proper merge request.
diff --git a/hdlmake/action/commands.py b/hdlmake/action/commands.py
index 9db2964..4aee79c 100644
--- a/hdlmake/action/commands.py
+++ b/hdlmake/action/commands.py
@@ -179,8 +179,9 @@ class Commands(Action):
lang='verilog'
else:
lang='unknown'
- print (' {{ "file": "{file}", "language": "{lang}"}}'.format(
- file=f.rel_path(cwd), lang=lang), end='')
+ print (' {{ "file": "{file}", "language": "{lang}", "library": "{library}"}}'.format(
+ file=f.rel_path(cwd), lang=lang, library=f.library), end='')
+
print()
print(' ]')
print('}')