Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/pkg-meson: use --clearcache instead of rm -rf
@ 2024-11-04  7:45 Cherniaev Andrei
  2024-11-04 11:30 ` Nicolas Cavallari
  0 siblings, 1 reply; 3+ messages in thread
From: Cherniaev Andrei @ 2024-11-04  7:45 UTC (permalink / raw)
  To: buildroot; +Cc: Eric Le Bihan, Cherniaev Andrei

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

Signed-off-by: Cherniaev Andrei <dungeonlords789@naver.com>
---
 package/pkg-meson.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
index bc805b799c..2ddf0a95eb 100644
--- a/package/pkg-meson.mk
+++ b/package/pkg-meson.mk
@@ -147,7 +147,6 @@ $(2)_CXXFLAGS ?= $$(TARGET_CXXFLAGS)
 #
 #
 define $(2)_CONFIGURE_CMDS
-	rm -rf $$($$(PKG)_SRCDIR)/build
 	mkdir -p $$($$(PKG)_SRCDIR)/build
 	sed -e "/^\[binaries\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_BINARIES),\n$$(x)):" \
 	    -e "/^\[properties\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_PROPERTIES),\n$$(x)):" \
@@ -163,6 +162,7 @@ define $(2)_CONFIGURE_CMDS
 		--default-library=$(PKG_MESON_DEFAULT_LIBRARY) \
 		--buildtype=$(if $(BR2_ENABLE_RUNTIME_DEBUG),debug,release) \
 		--cross-file=$$($$(PKG)_SRCDIR)/build/cross-compilation.conf \
+		--clearcache \
 		-Db_pie=false \
 		-Db_staticpic=$(if $(BR2_m68k_cf),false,true) \
 		-Dstrip=false \
@@ -175,7 +175,6 @@ else
 
 # Configure package for host
 define $(2)_CONFIGURE_CMDS
-	rm -rf $$($$(PKG)_SRCDIR)/build
 	mkdir -p $$($$(PKG)_SRCDIR)/build
 	$$(HOST_CONFIGURE_OPTS) \
 	$$($$(PKG)_CONF_ENV) $$(MESON) setup \
@@ -186,6 +185,7 @@ define $(2)_CONFIGURE_CMDS
 		--default-library=shared \
 		--buildtype=release \
 		--wrap-mode=nodownload \
+		--clearcache \
 		-Dstrip=true \
 		$$($$(PKG)_CONF_OPTS) \
 		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/build
-- 
2.43.0

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

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

end of thread, other threads:[~2024-11-04 16:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-04  7:45 [Buildroot] [PATCH 1/1] package/pkg-meson: use --clearcache instead of rm -rf Cherniaev Andrei
2024-11-04 11:30 ` Nicolas Cavallari
2024-11-04 16:19   ` Thomas Petazzoni via buildroot

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