From: Roland Hieber <rhi@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [ptxdist] [PATCH v2] configure_helper: allow passing --force to ptxdist
Date: Mon, 13 Jan 2020 14:59:25 +0100 [thread overview]
Message-ID: <20200113135925.19682-1-rhi@pengutronix.de> (raw)
In-Reply-To: <20200113135553.14626-1-rhi@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
v2: update doc/contributing.rst too
doc/contributing.rst | 3 +++
scripts/configure_helper.py | 9 +++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/doc/contributing.rst b/doc/contributing.rst
index 31dadcb0bba5..705f01377d32 100644
--- a/doc/contributing.rst
+++ b/doc/contributing.rst
@@ -130,6 +130,9 @@ needed. This tool contains a blacklist to filter out these options.
``--sort``
Sort the options before comparing
+``-f, --force``
+ Call PTXdist with ``--force``
+
There are several different ways to configure arguments:
.. code-block:: sh
diff --git a/scripts/configure_helper.py b/scripts/configure_helper.py
index 3af7b416a4f7..a29d80ecf0f3 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, [])
--
2.25.0.rc1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
prev parent reply other threads:[~2020-01-13 13:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 13:55 [ptxdist] [PATCH] " Roland Hieber
2020-01-13 13:59 ` Roland Hieber [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200113135925.19682-1-rhi@pengutronix.de \
--to=rhi@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox