diff options
author | Sergey Kvachonok <ravenexp@gmail.com> | 2016-03-26 11:01:53 +0300 |
---|---|---|
committer | Sergey Kvachonok <ravenexp@gmail.com> | 2016-03-26 11:16:53 +0300 |
commit | 963c0d2525c9d7af9a2c7640b554923f3a4f647e (patch) | |
tree | 28d4993d9bfd3c1eb86905ccd6506939b6347eb9 /kernel | |
parent | a922d705d4c5e5c2f0cfc59f31fa11901ef307e1 (diff) | |
download | yosys-963c0d2525c9d7af9a2c7640b554923f3a4f647e.tar.gz yosys-963c0d2525c9d7af9a2c7640b554923f3a4f647e.tar.bz2 yosys-963c0d2525c9d7af9a2c7640b554923f3a4f647e.zip |
Embed DATDIR make variable value into yosys binary.
Use it as the last resort in the share/ directory location search.
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/yosys.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/yosys.cc b/kernel/yosys.cc index eba1aef11..a69a85447 100644 --- a/kernel/yosys.cc +++ b/kernel/yosys.cc @@ -701,6 +701,11 @@ std::string proc_share_dirname() proc_share_path = proc_self_path + "../share/yosys/"; if (check_file_exists(proc_share_path, true)) return proc_share_path; +# ifdef YOSYS_DATDIR + proc_share_path = YOSYS_DATDIR "/"; + if (check_file_exists(proc_share_path, true)) + return proc_share_path; +# endif # endif log_error("proc_share_dirname: unable to determine share/ directory!\n"); } |