[Buildroot] [PATCH v7 07/18] package/pkgconf: make the pkg-config wrapper relocatable

Peter Korsgaard peter at korsgaard.com
Thu Mar 10 21:33:26 UTC 2016


>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at free-electrons.com> writes:

 >> +STAGING_DIR="$(readlink -f "$(dirname "$0")/../..")/@STAGING_SUBDIR@"

 > I think Peter said on IRC that $0 is not guaranteed to be correct, and
 > that /proc/self/exe should be used instead.

Yes (and that is generally true), but as far as I can see it is
guaranteed for scripts on Linux by the logic in binfmt-script.c


 >> +TARGET_PKG_CONFIG_LIBDIR="$( echo @PKG_CONFIG_LIBDIR@ | sed -e
 >> "s@^@${STAGING_DIR}/@ ; s@:@:${STAGING_DIR}/@g" )"

 > I must say I hate those spaces after ( and before ). Especially when
 > the line just above doesn't have those spaces.

Consistency would be good, yes!

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list