diff --git a/Makefile b/Makefile
index 22f3eba4d66e50dd53ae025e19e06e08a1953ee9..ab363f3b2620442e719343669568b1eb0eed3724 100644
--- a/Makefile
+++ b/Makefile
@@ -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:
diff --git a/docs/user/getting_started.rst b/docs/user/getting_started.rst
index ba1bf0be162a3eeb36baaeb64986d4a501c45d77..466094e0bfb8b388be9e301a1de44f81cf37f12f 100644
--- a/docs/user/getting_started.rst
+++ b/docs/user/getting_started.rst
@@ -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``.
 
diff --git a/scripts/clean_output.sh b/scripts/clean_output.sh
index 1b025fdd7e00fca5245ff8b1110bd1f3bf60123f..c71fc86aca7084f43695f2261e26dd3eeb228343 100755
--- a/scripts/clean_output.sh
+++ b/scripts/clean_output.sh
@@ -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"
diff --git a/scripts/common.inc.sh b/scripts/common.inc.sh
index ea09c70d747e9959930d33ea7ec01b1f90cda0b8..c3ad5670edac63b78065b01bacbd68cb62f51e07 100644
--- a/scripts/common.inc.sh
+++ b/scripts/common.inc.sh
@@ -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
diff --git a/scripts/copy_output.sh b/scripts/copy_output.sh
index 3454e6e3748a43b7df5e884804389ed3192d76bd..d84d5fe2c6fd0009bf8e371dae898317ec20bf29 100755
--- a/scripts/copy_output.sh
+++ b/scripts/copy_output.sh
@@ -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}"