mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 08:30:47 -09:00
package/pkg-meson: use buildroot-build for build directory
Fixes https://gitlab.com/buildroot.org/buildroot/-/issues/64 Some source tarballs (E.G. libopenh264) may already contain a build/ subdir, so switch to the more unique bildroot-build for the build directory, similar to how it is done for cmake. Signed-off-by: Cherniaev Andrei <dungeonlords789@naver.com> Co-Authored-By: Thomas Petazzoni <thomas.petazzoni@bootlin.com> [Peter: reword commit text] Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
211e822d43
commit
4e95062f82
@@ -147,12 +147,12 @@ $(2)_CXXFLAGS ?= $$(TARGET_CXXFLAGS)
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
define $(2)_CONFIGURE_CMDS
|
define $(2)_CONFIGURE_CMDS
|
||||||
rm -rf $$($$(PKG)_SRCDIR)/build
|
rm -rf $$($$(PKG)_SRCDIR)/buildroot-build
|
||||||
mkdir -p $$($$(PKG)_SRCDIR)/build
|
mkdir -p $$($$(PKG)_SRCDIR)/buildroot-build
|
||||||
sed -e "/^\[binaries\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_BINARIES),\n$$(x)):" \
|
sed -e "/^\[binaries\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_BINARIES),\n$$(x)):" \
|
||||||
-e "/^\[properties\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_PROPERTIES),\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) \
|
$$(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) \
|
PATH=$$(BR_PATH) \
|
||||||
CC_FOR_BUILD="$$(HOSTCC)" \
|
CC_FOR_BUILD="$$(HOSTCC)" \
|
||||||
CXX_FOR_BUILD="$$(HOSTCXX)" \
|
CXX_FOR_BUILD="$$(HOSTCXX)" \
|
||||||
@@ -162,21 +162,21 @@ define $(2)_CONFIGURE_CMDS
|
|||||||
--libdir=lib \
|
--libdir=lib \
|
||||||
--default-library=$(PKG_MESON_DEFAULT_LIBRARY) \
|
--default-library=$(PKG_MESON_DEFAULT_LIBRARY) \
|
||||||
--buildtype=$(if $(BR2_ENABLE_RUNTIME_DEBUG),debug,release) \
|
--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_pie=false \
|
||||||
-Db_staticpic=$(if $(BR2_m68k_cf),false,true) \
|
-Db_staticpic=$(if $(BR2_m68k_cf),false,true) \
|
||||||
-Dstrip=false \
|
-Dstrip=false \
|
||||||
-Dbuild.pkg_config_path=$$(HOST_DIR)/lib/pkgconfig \
|
-Dbuild.pkg_config_path=$$(HOST_DIR)/lib/pkgconfig \
|
||||||
-Dbuild.cmake_prefix_path=$$(HOST_DIR)/lib/cmake \
|
-Dbuild.cmake_prefix_path=$$(HOST_DIR)/lib/cmake \
|
||||||
$$($$(PKG)_CONF_OPTS) \
|
$$($$(PKG)_CONF_OPTS) \
|
||||||
$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/build
|
$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/buildroot-build
|
||||||
endef
|
endef
|
||||||
else
|
else
|
||||||
|
|
||||||
# Configure package for host
|
# Configure package for host
|
||||||
define $(2)_CONFIGURE_CMDS
|
define $(2)_CONFIGURE_CMDS
|
||||||
rm -rf $$($$(PKG)_SRCDIR)/build
|
rm -rf $$($$(PKG)_SRCDIR)/buildroot-build
|
||||||
mkdir -p $$($$(PKG)_SRCDIR)/build
|
mkdir -p $$($$(PKG)_SRCDIR)/buildroot-build
|
||||||
$$(HOST_CONFIGURE_OPTS) \
|
$$(HOST_CONFIGURE_OPTS) \
|
||||||
$$($$(PKG)_CONF_ENV) $$(MESON) setup \
|
$$($$(PKG)_CONF_ENV) $$(MESON) setup \
|
||||||
--prefix=$$(HOST_DIR) \
|
--prefix=$$(HOST_DIR) \
|
||||||
@@ -188,7 +188,7 @@ define $(2)_CONFIGURE_CMDS
|
|||||||
--wrap-mode=nodownload \
|
--wrap-mode=nodownload \
|
||||||
-Dstrip=true \
|
-Dstrip=true \
|
||||||
$$($$(PKG)_CONF_OPTS) \
|
$$($$(PKG)_CONF_OPTS) \
|
||||||
$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/build
|
$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/buildroot-build
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -203,12 +203,12 @@ ifndef $(2)_BUILD_CMDS
|
|||||||
ifeq ($(4),target)
|
ifeq ($(4),target)
|
||||||
define $(2)_BUILD_CMDS
|
define $(2)_BUILD_CMDS
|
||||||
$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
|
$$(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
|
endef
|
||||||
else
|
else
|
||||||
define $(2)_BUILD_CMDS
|
define $(2)_BUILD_CMDS
|
||||||
$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
|
$$(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
|
endef
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@@ -220,7 +220,7 @@ endif
|
|||||||
ifndef $(2)_INSTALL_CMDS
|
ifndef $(2)_INSTALL_CMDS
|
||||||
define $(2)_INSTALL_CMDS
|
define $(2)_INSTALL_CMDS
|
||||||
$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
|
$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
|
||||||
$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build install
|
$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/buildroot-build install
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ endif
|
|||||||
ifndef $(2)_INSTALL_STAGING_CMDS
|
ifndef $(2)_INSTALL_STAGING_CMDS
|
||||||
define $(2)_INSTALL_STAGING_CMDS
|
define $(2)_INSTALL_STAGING_CMDS
|
||||||
$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(STAGING_DIR) \
|
$$(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
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -242,7 +242,7 @@ endif
|
|||||||
ifndef $(2)_INSTALL_TARGET_CMDS
|
ifndef $(2)_INSTALL_TARGET_CMDS
|
||||||
define $(2)_INSTALL_TARGET_CMDS
|
define $(2)_INSTALL_TARGET_CMDS
|
||||||
$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) DESTDIR=$$(TARGET_DIR) \
|
$$(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
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user