diff options
author | Oleg Endo <olegendo@gcc.gnu.org> | 2019-04-29 16:13:34 +0900 |
---|---|---|
committer | Oleg Endo <olegendo@gcc.gnu.org> | 2019-04-29 16:13:34 +0900 |
commit | e531fb203aedeb3863ebf8add0bbd8251183d27a (patch) | |
tree | d2bbe44f8af041a0483a55839c6c46151746c087 /kernel/yosys.h | |
parent | ea0e0722bb42254ac8c63eb41664d9dfb7973aec (diff) | |
download | yosys-e531fb203aedeb3863ebf8add0bbd8251183d27a.tar.gz yosys-e531fb203aedeb3863ebf8add0bbd8251183d27a.tar.bz2 yosys-e531fb203aedeb3863ebf8add0bbd8251183d27a.zip |
escape spaces with backslash when writing dep file
filenames are sparated by spaces in the dep file. if a filename in the
dep file contains spaces they must be escaped, otherwise the tool that
reads the dep file will see multiple wrong filenames.
Diffstat (limited to 'kernel/yosys.h')
-rw-r--r-- | kernel/yosys.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/yosys.h b/kernel/yosys.h index 2cf6188b4..d64904151 100644 --- a/kernel/yosys.h +++ b/kernel/yosys.h @@ -257,6 +257,7 @@ std::string make_temp_dir(std::string template_str = "/tmp/yosys_XXXXXX"); bool check_file_exists(std::string filename, bool is_exec = false); bool is_absolute_path(std::string filename); void remove_directory(std::string dirname); +std::string escape_filename_spaces (const std::string& filename); template<typename T> int GetSize(const T &obj) { return obj.size(); } int GetSize(RTLIL::Wire *wire); |