From: Gaël PORTAY Date: Thu, 22 Feb 2018 22:49:04 +0000 (-0500) Subject: pkgconf: pkg-config.in: double quote $@ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc526b428bb6f1e35ce9165f94e6f2fd306a37c7;p=buildroot.git pkgconf: pkg-config.in: double quote $@ The shell expands "$@" as "$1" "$2" "$3"... while it expands $@ as $1 $2 $3. With the second form, we loses spaces in positional parameters. As example, the following call pkg-config --cflags "one two" three is wrapped as pkgconf --cflags one two three while we are expecting pkgconf --cflags "one two" three "$@" is really useful when writing wrappers. It passes the positional arguments *as* they are given. Double quote $@ to prevent from splitting elements. Signed-off-by: Gaël PORTAY Signed-off-by: Thomas Petazzoni --- diff --git a/package/pkgconf/pkg-config.in b/package/pkgconf/pkg-config.in index b9ce0935cc..9387931ff2 100644 --- a/package/pkgconf/pkg-config.in +++ b/package/pkgconf/pkg-config.in @@ -2,4 +2,4 @@ PKGCONFDIR=$(dirname $0) DEFAULT_PKG_CONFIG_LIBDIR=${PKGCONFDIR}/../@STAGING_SUBDIR@/usr/lib/pkgconfig:${PKGCONFDIR}/../@STAGING_SUBDIR@/usr/share/pkgconfig DEFAULT_PKG_CONFIG_SYSROOT_DIR=${PKGCONFDIR}/../@STAGING_SUBDIR@ -PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-${DEFAULT_PKG_CONFIG_LIBDIR}} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-${DEFAULT_PKG_CONFIG_SYSROOT_DIR}} ${PKGCONFDIR}/pkgconf @STATIC@ $@ +PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-${DEFAULT_PKG_CONFIG_LIBDIR}} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-${DEFAULT_PKG_CONFIG_SYSROOT_DIR}} ${PKGCONFDIR}/pkgconf @STATIC@ "$@"