3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-04-05 22:14:08 +00:00

sed -i option is not posix, and argument syntax is incompatible between mac and linux. use redirects instead

This commit is contained in:
N. Engelhardt 2020-10-09 11:41:18 +02:00
parent 93d65cc865
commit 7148bdd785

View file

@ -29,7 +29,7 @@ install:
mkdir -p $(DESTDIR)$(PREFIX)/bin
mkdir -p $(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
sed -e 's|##yosys-program-prefix##|"'$(PROGRAM_PREFIX)'"|' < sbysrc/sby_core.py > $(DESTDIR)$(PREFIX)/share/yosys/python3/sby_core.py
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"]]|;' \
-e "s|#!/usr/bin/env python3|#!$(PYTHON)|" < sbysrc/sby.py > $(DESTDIR)$(PREFIX)/bin/sby-script.py