[09/12] configure: Move pushvar/popvar to a more sensible place

Message ID 20180417081638.3639-10-diego@biurrun.de
State New
Headers show
Series
  • [01/12] build: Group external library protocols separately
Related show

Commit Message

Diego Biurrun April 17, 2018, 8:16 a.m.
---
 configure | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

Patch

diff --git a/configure b/configure
index 77601c8b02..48d2a8497b 100755
--- a/configure
+++ b/configure
@@ -485,25 +485,6 @@  get_sanitized(){
     eval echo \$$(sanitize_var_name "$1")
 }
 
-pushvar(){
-    for pvar in $*; do
-        eval level=\${${pvar}_level:=0}
-        eval ${pvar}_${level}="\$$pvar"
-        eval ${pvar}_level=$(($level+1))
-    done
-}
-
-popvar(){
-    for pvar in $*; do
-        eval level=\${${pvar}_level:-0}
-        test $level = 0 && continue
-        eval level=$(($level-1))
-        eval $pvar="\${${pvar}_${level}}"
-        eval ${pvar}_level=$level
-        eval unset ${pvar}_${level}
-    done
-}
-
 enable(){
     set_all yes $*
 }
@@ -532,6 +513,25 @@  disable_sanitized(){
     done
 }
 
+pushvar(){
+    for pvar in $*; do
+        eval level=\${${pvar}_level:=0}
+        eval ${pvar}_${level}="\$$pvar"
+        eval ${pvar}_level=$(($level+1))
+    done
+}
+
+popvar(){
+    for pvar in $*; do
+        eval level=\${${pvar}_level:-0}
+        test $level = 0 && continue
+        eval level=$(($level-1))
+        eval $pvar="\${${pvar}_${level}}"
+        eval ${pvar}_level=$level
+        eval unset ${pvar}_${level}
+    done
+}
+
 do_enable_deep(){
     for var; do
         enabled $var && continue