abc9: generate $abc9_holes design instead of <name>$holes
[yosys.git] / misc / yosys-config.in
index 8f8dd06c6b46c7f2791dc5b557f57af1860068b9..a31ef38c2be4bd5547081b0817b10bce1cb03b99 100644 (file)
@@ -3,9 +3,10 @@
 help() {
        {
                echo ""
-               echo "Usage: $0 [-exec] [--prefix pf] args.."
+               echo "Usage: $0 [--exec] [--prefix pf] args.."
+               echo "       $0 --build modname.so cppsources.."
                echo ""
-               echo "Replecement args:"
+               echo "Replacement args:"
                echo "    --cxx         @CXX@"
                echo "    --cxxflags    $( echo '@CXXFLAGS@' | fmt -w60 | sed ':a;N;$!ba;s/\n/ \\\n                      /g' )"
                echo "    --ldflags     @LDFLAGS@"
@@ -13,21 +14,25 @@ help() {
                echo "    --bindir      @BINDIR@"
                echo "    --datdir      @DATDIR@"
                echo ""
-               echo "All other args are passed trhough as they are."
+               echo "All other args are passed through as they are."
                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 "  yosys-config --exec --cxx --cxxflags --ldflags -o plugin.so -shared plugin.cc --ldlibs"
+               echo "  $0 --exec --cxx --cxxflags --ldflags -o plugin.so -shared plugin.cc --ldlibs"
+               echo ""
+               echo "The above command can be abbreviated as:"
+               echo ""
+               echo "  $0 --build plugin.so plugin.cc"
                echo ""
                echo "Use --prefix to change the prefix for the special args from '--' to"
                echo "something else. Example:"
                echo ""
-               echo "  yosys-config --prefix @ bindir: @bindir"
+               echo "  $0 --prefix @ bindir: @bindir"
                echo ""
                echo "The args --bindir and --datdir can be directly followed by a slash and"
                echo "additional text. Example:"
                echo ""
-               echo "  yosys-config --datdir/simlib.v"
+               echo "  $0 --datdir/simlib.v"
                echo ""
        } >&2
        exit 1
@@ -37,6 +42,11 @@ if [ $# -eq 0 ]; then
        help
 fi
 
+if [ "$1" == "--build" ]; then
+       modname="$2"; shift 2
+       set -- --exec --cxx --cxxflags --ldflags -o "$modname" -shared "$@" --ldlibs
+fi
+
 prefix="--"
 get_prefix=false
 exec_mode=false