mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] configure_helper: fix cmake/meson builddir with subdir set
@ 2024-07-03  8:29 Philipp Zabel
  2024-07-12  8:05 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Philipp Zabel @ 2024-07-03  8:29 UTC (permalink / raw)
  To: ptxdist; +Cc: Philipp Zabel

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [APPLIED] configure_helper: fix cmake/meson builddir with subdir set
  2024-07-03  8:29 [ptxdist] [PATCH] configure_helper: fix cmake/meson builddir with subdir set Philipp Zabel
@ 2024-07-12  8:05 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2024-07-12  8:05 UTC (permalink / raw)
  To: ptxdist; +Cc: Philipp Zabel

Thanks, applied as 5b40e4845c52cb1449d60a491c4d6965ab270f57.

Michael

[sent from post-receive hook]

On Fri, 12 Jul 2024 10:05:33 +0200, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> This works with the LLVM style CMake build systems.
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> Message-Id: <20240703082920.2648410-1-p.zabel@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> 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)



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-12  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-03  8:29 [ptxdist] [PATCH] configure_helper: fix cmake/meson builddir with subdir set Philipp Zabel
2024-07-12  8:05 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox