From 953e603915cddfc9d887912391e8fe85b31d3699 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 1 Jun 2013 17:22:57 +0200 Subject: [PATCH] xilinx_ise: improve parameter passing --- mibuild/xilinx_ise.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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") -- 2.30.2