build: rename DEVICES to GLUON_DEVICES (#1686)

This commit is contained in:
bobcanthelpyou 2019-04-12 01:05:04 +02:00 committed by Andreas Ziegler
parent 078184a59c
commit 2c4f022994
5 changed files with 12 additions and 6 deletions

View File

@ -27,7 +27,7 @@ $(eval $(call mkabspath,GLUON_OUTPUTDIR))
$(eval $(call mkabspath,GLUON_IMAGEDIR))
$(eval $(call mkabspath,GLUON_PACKAGEDIR))
export GLUON_TMPDIR GLUON_IMAGEDIR GLUON_PACKAGEDIR DEVICES
export GLUON_TMPDIR GLUON_IMAGEDIR GLUON_PACKAGEDIR GLUON_DEVICES
$(GLUON_SITEDIR)/site.mk:

View File

@ -186,6 +186,12 @@ GLUON_TARGET
Special variables
.................
GLUON_DEVICES
List of devices to build. The list contains the Gluon profile name of a device, the profile
name is the first parameter of the ``device`` command in a target file.
e.g. ``GLUON_DEVICES="avm-fritz-box-4020 tp-link-tl-wdr4300-v1"``.
Empty by default to build all devices of a target.
GLUON_IMAGEDIR
Path where images will be stored. Defaults to ``$(GLUON_OUTPUTDIR)/images``.

View File

@ -17,4 +17,4 @@ fi
rm -f "openwrt/bin/targets/${OPENWRT_BINDIR}"/* 2>/dev/null || true
# Full builds will output the "packages" directory, so clean up first
[ "$DEVICES" ] || rm -rf "openwrt/bin/targets/${OPENWRT_BINDIR}/packages"
[ "$GLUON_DEVICES" ] || rm -rf "openwrt/bin/targets/${OPENWRT_BINDIR}/packages"

View File

@ -47,10 +47,10 @@ no_opkg() {
}
unknown_devices="$DEVICES"
unknown_devices="$GLUON_DEVICES"
want_device() {
[ "$DEVICES" ] || return 0
[ "$GLUON_DEVICES" ] || return 0
local new_devices=''
@ -61,7 +61,7 @@ want_device() {
done
unknown_devices=$new_devices
for device in $DEVICES; do
for device in $GLUON_DEVICES; do
if [ "$device" = "$1" ]; then
return 0
fi

View File

@ -194,7 +194,7 @@ no_opkg() {
. targets/"$1"; copy
# Copy opkg repo
if [ -z "$no_opkg" -a -z "$DEVICES" ]; then
if [ -z "$no_opkg" -a -z "$GLUON_DEVICES" ]; then
rm -f "$GLUON_PACKAGEDIR"/*/"$OPENWRT_BINDIR"/*
rmdir -p "$GLUON_PACKAGEDIR"/*/"$OPENWRT_BINDIR" 2>/dev/null || true
mkdir -p "${GLUON_PACKAGEDIR}/${PACKAGE_PREFIX}/${OPENWRT_BINDIR}"