From: Philipp Zabel <p.zabel@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Subject: [ptxdist] [PATCH] configure_helper: fix cmake/meson builddir with subdir set
Date: Wed, 3 Jul 2024 10:29:20 +0200 [thread overview]
Message-ID: <20240703082920.2648410-1-p.zabel@pengutronix.de> (raw)
This works with the LLVM style CMake build systems.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
scripts/configure_helper.py | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/scripts/configure_helper.py b/scripts/configure_helper.py
index 5efedf28a4da..3e9e1810db0b 100755
--- a/scripts/configure_helper.py
+++ b/scripts/configure_helper.py
@@ -332,6 +332,7 @@ def handle_dir(d, subdir):
if not d:
return (None, None, None)
+ builddir = d + "-build"
if subdir:
d = os.path.join(d, subdir)
@@ -345,9 +346,9 @@ def handle_dir(d, subdir):
if os.path.exists(configure) and tool in ("autoconf", ""):
return handle_dir_configure(d, configure)
elif os.path.exists(meson_build) and tool in ("meson", ""):
- return handle_dir_meson(d)
+ return handle_dir_meson(d, builddir)
elif os.path.exists(cmakelists) and tool in ("cmake", ""):
- return handle_dir_cmake(d)
+ return handle_dir_cmake(d, builddir)
else:
abort("not a autoconf/meson/cmake package: configure script / meson.build / CMakeLists.txt file not found in '%s'" % d)
exit(1)
@@ -375,8 +376,7 @@ def handle_dir_configure(d, configure):
label = os.path.basename(d)
return (parsed, args, label)
-def handle_dir_meson(d):
- meson_builddir = d + "-build"
+def handle_dir_meson(d, meson_builddir):
if not os.path.exists(meson_builddir):
abort("package must be configured")
exit(1)
@@ -405,8 +405,7 @@ def handle_dir_meson(d):
label = os.path.basename(d)
return (options, args, label)
-def handle_dir_cmake(d):
- cmake_builddir = d + "-build"
+def handle_dir_cmake(d, cmake_builddir):
if not os.path.exists(cmake_builddir):
abort("package must be configured")
exit(1)
--
2.39.2
next reply other threads:[~2024-07-03 8:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 8:29 Philipp Zabel [this message]
2024-07-12 8:05 ` [ptxdist] [APPLIED] " Michael Olbrich
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=20240703082920.2648410-1-p.zabel@pengutronix.de \
--to=p.zabel@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