All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/pkg-meson: change build sub-dir name
@ 2025-03-09 16:26 Cherniaev Andrei
  2025-03-09 16:26 ` [Buildroot] [PATCH 2/2] package/libopenh264: switch to meson Cherniaev Andrei
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Cherniaev Andrei @ 2025-03-09 16:26 UTC (permalink / raw)
  To: buildroot; +Cc: Cherniaev Andrei, Thomas Petazzoni, Eric Le Bihan

I encountered a situation where build/ is not empty folder so when all files in build/ was removed by buildroot I was not able to use meson, example https://gitlab.com/buildroot.org/buildroot/-/issues/64
The choice of "build" as the build sub-directorty is a bit stupid.

Co-Authored-By: Thomas Petazzoni <1089203+tpetazzoni@users.noreply.github.com>
---
 package/pkg-meson.mk | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
index bc805b799c..30271e35e5 100644
--- a/package/pkg-meson.mk
+++ b/package/pkg-meson.mk
@@ -147,12 +147,12 @@ $(2)_CXXFLAGS ?= $$(TARGET_CXXFLAGS)
 #
 #
 define $(2)_CONFIGURE_CMDS
-	rm -rf $$($$(PKG)_SRCDIR)/build
-	mkdir -p $$($$(PKG)_SRCDIR)/build
+	rm -rf $$($$(PKG)_SRCDIR)/buildroot-build
+	mkdir -p $$($$(PKG)_SRCDIR)/buildroot-build
 	sed -e "/^\[binaries\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_BINARIES),\n$$(x)):" \
 	    -e "/^\[properties\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_PROPERTIES),\n$$(x)):" \
 	    $$(call PKG_MESON_CROSSCONFIG_SED,$(2)_CFLAGS,$(2)_CXXFLAGS,$(2)_LDFLAGS,$(2)_FCFLAGS) \
-	    > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf
+	    > $$($$(PKG)_SRCDIR)/buildroot-build/cross-compilation.conf
 	PATH=$$(BR_PATH) \
 	CC_FOR_BUILD="$$(HOSTCC)" \
 	CXX_FOR_BUILD="$$(HOSTCXX)" \
@@ -162,21 +162,21 @@ define $(2)_CONFIGURE_CMDS
 		--libdir=lib \
 		--default-library=$(PKG_MESON_DEFAULT_LIBRARY) \
 		--buildtype=$(if $(BR2_ENABLE_RUNTIME_DEBUG),debug,release) \
-		--cross-file=$$($$(PKG)_SRCDIR)/build/cross-compilation.conf \
+		--cross-file=$$($$(PKG)_SRCDIR)/buildroot-build/cross-compilation.conf \
 		-Db_pie=false \
 		-Db_staticpic=$(if $(BR2_m68k_cf),false,true) \
 		-Dstrip=false \
 		-Dbuild.pkg_config_path=$$(HOST_DIR)/lib/pkgconfig \
 		-Dbuild.cmake_prefix_path=$$(HOST_DIR)/lib/cmake \
 		$$($$(PKG)_CONF_OPTS) \
-		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/build
+		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/buildroot-build
 endef
 else
 
 # Configure package for host
 define $(2)_CONFIGURE_CMDS
-	rm -rf $$($$(PKG)_SRCDIR)/build
-	mkdir -p $$($$(PKG)_SRCDIR)/build
+	rm -rf $$($$(PKG)_SRCDIR)/buildroot-build
+	mkdir -p $$($$(PKG)_SRCDIR)/buildroot-build
 	$$(HOST_CONFIGURE_OPTS) \
 	$$($$(PKG)_CONF_ENV) $$(MESON) setup \
 		--prefix=$$(HOST_DIR) \
@@ -188,7 +188,7 @@ define $(2)_CONFIGURE_CMDS
 		--wrap-mode=nodownload \
 		-Dstrip=true \
 		$$($$(PKG)_CONF_OPTS) \
-		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/build
+		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/buildroot-build
 endef
 endif
 endif
@@ -203,12 +203,12 @@ ifndef $(2)_BUILD_CMDS
 ifeq ($(4),target)
 define $(2)_BUILD_CMDS
 	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
-		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build
+		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build
 endef
 else
 define $(2)_BUILD_CMDS
 	$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
-		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build
+		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build
 endef
 endif
 endif
@@ -220,7 +220,7 @@ endif
 ifndef $(2)_INSTALL_CMDS
 define $(2)_INSTALL_CMDS
 	$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
-		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build install
+		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build install
 endef
 endif
 
@@ -231,7 +231,7 @@ endif
 ifndef $(2)_INSTALL_STAGING_CMDS
 define $(2)_INSTALL_STAGING_CMDS
 	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(STAGING_DIR) \
-		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build install
+		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build install
 endef
 endif
 
@@ -242,7 +242,7 @@ endif
 ifndef $(2)_INSTALL_TARGET_CMDS
 define $(2)_INSTALL_TARGET_CMDS
 	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(TARGET_DIR) \
-		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build install
+		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build install
 endef
 endif
 
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/2] package/libopenh264: switch to meson
  2025-03-09 16:26 [Buildroot] [PATCH 1/2] package/pkg-meson: change build sub-dir name Cherniaev Andrei
@ 2025-03-09 16:26 ` Cherniaev Andrei
  2025-05-16  9:42   ` Peter Korsgaard
  2025-05-16  9:41 ` [Buildroot] [PATCH 1/2] package/pkg-meson: change build sub-dir name Peter Korsgaard
  2025-05-31 16:47 ` Arnout Vandecappelle via buildroot
  2 siblings, 1 reply; 6+ messages in thread
From: Cherniaev Andrei @ 2025-03-09 16:26 UTC (permalink / raw)
  To: buildroot; +Cc: Cherniaev Andrei, Bernd Kuhls, Eric Le Bihan

---
 package/libopenh264/libopenh264.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/libopenh264/libopenh264.mk b/package/libopenh264/libopenh264.mk
index e371e4cdc0..8f0a30cf5a 100644
--- a/package/libopenh264/libopenh264.mk
+++ b/package/libopenh264/libopenh264.mk
@@ -52,4 +52,4 @@ define LIBOPENH264_INSTALL_TARGET_CMDS
 		DESTDIR=$(TARGET_DIR) PREFIX=/usr install
 endef
 
-$(eval $(generic-package))
+$(eval $(meson-package))
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] package/pkg-meson: change build sub-dir name
  2025-03-09 16:26 [Buildroot] [PATCH 1/2] package/pkg-meson: change build sub-dir name Cherniaev Andrei
  2025-03-09 16:26 ` [Buildroot] [PATCH 2/2] package/libopenh264: switch to meson Cherniaev Andrei
@ 2025-05-16  9:41 ` Peter Korsgaard
  2025-05-16 14:53   ` CHERNIAEV ANDREI
  2025-05-31 16:47 ` Arnout Vandecappelle via buildroot
  2 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2025-05-16  9:41 UTC (permalink / raw)
  To: Cherniaev Andrei; +Cc: buildroot, Thomas Petazzoni, Eric Le Bihan

>>>>> "Cherniaev" == Cherniaev Andrei <dungeonlords789@naver.com> writes:

 > I encountered a situation where build/ is not empty folder so when all
 > files in build/ was removed by buildroot I was not able to use meson,
 > example https://gitlab.com/buildroot.org/buildroot/-/issues/64
 > The choice of "build" as the build sub-directorty is a bit stupid.

 > Co-Authored-By: Thomas Petazzoni <1089203+tpetazzoni@users.noreply.github.com>

You forgot to add your signed-off-by (git commit -s). Given how this is
just a replacement of build -> buildroot-build I took the liberty of
adding it here manually, hopefully that is OK with you?

Committed after rewording the commit message quite a bit, thanks.

> ---
 >  package/pkg-meson.mk | 26 +++++++++++++-------------
 >  1 file changed, 13 insertions(+), 13 deletions(-)

 > diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
 > index bc805b799c..30271e35e5 100644
 > --- a/package/pkg-meson.mk
 > +++ b/package/pkg-meson.mk
 > @@ -147,12 +147,12 @@ $(2)_CXXFLAGS ?= $$(TARGET_CXXFLAGS)
 >  #
 >  #
 >  define $(2)_CONFIGURE_CMDS
 > -	rm -rf $$($$(PKG)_SRCDIR)/build
 > -	mkdir -p $$($$(PKG)_SRCDIR)/build
 > +	rm -rf $$($$(PKG)_SRCDIR)/buildroot-build
 > +	mkdir -p $$($$(PKG)_SRCDIR)/buildroot-build
 >  	sed -e "/^\[binaries\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_BINARIES),\n$$(x)):" \
 >  	    -e "/^\[properties\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_PROPERTIES),\n$$(x)):" \
 >  	    $$(call PKG_MESON_CROSSCONFIG_SED,$(2)_CFLAGS,$(2)_CXXFLAGS,$(2)_LDFLAGS,$(2)_FCFLAGS) \
 > -	    > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf
 > +	    > $$($$(PKG)_SRCDIR)/buildroot-build/cross-compilation.conf
 >  	PATH=$$(BR_PATH) \
 >  	CC_FOR_BUILD="$$(HOSTCC)" \
 >  	CXX_FOR_BUILD="$$(HOSTCXX)" \
 > @@ -162,21 +162,21 @@ define $(2)_CONFIGURE_CMDS
 >  		--libdir=lib \
 >  		--default-library=$(PKG_MESON_DEFAULT_LIBRARY) \
 >  		--buildtype=$(if $(BR2_ENABLE_RUNTIME_DEBUG),debug,release) \
 > -		--cross-file=$$($$(PKG)_SRCDIR)/build/cross-compilation.conf \
 > +		--cross-file=$$($$(PKG)_SRCDIR)/buildroot-build/cross-compilation.conf \
 >  		-Db_pie=false \
 >  		-Db_staticpic=$(if $(BR2_m68k_cf),false,true) \
 >  		-Dstrip=false \
 >  		-Dbuild.pkg_config_path=$$(HOST_DIR)/lib/pkgconfig \
 >  		-Dbuild.cmake_prefix_path=$$(HOST_DIR)/lib/cmake \
 >  		$$($$(PKG)_CONF_OPTS) \
 > -		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/build
 > +		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/buildroot-build
 >  endef
 >  else
 
 >  # Configure package for host
 >  define $(2)_CONFIGURE_CMDS
 > -	rm -rf $$($$(PKG)_SRCDIR)/build
 > -	mkdir -p $$($$(PKG)_SRCDIR)/build
 > +	rm -rf $$($$(PKG)_SRCDIR)/buildroot-build
 > +	mkdir -p $$($$(PKG)_SRCDIR)/buildroot-build
 >  	$$(HOST_CONFIGURE_OPTS) \
 >  	$$($$(PKG)_CONF_ENV) $$(MESON) setup \
 >  		--prefix=$$(HOST_DIR) \
 > @@ -188,7 +188,7 @@ define $(2)_CONFIGURE_CMDS
 >  		--wrap-mode=nodownload \
 >  		-Dstrip=true \
 >  		$$($$(PKG)_CONF_OPTS) \
 > -		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/build
 > +		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/buildroot-build
 >  endef
 >  endif
 >  endif
 > @@ -203,12 +203,12 @@ ifndef $(2)_BUILD_CMDS
 >  ifeq ($(4),target)
 >  define $(2)_BUILD_CMDS
 >  	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
 > -		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build
 > +		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build
 >  endef
 >  else
 >  define $(2)_BUILD_CMDS
 >  	$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
 > -		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build
 > +		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build
 >  endef
 >  endif
 >  endif
 > @@ -220,7 +220,7 @@ endif
 >  ifndef $(2)_INSTALL_CMDS
 >  define $(2)_INSTALL_CMDS
 >  	$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
 > -		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build install
 > +		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build install
 >  endef
 >  endif
 
 > @@ -231,7 +231,7 @@ endif
 >  ifndef $(2)_INSTALL_STAGING_CMDS
 >  define $(2)_INSTALL_STAGING_CMDS
 >  	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(STAGING_DIR) \
 > -		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build install
 > +		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build install
 >  endef
 >  endif
 
 > @@ -242,7 +242,7 @@ endif
 >  ifndef $(2)_INSTALL_TARGET_CMDS
 >  define $(2)_INSTALL_TARGET_CMDS
 >  	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(TARGET_DIR) \
 > -		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build install
 > +		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build install
 >  endef
 >  endif
 
 > -- 

 > 2.43.0

 > _______________________________________________
 > buildroot mailing list
 > buildroot@buildroot.org
 > https://lists.buildroot.org/mailman/listinfo/buildroot


-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] package/libopenh264: switch to meson
  2025-03-09 16:26 ` [Buildroot] [PATCH 2/2] package/libopenh264: switch to meson Cherniaev Andrei
@ 2025-05-16  9:42   ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2025-05-16  9:42 UTC (permalink / raw)
  To: Cherniaev Andrei; +Cc: buildroot, Bernd Kuhls, Eric Le Bihan

>>>>> "Cherniaev" == Cherniaev Andrei <dungeonlords789@naver.com> writes:

Why? What is the advantage? Please describe the reason and add your
signed-off-by.

 > ---
 >  package/libopenh264/libopenh264.mk | 2 +-
 >  1 file changed, 1 insertion(+), 1 deletion(-)

 > diff --git a/package/libopenh264/libopenh264.mk b/package/libopenh264/libopenh264.mk
 > index e371e4cdc0..8f0a30cf5a 100644
 > --- a/package/libopenh264/libopenh264.mk
 > +++ b/package/libopenh264/libopenh264.mk
 > @@ -52,4 +52,4 @@ define LIBOPENH264_INSTALL_TARGET_CMDS
 >  		DESTDIR=$(TARGET_DIR) PREFIX=/usr install
 >  endef
 
 > -$(eval $(generic-package))
 > +$(eval $(meson-package))
 > -- 

 > 2.43.0

 > _______________________________________________
 > buildroot mailing list
 > buildroot@buildroot.org
 > https://lists.buildroot.org/mailman/listinfo/buildroot


-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot]  [PATCH 1/2] package/pkg-meson: change build sub-dir name
  2025-05-16  9:41 ` [Buildroot] [PATCH 1/2] package/pkg-meson: change build sub-dir name Peter Korsgaard
@ 2025-05-16 14:53   ` CHERNIAEV ANDREI
  0 siblings, 0 replies; 6+ messages in thread
From: CHERNIAEV ANDREI @ 2025-05-16 14:53 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: buildroot, Thomas Petazzoni, Eric Le Bihan


[-- Attachment #1.1: Type: text/plain, Size: 5487 bytes --]

"took the liberty of adding it here manually"
Yes, please. I am waiting that day when I can commit via gitlab/github without this oldschool rules and 80-symbols row size... Let's switch to 2025!

-----Original Message-----
From: "Peter Korsgaard"<peter@korsgaard.com>
To: "Cherniaev Andrei"<dungeonlords789@naver.com>;
Cc: <buildroot@buildroot.org>; "Thomas Petazzoni"<homas.petazzoni@bootlin.com>; "Eric Le Bihan"<eric.le.bihan.dev@free.fr>;
Sent: 2025-05-16 (금) 18:41:34 (GMT+09:00)
Subject: Re: [Buildroot] [PATCH 1/2] package/pkg-meson: change build sub-dir name

>>>>> "Cherniaev" == Cherniaev Andrei <dungeonlords789@naver.com> writes:

> I encountered a situation where build/ is not empty folder so when all
> files in build/ was removed by buildroot I was not able to use meson,
> example https://gitlab.com/buildroot.org/buildroot/-/issues/64
> The choice of "build" as the build sub-directorty is a bit stupid.

> Co-Authored-By: Thomas Petazzoni <1089203+tpetazzoni@users.noreply.github.com>

You forgot to add your signed-off-by (git commit -s). Given how this is
just a replacement of build -> buildroot-build I took the liberty of
adding it here manually, hopefully that is OK with you?

Committed after rewording the commit message quite a bit, thanks.

> ---
>  package/pkg-meson.mk | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)

> diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
> index bc805b799c..30271e35e5 100644
> --- a/package/pkg-meson.mk
> +++ b/package/pkg-meson.mk
> @@ -147,12 +147,12 @@ $(2)_CXXFLAGS ?= $$(TARGET_CXXFLAGS)
>  #
>  #
>  define $(2)_CONFIGURE_CMDS
> - rm -rf $$($$(PKG)_SRCDIR)/build
> - mkdir -p $$($$(PKG)_SRCDIR)/build
> + rm -rf $$($$(PKG)_SRCDIR)/buildroot-build
> + mkdir -p $$($$(PKG)_SRCDIR)/buildroot-build
>   sed -e "/^\[binaries\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_BINARIES),\n$$(x)):" \
>      -e "/^\[properties\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_PROPERTIES),\n$$(x)):" \
>      $$(call PKG_MESON_CROSSCONFIG_SED,$(2)_CFLAGS,$(2)_CXXFLAGS,$(2)_LDFLAGS,$(2)_FCFLAGS) \
> -    > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf
> +    > $$($$(PKG)_SRCDIR)/buildroot-build/cross-compilation.conf
>   PATH=$$(BR_PATH) \
>   CC_FOR_BUILD="$$(HOSTCC)" \
>   CXX_FOR_BUILD="$$(HOSTCXX)" \
> @@ -162,21 +162,21 @@ define $(2)_CONFIGURE_CMDS
>   --libdir=lib \
>   --default-library=$(PKG_MESON_DEFAULT_LIBRARY) \
>   --buildtype=$(if $(BR2_ENABLE_RUNTIME_DEBUG),debug,release) \
> - --cross-file=$$($$(PKG)_SRCDIR)/build/cross-compilation.conf \
> + --cross-file=$$($$(PKG)_SRCDIR)/buildroot-build/cross-compilation.conf \
>   -Db_pie=false \
>   -Db_staticpic=$(if $(BR2_m68k_cf),false,true) \
>   -Dstrip=false \
>   -Dbuild.pkg_config_path=$$(HOST_DIR)/lib/pkgconfig \
>   -Dbuild.cmake_prefix_path=$$(HOST_DIR)/lib/cmake \
>   $$($$(PKG)_CONF_OPTS) \
> - $$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/build
> + $$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/buildroot-build
>  endef
>  else

>  # Configure package for host
>  define $(2)_CONFIGURE_CMDS
> - rm -rf $$($$(PKG)_SRCDIR)/build
> - mkdir -p $$($$(PKG)_SRCDIR)/build
> + rm -rf $$($$(PKG)_SRCDIR)/buildroot-build
> + mkdir -p $$($$(PKG)_SRCDIR)/buildroot-build
>   $$(HOST_CONFIGURE_OPTS) \
>   $$($$(PKG)_CONF_ENV) $$(MESON) setup \
>   --prefix=$$(HOST_DIR) \
> @@ -188,7 +188,7 @@ define $(2)_CONFIGURE_CMDS
>   --wrap-mode=nodownload \
>   -Dstrip=true \
>   $$($$(PKG)_CONF_OPTS) \
> - $$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/build
> + $$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/buildroot-build
>  endef
>  endif
>  endif
> @@ -203,12 +203,12 @@ ifndef $(2)_BUILD_CMDS
>  ifeq ($(4),target)
>  define $(2)_BUILD_CMDS
>   $$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
> - $$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build
> + $$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build
>  endef
>  else
>  define $(2)_BUILD_CMDS
>   $$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
> - $$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build
> + $$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build
>  endef
>  endif
>  endif
> @@ -220,7 +220,7 @@ endif
>  ifndef $(2)_INSTALL_CMDS
>  define $(2)_INSTALL_CMDS
>   $$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
> - $$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build install
> + $$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build install
>  endef
>  endif

> @@ -231,7 +231,7 @@ endif
>  ifndef $(2)_INSTALL_STAGING_CMDS
>  define $(2)_INSTALL_STAGING_CMDS
>   $$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(STAGING_DIR) \
> - $$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build install
> + $$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build install
>  endef
>  endif

> @@ -242,7 +242,7 @@ endif
>  ifndef $(2)_INSTALL_TARGET_CMDS
>  define $(2)_INSTALL_TARGET_CMDS
>   $$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(TARGET_DIR) \
> - $$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build install
> + $$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build install
>  endef
>  endif

> --

> 2.43.0

> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot


--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

[-- Attachment #1.2: Type: text/html, Size: 7673 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] package/pkg-meson: change build sub-dir name
  2025-03-09 16:26 [Buildroot] [PATCH 1/2] package/pkg-meson: change build sub-dir name Cherniaev Andrei
  2025-03-09 16:26 ` [Buildroot] [PATCH 2/2] package/libopenh264: switch to meson Cherniaev Andrei
  2025-05-16  9:41 ` [Buildroot] [PATCH 1/2] package/pkg-meson: change build sub-dir name Peter Korsgaard
@ 2025-05-31 16:47 ` Arnout Vandecappelle via buildroot
  2 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2025-05-31 16:47 UTC (permalink / raw)
  To: Cherniaev Andrei, buildroot; +Cc: Thomas Petazzoni, Eric Le Bihan



On 09/03/2025 17:26, Cherniaev Andrei wrote:
> I encountered a situation where build/ is not empty folder so when all files in build/ was removed by buildroot I was not able to use meson, example https://gitlab.com/buildroot.org/buildroot/-/issues/64
> The choice of "build" as the build sub-directorty is a bit stupid.
> 
> Co-Authored-By: Thomas Petazzoni <1089203+tpetazzoni@users.noreply.github.com>

  Applied to 2025.02.x, thanks.

  Regards,
  Arnout

> ---
>   package/pkg-meson.mk | 26 +++++++++++++-------------
>   1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
> index bc805b799c..30271e35e5 100644
> --- a/package/pkg-meson.mk
> +++ b/package/pkg-meson.mk
> @@ -147,12 +147,12 @@ $(2)_CXXFLAGS ?= $$(TARGET_CXXFLAGS)
>   #
>   #
>   define $(2)_CONFIGURE_CMDS
> -	rm -rf $$($$(PKG)_SRCDIR)/build
> -	mkdir -p $$($$(PKG)_SRCDIR)/build
> +	rm -rf $$($$(PKG)_SRCDIR)/buildroot-build
> +	mkdir -p $$($$(PKG)_SRCDIR)/buildroot-build
>   	sed -e "/^\[binaries\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_BINARIES),\n$$(x)):" \
>   	    -e "/^\[properties\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_PROPERTIES),\n$$(x)):" \
>   	    $$(call PKG_MESON_CROSSCONFIG_SED,$(2)_CFLAGS,$(2)_CXXFLAGS,$(2)_LDFLAGS,$(2)_FCFLAGS) \
> -	    > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf
> +	    > $$($$(PKG)_SRCDIR)/buildroot-build/cross-compilation.conf
>   	PATH=$$(BR_PATH) \
>   	CC_FOR_BUILD="$$(HOSTCC)" \
>   	CXX_FOR_BUILD="$$(HOSTCXX)" \
> @@ -162,21 +162,21 @@ define $(2)_CONFIGURE_CMDS
>   		--libdir=lib \
>   		--default-library=$(PKG_MESON_DEFAULT_LIBRARY) \
>   		--buildtype=$(if $(BR2_ENABLE_RUNTIME_DEBUG),debug,release) \
> -		--cross-file=$$($$(PKG)_SRCDIR)/build/cross-compilation.conf \
> +		--cross-file=$$($$(PKG)_SRCDIR)/buildroot-build/cross-compilation.conf \
>   		-Db_pie=false \
>   		-Db_staticpic=$(if $(BR2_m68k_cf),false,true) \
>   		-Dstrip=false \
>   		-Dbuild.pkg_config_path=$$(HOST_DIR)/lib/pkgconfig \
>   		-Dbuild.cmake_prefix_path=$$(HOST_DIR)/lib/cmake \
>   		$$($$(PKG)_CONF_OPTS) \
> -		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/build
> +		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/buildroot-build
>   endef
>   else
>   
>   # Configure package for host
>   define $(2)_CONFIGURE_CMDS
> -	rm -rf $$($$(PKG)_SRCDIR)/build
> -	mkdir -p $$($$(PKG)_SRCDIR)/build
> +	rm -rf $$($$(PKG)_SRCDIR)/buildroot-build
> +	mkdir -p $$($$(PKG)_SRCDIR)/buildroot-build
>   	$$(HOST_CONFIGURE_OPTS) \
>   	$$($$(PKG)_CONF_ENV) $$(MESON) setup \
>   		--prefix=$$(HOST_DIR) \
> @@ -188,7 +188,7 @@ define $(2)_CONFIGURE_CMDS
>   		--wrap-mode=nodownload \
>   		-Dstrip=true \
>   		$$($$(PKG)_CONF_OPTS) \
> -		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/build
> +		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/buildroot-build
>   endef
>   endif
>   endif
> @@ -203,12 +203,12 @@ ifndef $(2)_BUILD_CMDS
>   ifeq ($(4),target)
>   define $(2)_BUILD_CMDS
>   	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
> -		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build
> +		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build
>   endef
>   else
>   define $(2)_BUILD_CMDS
>   	$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
> -		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build
> +		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build
>   endef
>   endif
>   endif
> @@ -220,7 +220,7 @@ endif
>   ifndef $(2)_INSTALL_CMDS
>   define $(2)_INSTALL_CMDS
>   	$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
> -		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build install
> +		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build install
>   endef
>   endif
>   
> @@ -231,7 +231,7 @@ endif
>   ifndef $(2)_INSTALL_STAGING_CMDS
>   define $(2)_INSTALL_STAGING_CMDS
>   	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(STAGING_DIR) \
> -		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build install
> +		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build install
>   endef
>   endif
>   
> @@ -242,7 +242,7 @@ endif
>   ifndef $(2)_INSTALL_TARGET_CMDS
>   define $(2)_INSTALL_TARGET_CMDS
>   	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(TARGET_DIR) \
> -		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build install
> +		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build install
>   endef
>   endif
>   

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2025-05-31 16:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-09 16:26 [Buildroot] [PATCH 1/2] package/pkg-meson: change build sub-dir name Cherniaev Andrei
2025-03-09 16:26 ` [Buildroot] [PATCH 2/2] package/libopenh264: switch to meson Cherniaev Andrei
2025-05-16  9:42   ` Peter Korsgaard
2025-05-16  9:41 ` [Buildroot] [PATCH 1/2] package/pkg-meson: change build sub-dir name Peter Korsgaard
2025-05-16 14:53   ` CHERNIAEV ANDREI
2025-05-31 16:47 ` Arnout Vandecappelle via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.