@@ -220,10 +220,13 @@ endif
ifndef $(2)_INSTALL_CMDS
define $(2)_INSTALL_CMDS
$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
- $$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build install
+ $$(MESON) install -C $$($$(PKG)_SRCDIR)/build
endef
endif
+# Default values for Staging installation and Target installation
+$(2)_MESON_INSTALL_TAGS ?= NO
+
#
# Staging installation step. Only define it if not already defined by
# the package .mk file.
@@ -231,7 +234,8 @@ 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
+ $$(MESON) install -C \
+ $$($$(PKG)_SRCDIR)/build $(if $(filter YES,$($(2)_MESON_INSTALL_TAGS)),--tags=runtime$(comma)devel)
endef
endif
@@ -242,7 +246,8 @@ 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
+ $$(MESON) install -C \
+ $$($$(PKG)_SRCDIR)/build $(if $(filter YES,$($(2)_MESON_INSTALL_TAGS)),--tags=runtime)
endef
endif
Many packages built with Buildroot and meson currently install header files into both: - the target’s /usr/include, and - the sysroot’s /usr/include. When FOO_MESON_INSTALL_TAGS = YES, ensure that header files are installed exclusively in the staging (sysroot) target during the build process. The default is FOO_MESON_INSTALL_TAGS ?= NO in order to avoid changing to this new behaviour for the time being. Signed-off-by: Vincent Jardin <vjardin@free.fr> Suggested-by: Robin Jarry <robin@jarry.cc> Suggested-by: Brandon Maier <brandon.maier@gmail.com> --- package/pkg-meson.mk | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)