Commit 15e93834 authored by Dimitris Lampridis's avatar Dimitris Lampridis

hdl: Fix correct location for gen_sourceid.py script.

Depending on whether spec is a submodule of another project or a standalone project.
parent 8fbf7438
......@@ -7,8 +7,14 @@ files = [
try:
# Assume this module is in fact a git submodule of a main project that
# is in the same directory as general-cores...
exec(open("../ip_cores/" + "/general-cores/tools/gen_sourceid.py").read(),
exec(open("../../../" + "general-cores/tools/gen_sourceid.py").read(),
None, {'project': 'spec_base'})
except Exception as e:
try:
# Otherwise look for the local submodule of general-cores
exec(open("../ip_cores/" + "general-cores/tools/gen_sourceid.py").read(),
None, {'project': 'spec_base'})
except Exception as e:
print("Error: cannot generate source id file")
raise
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment