mirror of
https://github.com/YosysHQ/sby.git
synced 2025-04-06 14:24:08 +00:00
Add a PROGRAM_PREFIX= Makefile option for packages with prefixed Yosys.
This commit is contained in:
parent
b172357161
commit
287e33a47f
2
Makefile
2
Makefile
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
DESTDIR =
|
DESTDIR =
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
PROGRAM_PREFIX =
|
||||||
|
|
||||||
# On Windows, manually setting absolute path to Python binary may be required
|
# On Windows, manually setting absolute path to Python binary may be required
|
||||||
# for launcher executable to work. From MSYS2, this can be done using the
|
# for launcher executable to work. From MSYS2, this can be done using the
|
||||||
|
@ -28,6 +29,7 @@ install:
|
||||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||||
mkdir -p $(DESTDIR)$(PREFIX)/share/yosys/python3
|
mkdir -p $(DESTDIR)$(PREFIX)/share/yosys/python3
|
||||||
cp sbysrc/sby_*.py $(DESTDIR)$(PREFIX)/share/yosys/python3/
|
cp sbysrc/sby_*.py $(DESTDIR)$(PREFIX)/share/yosys/python3/
|
||||||
|
sed -e 's|##yosys-program-prefix##|"'$(PROGRAM_PREFIX)'"|' -i $(DESTDIR)$(PREFIX)/share/yosys/python3/sby_core.py
|
||||||
ifeq ($(OS), Windows_NT)
|
ifeq ($(OS), Windows_NT)
|
||||||
sed -e 's|##yosys-sys-path##|sys.path += [os.path.dirname(__file__) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' \
|
sed -e 's|##yosys-sys-path##|sys.path += [os.path.dirname(__file__) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' \
|
||||||
-e "s|#!/usr/bin/env python3|#!$(PYTHON)|" < sbysrc/sby.py > $(DESTDIR)$(PREFIX)/bin/sby-script.py
|
-e "s|#!/usr/bin/env python3|#!$(PYTHON)|" < sbysrc/sby.py > $(DESTDIR)$(PREFIX)/bin/sby-script.py
|
||||||
|
|
|
@ -220,10 +220,11 @@ class SbyJob:
|
||||||
self.total_time = 0
|
self.total_time = 0
|
||||||
self.expect = []
|
self.expect = []
|
||||||
|
|
||||||
|
yosys_program_prefix = "" ##yosys-program-prefix##
|
||||||
self.exe_paths = {
|
self.exe_paths = {
|
||||||
"yosys": os.getenv("YOSYS", "yosys"),
|
"yosys": os.getenv("YOSYS", yosys_program_prefix + "yosys"),
|
||||||
"abc": os.getenv("ABC", "yosys-abc"),
|
"abc": os.getenv("ABC", yosys_program_prefix + "yosys-abc"),
|
||||||
"smtbmc": os.getenv("SMTBMC", "yosys-smtbmc"),
|
"smtbmc": os.getenv("SMTBMC", yosys_program_prefix + "yosys-smtbmc"),
|
||||||
"suprove": os.getenv("SUPROVE", "suprove"),
|
"suprove": os.getenv("SUPROVE", "suprove"),
|
||||||
"aigbmc": os.getenv("AIGBMC", "aigbmc"),
|
"aigbmc": os.getenv("AIGBMC", "aigbmc"),
|
||||||
"avy": os.getenv("AVY", "avy"),
|
"avy": os.getenv("AVY", "avy"),
|
||||||
|
|
Loading…
Reference in a new issue