vendor.xilinx_7series: Vivado requires bash on *nix as well.
authorwhitequark <cz@m-labs.hk>
Thu, 12 Sep 2019 21:49:08 +0000 (21:49 +0000)
committerwhitequark <cz@m-labs.hk>
Thu, 12 Sep 2019 21:49:08 +0000 (21:49 +0000)
nmigen/vendor/xilinx_7series.py

index 61733c8c56df0ed1fb1e5b310cea0e9657cbd095..6e7d22797220ff8423bfaad0e256a3a73b509866 100644 (file)
@@ -54,6 +54,13 @@ class Xilinx7SeriesPlatform(TemplatedPlatform):
 
     file_templates = {
         **TemplatedPlatform.build_script_templates,
+        "build_{{name}}.sh": r"""
+            # {{autogenerated}}
+            set -e{{verbose("x")}}
+            if [ -z "$BASH" ] ; then exec /bin/bash "$0" "$@"; fi
+            [ -n "${{platform._toolchain_env_var}}" ] && . "${{platform._toolchain_env_var}}"
+            {{emit_commands("sh")}}
+        """,
         "{{name}}.v": r"""
             /* {{autogenerated}} */
             {{emit_design("verilog")}}