diff --git a/build/make/configure.sh b/build/make/configure.sh
index c07b049786e161066b376af768d648f908fa2960..ad7dc8256347cc88ea0449d1e14666b16a6d4783 100755
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -1284,8 +1284,8 @@ print_config_mk() {
     local makefile=$2
     shift 2
     for cfg; do
-        upname="`toupper $cfg`"
         if enabled $cfg; then
+            upname="`toupper $cfg`"
             echo "${prefix}_${upname}=yes" >> $makefile
         fi
     done