buildsystem: remove grep from PKG_ARCH check

More efficient, slightly more functional.

Can be a space delimited list of architectures.

Architectures to be excluded can be specified with !ARCH.

Allows "any !arm" to be interpreted as "any arch, but not arm".

Blank/undefined is equivalent to "any".
This commit is contained in:
MilhouseVH
2017-10-29 12:01:52 +01:00
committed by Sascha Kuehndel (InuSasha)
parent 430f6e33a0
commit e0b833c782
4 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -46,9 +46,9 @@ mkdir -p $STAMPS_INSTALL/$PACKAGE_NAME
[ -f $STAMP ] && exit 0
if [ -n "$PKG_ARCH" -a ! "$PKG_ARCH" = "any" ]; then
echo "$PKG_ARCH" | grep -q "$TARGET_ARCH" || exit 0
echo "$PKG_ARCH" | grep -q "\-$TARGET_ARCH" && exit 0
if [ -n "$PKG_ARCH" ]; then
listcontains "$PKG_ARCH" "!$TARGET_ARCH" && exit 0
listcontains "$PKG_ARCH" "$TARGET_ARCH" || listcontains "$PKG_ARCH" "any" || exit 0
fi
if [ ! -f $PKG_DIR/package.mk ]; then