shithub: libvpx

Download patch

ref: 74a61b5ab9167f26fe21d3f328636309985d098e
parent: bdeb5febe43f8706a7c440d4ef696849a17ea71e
author: Johann <[email protected]>
date: Thu Jun 23 08:29:04 EDT 2016

configure: clean up var style and set_all usage

Use quotes whenever possible and {} always for variables.

Replace multiple set_all calls with *able_feature().

Change-Id: If579d3f718bd4133cf1592b4554a8ed00cf9f2d3

--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -186,24 +186,6 @@
 # Boolean Manipulation Functions
 #
 
-enable_codec(){
-  enabled $1 || echo "  enabling $1"
-  set_all yes $1
-
-  is_in $1 vp8 vp9 && \
-    set_all yes $1_encoder && \
-    set_all yes $1_decoder
-}
-
-disable_codec(){
-  disabled $1 || echo "  disabling $1"
-  set_all no $1
-
-  is_in $1 vp8 vp9 && \
-    set_all no $1_encoder && \
-    set_all no $1_decoder
-}
-
 enable_feature(){
   set_all yes $*
 }
@@ -218,6 +200,20 @@
 
 disabled(){
   eval test "x\$$1" = "xno"
+}
+
+enable_codec(){
+  enabled "${1}" || echo "  enabling ${1}"
+  enable_feature "${1}"
+
+  is_in "${1}" vp8 vp9 && enable_feature "${1}_encoder" "${1}_decoder"
+}
+
+disable_codec(){
+  disabled "${1}" || echo "  disabling ${1}"
+  disable_feature "${1}"
+
+  is_in "${1}" vp8 vp9 && disable_feature "${1}_encoder" "${1}_decoder"
 }
 
 # Iterates through positional parameters, checks to confirm the parameter has