mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #1973 from YosysHQ/eddie/fix1966
tests: fix various/plugin.sh when PREFIX != /usr/local/share
This commit is contained in:
commit
db27f2f378
|
@ -6,7 +6,7 @@ help() {
|
||||||
echo "Usage: $0 [--exec] [--prefix pf] args.."
|
echo "Usage: $0 [--exec] [--prefix pf] args.."
|
||||||
echo " $0 --build modname.so cppsources.."
|
echo " $0 --build modname.so cppsources.."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Replecement args:"
|
echo "Replacement args:"
|
||||||
echo " --cxx @CXX@"
|
echo " --cxx @CXX@"
|
||||||
echo " --cxxflags $( echo '@CXXFLAGS@' | fmt -w60 | sed ':a;N;$!ba;s/\n/ \\\n /g' )"
|
echo " --cxxflags $( echo '@CXXFLAGS@' | fmt -w60 | sed ':a;N;$!ba;s/\n/ \\\n /g' )"
|
||||||
echo " --ldflags @LDFLAGS@"
|
echo " --ldflags @LDFLAGS@"
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
set -e
|
set -e
|
||||||
rm -f plugin.so
|
rm -f plugin.so
|
||||||
CXXFLAGS=$(../../yosys-config --cxxflags)
|
CXXFLAGS=$(../../yosys-config --cxxflags)
|
||||||
CXXFLAGS=${CXXFLAGS// -I\/usr\/local\/share\/yosys\/include/ -I..\/..\/share\/include}
|
DATDIR=$(../../yosys-config --datdir)
|
||||||
|
DATDIR=${DATDIR//\//\\\/}
|
||||||
|
CXXFLAGS=${CXXFLAGS//$DATDIR/..\/..\/share}
|
||||||
../../yosys-config --exec --cxx ${CXXFLAGS} --ldflags -shared -o plugin.so plugin.cc
|
../../yosys-config --exec --cxx ${CXXFLAGS} --ldflags -shared -o plugin.so plugin.cc
|
||||||
../../yosys -m ./plugin.so -p "test" | grep -q "Plugin test passed!"
|
../../yosys -m ./plugin.so -p "test" | grep -q "Plugin test passed!"
|
||||||
|
|
Loading…
Reference in New Issue