From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 12 Jul 2024 10:05:59 +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 1sSBHy-0042Dv-36 for lore@lore.pengutronix.de; Fri, 12 Jul 2024 10:05:58 +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 1sSBHy-0003FA-4c; Fri, 12 Jul 2024 10:05:58 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sSBHa-0003Es-3o; Fri, 12 Jul 2024 10:05:34 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sSBHZ-008xGw-NY; Fri, 12 Jul 2024 10:05:33 +0200 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1sSBHZ-002jL8-2D; Fri, 12 Jul 2024 10:05:33 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Fri, 12 Jul 2024 10:05:33 +0200 Message-Id: <20240712080533.650935-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240703082920.2648410-1-p.zabel@pengutronix.de> References: <20240703082920.2648410-1-p.zabel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] 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 Thanks, applied as 5b40e4845c52cb1449d60a491c4d6965ab270f57. Michael [sent from post-receive hook] On Fri, 12 Jul 2024 10:05:33 +0200, Philipp Zabel wrote: > This works with the LLVM style CMake build systems. > > Signed-off-by: Philipp Zabel > Message-Id: <20240703082920.2648410-1-p.zabel@pengutronix.de> > Signed-off-by: Michael Olbrich > > 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)