From: Sebastien Bourdeauducq Date: Sat, 1 Jun 2013 15:22:57 +0000 (+0200) Subject: xilinx_ise: improve parameter passing X-Git-Tag: 24jan2021_ls180~2099^2~443^2~25 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=953e603915cddfc9d887912391e8fe85b31d3699;p=litex.git xilinx_ise: improve parameter passing --- diff --git a/mibuild/xilinx_ise.py b/mibuild/xilinx_ise.py index c5273cab..bb70fdd3 100644 --- a/mibuild/xilinx_ise.py +++ b/mibuild/xilinx_ise.py @@ -165,14 +165,18 @@ class XilinxISEPlatform(GenericPlatform): def build_arg_ns(self, ns, *args, **kwargs): for n in ["build_dir", "build_name", "ise_path"]: - kwargs[n] = getattr(ns, n) - kwargs["source"] = not ns.no_source - kwargs["run"] = not ns.no_run + attr = getattr(ns, n) + if attr is not None: + kwargs[n] = attr + if ns.no_source: + kwargs["source"] = False + if ns.no_run: + kwargs["run"] = False self.build(*args, **kwargs) def add_arguments(self, parser): - parser.add_argument("--build-dir", default="build", help="Set the directory in which to generate files and run ISE") - parser.add_argument("--build-name", default="top", help="Base name for the generated files") - parser.add_argument("--ise-path", default="/opt/Xilinx", help="ISE installation path (without version directory)") + parser.add_argument("--build-dir", default=None, help="Set the directory in which to generate files and run ISE") + parser.add_argument("--build-name", default=None, help="Base name for the generated files") + parser.add_argument("--ise-path", default=None, help="ISE installation path (without version directory)") parser.add_argument("--no-source", action="store_true", help="Do not source ISE settings file") parser.add_argument("--no-run", action="store_true", help="Only generate files, do not run ISE")