]> xenbits.xensource.com Git - osstest/rumprun.git/commitdiff
rumprun-bake: _uniq only just-in-time
authorAntti Kantee <pooka@iki.fi>
Sat, 14 Nov 2015 20:27:07 +0000 (20:27 +0000)
committerAntti Kantee <pooka@iki.fi>
Sat, 14 Nov 2015 20:27:07 +0000 (20:27 +0000)
It's not *that* difficult, and it's way faster.

app-tools/rumprun-bake.in

index f763c749be744f355e207d6b69fa11bac04f4961..0cb662f350ca7b5d1b4a7c2ab7ec866846558ab7 100644 (file)
@@ -198,6 +198,7 @@ debugdump ()
 
        _haveconf ${confname}
 
+       _uniq CONFIG_${confname}
        eval echo \${CONFIG_${confname}}
 }
 
@@ -246,16 +247,8 @@ _readconfig ()
        unset CURCONF
 
        # Publish configs which are not private
-       # Note: technically we need to _uniq configs only when they are
-       # used, but this is easier and less error-prone.  Consider
-       # just-in-time an ace up our sleeve for when config processing
-       # really gets too slow.
        for x in ${ALLCONFIGS}; do
-               if [ "${x#_}" = "${x}" ]; then
-                       _uniq CONFIG_${x}
-               else
-                       _filter ${x} ALLCONFIGS
-               fi
+               [ "${x#_}" = "${x}" ] || _filter ${x} ALLCONFIGS
        done
 }
 
@@ -353,6 +346,8 @@ if [ "$c" != "$config" ]; then
        exit 1
 fi
 
+_uniq CONFIG_${config}
+
 PLATFORM=${config%%_*}
 eval LIBS="\${CONFIG_${config}}"