$(2)_LDFLAGS ?= $$(TARGET_LDFLAGS)
$(2)_CXXFLAGS ?= $$(TARGET_CXXFLAGS)
-$(2)_MESON_SED_CFLAGS = $$(if $$(strip $$($(2)_CFLAGS)),`printf '"%s"$$(comma) ' $$($(2)_CFLAGS)`)
-$(2)_MESON_SED_LDFLAGS = $$(if $$(strip $$($(2)_LDFLAGS)),`printf '"%s"$$(comma) ' $$($(2)_LDFLAGS)`)
-$(2)_MESON_SED_CXXFLAGS = $$(if $$(strip $$($(2)_CXXFLAGS)),`printf '"%s"$$(comma) ' $$($(2)_CXXFLAGS)`)
-
# Configure package for target
#
#
define $(2)_CONFIGURE_CMDS
rm -rf $$($$(PKG)_SRCDIR)/build
mkdir -p $$($$(PKG)_SRCDIR)/build
- sed -e "s%@TARGET_CROSS@%$$(TARGET_CROSS)%g" \
- -e "s%@TARGET_ARCH@%$$(HOST_MESON_TARGET_CPU_FAMILY)%g" \
- -e "s%@TARGET_CPU@%$$(GCC_TARGET_CPU)%g" \
- -e "s%@TARGET_ENDIAN@%$$(call LOWERCASE,$$(BR2_ENDIAN))%g" \
- -e "s%@TARGET_CFLAGS@%$$($(2)_MESON_SED_CFLAGS)%g" \
- -e "s%@TARGET_LDFLAGS@%$$($(2)_MESON_SED_LDFLAGS)%g" \
- -e "s%@TARGET_CXXFLAGS@%$$($(2)_MESON_SED_CXXFLAGS)%g" \
- -e "s%@HOST_DIR@%$$(HOST_DIR)%g" \
+ sed -e 's%@TARGET_CROSS@%$$(TARGET_CROSS)%g' \
+ -e 's%@TARGET_ARCH@%$$(HOST_MESON_TARGET_CPU_FAMILY)%g' \
+ -e 's%@TARGET_CPU@%$$(GCC_TARGET_CPU)%g' \
+ -e 's%@TARGET_ENDIAN@%$$(call LOWERCASE,$$(BR2_ENDIAN))%g' \
+ -e 's%@TARGET_CFLAGS@%$$(call make-comma-list,$$($(2)_CFLAGS))%g' \
+ -e 's%@TARGET_LDFLAGS@%$$(call make-comma-list,$$($(2)_LDFLAGS))%g' \
+ -e 's%@TARGET_CXXFLAGS@%$$(call make-comma-list,$$($(2)_CXXFLAGS))%g' \
+ -e 's%@HOST_DIR@%$$(HOST_DIR)%g' \
$$(foreach x,$$($(2)_MESON_EXTRA_BINARIES), \
-e "/^\[binaries\]$$$$/s:$$$$:\n$$(x):" \
) \
# own flags if they need to.
define PKG_MESON_INSTALL_CROSS_CONF
mkdir -p $(HOST_DIR)/etc/meson
- sed -e "s%@TARGET_CROSS@%$(TARGET_CROSS)%g" \
- -e "s%@TARGET_ARCH@%$(HOST_MESON_TARGET_CPU_FAMILY)%g" \
- -e "s%@TARGET_CPU@%$(HOST_MESON_TARGET_CPU)%g" \
- -e "s%@TARGET_ENDIAN@%$(HOST_MESON_TARGET_ENDIAN)%g" \
- -e "s%@TARGET_CFLAGS@%$(HOST_MESON_SED_CFLAGS)@PKG_TARGET_CFLAGS@%g" \
- -e "s%@TARGET_LDFLAGS@%$(HOST_MESON_SED_LDFLAGS)@PKG_TARGET_CFLAGS@%g" \
- -e "s%@TARGET_CXXFLAGS@%$(HOST_MESON_SED_CXXFLAGS)@PKG_TARGET_CFLAGS@%g" \
- -e "s%@HOST_DIR@%$(HOST_DIR)%g" \
+ sed -e 's%@TARGET_CROSS@%$(TARGET_CROSS)%g' \
+ -e 's%@TARGET_ARCH@%$(HOST_MESON_TARGET_CPU_FAMILY)%g' \
+ -e 's%@TARGET_CPU@%$(HOST_MESON_TARGET_CPU)%g' \
+ -e 's%@TARGET_ENDIAN@%$(HOST_MESON_TARGET_ENDIAN)%g' \
+ -e 's%@TARGET_CFLAGS@%$(call make-comma-list,$(TARGET_CFLAGS))@PKG_TARGET_CFLAGS@%g' \
+ -e 's%@TARGET_LDFLAGS@%$(call make-comma-list,$(TARGET_LDFLAGS))@PKG_TARGET_CFLAGS@%g' \
+ -e 's%@TARGET_CXXFLAGS@%$(call make-comma-list,$(TARGET_CXXFLAGS))@PKG_TARGET_CFLAGS@%g' \
+ -e 's%@HOST_DIR@%$(HOST_DIR)%g' \
$(HOST_MESON_PKGDIR)/cross-compilation.conf.in \
> $(HOST_DIR)/etc/meson/cross-compilation.conf.in
- sed -e "s%@PKG_TARGET_CFLAGS@%%g" \
- -e "s%@PKG_TARGET_LDFLAGS@%%g" \
- -e "s%@PKG_TARGET_CXXFLAGS@%%g" \
+ sed -e 's%@PKG_TARGET_CFLAGS@%%g' \
+ -e 's%@PKG_TARGET_LDFLAGS@%%g' \
+ -e 's%@PKG_TARGET_CXXFLAGS@%%g' \
$(HOST_DIR)/etc/meson/cross-compilation.conf.in \
> $(HOST_DIR)/etc/meson/cross-compilation.conf
endef