From 7659a2b9e350a9ccb219d2c12c162ade85cde5b8 Mon Sep 17 00:00:00 2001 From: Roland Hieber Date: Mon, 13 Jan 2020 14:59:25 +0100 Subject: configure_helper: allow passing --force to ptxdist Signed-off-by: Roland Hieber Signed-off-by: Michael Olbrich --- scripts/configure_helper.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'scripts/configure_helper.py') diff --git a/scripts/configure_helper.py b/scripts/configure_helper.py index 3af7b416a..a29d80ecf 100755 --- a/scripts/configure_helper.py +++ b/scripts/configure_helper.py @@ -163,7 +163,7 @@ def abort(message): print("\nSee '%s --help' for more details." % cmd) exit(1) -def ask_ptxdist(pkg): +def ask_ptxdist(pkg, force): ptxdist = os.environ.get("PTXDIST", os.environ.get("ptxdist", "ptxdist")) cmdline = [ ptxdist, "-k", "make", "/print-%s_DIR" % pkg, @@ -174,6 +174,9 @@ def ask_ptxdist(pkg): "/print-CROSS_MESON_USR", "/print-CROSS_AUTOCONF_USR", "/print-PTXDIST_SYSROOT_HOST" ] + if force: + cmdline.insert(1, "--force") + try: p = subprocess.Popen(cmdline, stdout=subprocess.PIPE, @@ -485,6 +488,8 @@ parser.add_argument("-s", "--only-src", help="the only source directory", dest="only") parser.add_argument("--sort", help="sort the options before comparing", dest="sort", action="store_true") +parser.add_argument("-f", "--force", help="pass --force when calling ptxdist", + dest="force", action="store_true") args = parser.parse_args() @@ -512,7 +517,7 @@ ptx_pkg_conf_opt = [] pkg_subdir = "" tool = None if args.pkg: - (tool, d, pkg_subdir, pkg_conf_opt, sysroot_host) = ask_ptxdist(ptx_PKG) + (tool, d, pkg_subdir, pkg_conf_opt, sysroot_host) = ask_ptxdist(ptx_PKG, args.force) ptx_pkg_label = "rules/%s.make" % ptx_pkg if tool == "autoconf": parsed_pkg_conf_opt = parse_configure_args(pkg_conf_opt, []) -- cgit v1.2.3