From 963c0d2525c9d7af9a2c7640b554923f3a4f647e Mon Sep 17 00:00:00 2001 From: Sergey Kvachonok Date: Sat, 26 Mar 2016 11:01:53 +0300 Subject: Embed DATDIR make variable value into yosys binary. Use it as the last resort in the share/ directory location search. --- kernel/yosys.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'kernel') 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"); } -- cgit v1.2.3