aboutsummaryrefslogtreecommitdiffstats
path: root/passes/cmds
diff options
context:
space:
mode:
authorSiesh1oo <siesh1oo@siesh1oo.no>2014-03-12 18:33:37 +0100
committerSiesh1oo <siesh1oo@siesh1oo.no>2014-03-12 18:33:37 +0100
commit5a50760e2c327ded7a4da223fb16591febcb773f (patch)
tree3f720130f55875f208b30844a080e3209beceaaf /passes/cmds
parent50423e3935095e535aa42aa17c80f0d178730e93 (diff)
downloadyosys-5a50760e2c327ded7a4da223fb16591febcb773f.tar.gz
yosys-5a50760e2c327ded7a4da223fb16591febcb773f.tar.bz2
yosys-5a50760e2c327ded7a4da223fb16591febcb773f.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. - Makefile: no need to add $(PWD) to $(PATH) anymore.
Diffstat (limited to 'passes/cmds')
-rw-r--r--passes/cmds/show.cc3
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");