From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 03 Jul 2024 10:29:48 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sOvN6-0017O4-1N for lore@lore.pengutronix.de; Wed, 03 Jul 2024 10:29:48 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1sOvN5-0006BQ-K5; Wed, 03 Jul 2024 10:29:47 +0200 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1sOvMf-0006Ae-AJ; Wed, 03 Jul 2024 10:29:21 +0200 From: Philipp Zabel To: ptxdist@pengutronix.de Date: Wed, 3 Jul 2024 10:29:20 +0200 Message-Id: <20240703082920.2648410-1-p.zabel@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [ptxdist] [PATCH] configure_helper: fix cmake/meson builddir with subdir set X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Philipp Zabel Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false This works with the LLVM style CMake build systems. Signed-off-by: Philipp Zabel --- 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