diff options
author | Johann <johannkoenig@google.com> | 2016-06-23 12:29:04 -0700 |
---|---|---|
committer | Johann Koenig <johannkoenig@google.com> | 2016-06-23 22:15:13 +0000 |
commit | 74a61b5ab9167f26fe21d3f328636309985d098e (patch) | |
tree | fa5798d9379fd27bf9a633859f766f76e78af804 /build/make/configure.sh | |
parent | bdeb5febe43f8706a7c440d4ef696849a17ea71e (diff) | |
download | libvpx-74a61b5ab9167f26fe21d3f328636309985d098e.tar libvpx-74a61b5ab9167f26fe21d3f328636309985d098e.tar.gz libvpx-74a61b5ab9167f26fe21d3f328636309985d098e.tar.bz2 libvpx-74a61b5ab9167f26fe21d3f328636309985d098e.zip |
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
Diffstat (limited to 'build/make/configure.sh')
-rw-r--r-- | build/make/configure.sh | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/build/make/configure.sh b/build/make/configure.sh index f8383da27..4f0071bb5 100644 --- a/build/make/configure.sh +++ b/build/make/configure.sh @@ -186,24 +186,6 @@ add_extralibs() { # 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 $* } @@ -220,6 +202,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 # not been explicitly (force) disabled, and enables the setting controlled by # the parameter when the setting is not disabled. |