From 7d8f4d1009c4e411c186d1328d0d4f84a74e3575 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 19 Jun 2015 00:52:39 +0200 Subject: [PATCH] mibuild/xilinx/ise: fix source and set source to False by default on Windows (tools supposed to be in the PATH) --- mibuild/xilinx/ise.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mibuild/xilinx/ise.py b/mibuild/xilinx/ise.py index 784d33fcf..6edd3dc2a 100644 --- a/mibuild/xilinx/ise.py +++ b/mibuild/xilinx/ise.py @@ -107,9 +107,9 @@ def _run_ise(build_name, ise_path, source, mode, ngdbuild_opt, script_ext = ".sh" shell = ["bash"] build_script_contents = "# Autogenerated by mibuild\nset -e\n" - - settings = common.settings(ise_path, ver, "ISE_DS") - build_script_contents += source_cmd + settings + "\n" + if source: + settings = common.settings(ise_path, ver, "ISE_DS") + build_script_contents += source_cmd + settings + "\n" if mode == "edif": ext = "edif" else: @@ -145,6 +145,10 @@ def _default_ise_path(): return "/opt/Xilinx" +def _default_source(): + return False if sys.platform == "win32" else True + + class XilinxISEToolchain: def __init__(self): self.xst_opt = """-ifmt MIXED @@ -158,7 +162,7 @@ class XilinxISEToolchain: self.ise_commands = "" def build(self, platform, fragment, build_dir="build", build_name="top", - ise_path=_default_ise_path(), source=True, run=True, mode="xst"): + ise_path=_default_ise_path(), source=_default_source(), run=True, mode="xst"): tools.mkdir_noerror(build_dir) os.chdir(build_dir)