diff options
author | Siesh1oo <siesh1oo@siesh1oo.no> | 2014-03-12 18:33:37 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-03-12 23:17:14 +0100 |
commit | 8127d5e8c35da6610dc9fd43cca66ff9ca41f078 (patch) | |
tree | 2a30bcb08197a4b77234befaa0096bccae52ae73 /passes/cmds | |
parent | 31528634796c15d0dcdb113ff730fa743663ca07 (diff) | |
download | yosys-8127d5e8c35da6610dc9fd43cca66ff9ca41f078.tar.gz yosys-8127d5e8c35da6610dc9fd43cca66ff9ca41f078.tar.bz2 yosys-8127d5e8c35da6610dc9fd43cca66ff9ca41f078.zip |
- kernel/register.h, kernel/driver.cc: refactor rewrite_yosys_exe()/get_share_file_name() to portable proc_self_dirname()/proc_share_dirname().
This refactoring improves robustness and allows OSX support with only 7 new lines of code, and easy extension for other systems.
- passes/abc/abc.cc, passes/cmds/show.cc, passes/techmap/techmap.cc: use new, refactored semantics.
Diffstat (limited to 'passes/cmds')
-rw-r--r-- | passes/cmds/show.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/passes/cmds/show.cc b/passes/cmds/show.cc index fdccb4bcc..bf37e5dae 100644 --- a/passes/cmds/show.cc +++ b/passes/cmds/show.cc @@ -751,7 +751,8 @@ struct ShowPass : public Pass { log_cmd_error("Shell command failed!\n"); } else if (format.empty()) { - std::string cmd = stringf("fuser -s '%s' || '%s' '%s' &", out_file.c_str(), rewrite_yosys_exe("yosys-svgviewer").c_str(), out_file.c_str()); + std::string svgviewer = proc_self_dirname() + "yosys-svgviewer"; + std::string cmd = stringf("fuser -s '%s' || '%s' '%s' &", out_file.c_str(), svgviewer.c_str(), out_file.c_str()); log("Exec: %s\n", cmd.c_str()); if (system(cmd.c_str()) != 0) log_cmd_error("Shell command failed!\n"); |