mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-05 17:14:08 +00:00
Fix help of yosys-config.in and provide backward compatibility
This commit is contained in:
parent
cf7b6c66f0
commit
5fa609b6bf
|
@ -9,8 +9,10 @@ help() {
|
||||||
echo "Replacement 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 @LINKFLAGS@"
|
echo " --linkflags @LINKFLAGS@"
|
||||||
echo " --ldlibs @LIBS@"
|
echo " --ldflags (alias of --linkflags)"
|
||||||
|
echo " --libs @LIBS@"
|
||||||
|
echo " --ldlibs (alias of --libs)"
|
||||||
echo " --bindir @BINDIR@"
|
echo " --bindir @BINDIR@"
|
||||||
echo " --datdir @DATDIR@"
|
echo " --datdir @DATDIR@"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -18,7 +20,7 @@ help() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "Use --exec to call a command instead of generating output. Example usage:"
|
echo "Use --exec to call a command instead of generating output. Example usage:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " $0 --exec --cxx --cxxflags --ldflags -o plugin.so -shared plugin.cc --ldlibs"
|
echo " $0 --exec --cxx --cxxflags --ldflags -o plugin.so -shared plugin.cc --libs"
|
||||||
echo ""
|
echo ""
|
||||||
echo "The above command can be abbreviated as:"
|
echo "The above command can be abbreviated as:"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -44,7 +46,7 @@ fi
|
||||||
|
|
||||||
if [ "$1" == "--build" ]; then
|
if [ "$1" == "--build" ]; then
|
||||||
modname="$2"; shift 2
|
modname="$2"; shift 2
|
||||||
set -- --exec --cxx --cxxflags --ldflags -o "$modname" -shared "$@" --ldlibs
|
set -- --exec --cxx --cxxflags --ldflags -o "$modname" -shared "$@" --libs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
prefix="--"
|
prefix="--"
|
||||||
|
@ -63,6 +65,10 @@ for opt; do
|
||||||
tokens=( "${tokens[@]}" @CXX@ ) ;;
|
tokens=( "${tokens[@]}" @CXX@ ) ;;
|
||||||
"$prefix"cxxflags)
|
"$prefix"cxxflags)
|
||||||
tokens=( "${tokens[@]}" @CXXFLAGS@ ) ;;
|
tokens=( "${tokens[@]}" @CXXFLAGS@ ) ;;
|
||||||
|
"$prefix"linkflags)
|
||||||
|
tokens=( "${tokens[@]}" @LINKFLAGS@ ) ;;
|
||||||
|
"$prefix"libs)
|
||||||
|
tokens=( "${tokens[@]}" @LIBS@ ) ;;
|
||||||
"$prefix"ldflags)
|
"$prefix"ldflags)
|
||||||
tokens=( "${tokens[@]}" @LINKFLAGS@ ) ;;
|
tokens=( "${tokens[@]}" @LINKFLAGS@ ) ;;
|
||||||
"$prefix"ldlibs)
|
"$prefix"ldlibs)
|
||||||
|
|
Loading…
Reference in a new issue