Indent build/make/configure.sh

Whitespace changes only.

Change-Id: I92eef49db1798bc69ec003fca69995fea560d6fa
This commit is contained in:
Johann 2014-11-20 18:20:06 -08:00
parent 130b151e09
commit 7efb302af9

View File

@ -20,7 +20,6 @@ die_unknown(){
exit 1 exit 1
} }
die() { die() {
echo "$@" echo "$@"
echo echo
@ -33,32 +32,27 @@ die() {
exit 1 exit 1
} }
log(){ log(){
echo "$@" >>$logfile echo "$@" >>$logfile
} }
log_file(){ log_file(){
log BEGIN $1 log BEGIN $1
cat -n $1 >>$logfile cat -n $1 >>$logfile
log END $1 log END $1
} }
log_echo() { log_echo() {
echo "$@" echo "$@"
log "$@" log "$@"
} }
fwrite () { fwrite () {
outfile=$1 outfile=$1
shift shift
echo "$@" >> ${outfile} echo "$@" >> ${outfile}
} }
show_help_pre(){ show_help_pre(){
for opt in ${CMDLINE_SELECT}; do for opt in ${CMDLINE_SELECT}; do
opt2=`echo $opt | sed -e 's;_;-;g'` opt2=`echo $opt | sed -e 's;_;-;g'`
@ -100,7 +94,6 @@ Install options:
EOF EOF
} }
show_help_post(){ show_help_post(){
cat <<EOF cat <<EOF
@ -119,7 +112,6 @@ EOF
exit 1 exit 1
} }
show_targets() { show_targets() {
while [ -n "$*" ]; do while [ -n "$*" ]; do
if [ "${1%%-*}" = "${2%%-*}" ]; then if [ "${1%%-*}" = "${2%%-*}" ]; then
@ -137,7 +129,6 @@ show_targets() {
done done
} }
show_help() { show_help() {
show_help_pre show_help_pre
show_help_post show_help_post
@ -154,7 +145,6 @@ set_all(){
done done
} }
is_in(){ is_in(){
value=$1 value=$1
shift shift
@ -164,33 +154,27 @@ is_in(){
return 1 return 1
} }
add_cflags() { add_cflags() {
CFLAGS="${CFLAGS} $@" CFLAGS="${CFLAGS} $@"
CXXFLAGS="${CXXFLAGS} $@" CXXFLAGS="${CXXFLAGS} $@"
} }
add_cflags_only() { add_cflags_only() {
CFLAGS="${CFLAGS} $@" CFLAGS="${CFLAGS} $@"
} }
add_cxxflags_only() { add_cxxflags_only() {
CXXFLAGS="${CXXFLAGS} $@" CXXFLAGS="${CXXFLAGS} $@"
} }
add_ldflags() { add_ldflags() {
LDFLAGS="${LDFLAGS} $@" LDFLAGS="${LDFLAGS} $@"
} }
add_asflags() { add_asflags() {
ASFLAGS="${ASFLAGS} $@" ASFLAGS="${ASFLAGS} $@"
} }
add_extralibs() { add_extralibs() {
extralibs="${extralibs} $@" extralibs="${extralibs} $@"
} }
@ -214,7 +198,6 @@ disabled(){
eval test "x\$$1" = "xno" eval test "x\$$1" = "xno"
} }
soft_enable() { soft_enable() {
for var in $*; do for var in $*; do
if ! disabled $var; then if ! disabled $var; then
@ -233,7 +216,6 @@ soft_disable() {
done done
} }
# #
# Text Processing Functions # Text Processing Functions
# #
@ -241,12 +223,10 @@ toupper(){
echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
} }
tolower(){ tolower(){
echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
} }
# #
# Temporary File Functions # Temporary File Functions
# #
@ -325,7 +305,6 @@ int x;
EOF EOF
} }
check_cflags() { check_cflags() {
log check_cflags "$@" log check_cflags "$@"
check_cc -Werror "$@" <<EOF check_cc -Werror "$@" <<EOF
@ -338,11 +317,13 @@ check_cxxflags() {
# Catch CFLAGS that trigger CXX warnings # Catch CFLAGS that trigger CXX warnings
case "$CXX" in case "$CXX" in
*c++-analyzer|*clang++|*g++*) check_cxx -Werror "$@" <<EOF *c++-analyzer|*clang++|*g++*)
check_cxx -Werror "$@" <<EOF
int x; int x;
EOF EOF
;; ;;
*) check_cxx -Werror "$@" <<EOF *)
check_cxx -Werror "$@" <<EOF
int x; int x;
EOF EOF
;; ;;
@ -474,7 +455,6 @@ EOF
CXX="${saved_CXX}" CXX="${saved_CXX}"
} }
write_common_target_config_h() { write_common_target_config_h() {
print_webm_license ${TMP_H} "/*" " */" print_webm_license ${TMP_H} "/*" " */"
cat >> ${TMP_H} << EOF cat >> ${TMP_H} << EOF
@ -497,7 +477,8 @@ process_common_cmdline() {
for opt in "$@"; do for opt in "$@"; do
optval="${opt#*=}" optval="${opt#*=}"
case "$opt" in case "$opt" in
--child) enable_feature child --child)
enable_feature child
;; ;;
--log*) --log*)
logging="$optval" logging="$optval"
@ -507,13 +488,17 @@ process_common_cmdline() {
logfile=/dev/null logfile=/dev/null
fi fi
;; ;;
--target=*) toolchain="${toolchain:-${optval}}" --target=*)
toolchain="${toolchain:-${optval}}"
;; ;;
--force-target=*) toolchain="${toolchain:-${optval}}"; enable_feature force_toolchain --force-target=*)
toolchain="${toolchain:-${optval}}"
enable_feature force_toolchain
;; ;;
--cpu) --cpu)
;; ;;
--cpu=*) tune_cpu="$optval" --cpu=*)
tune_cpu="$optval"
;; ;;
--extra-cflags=*) --extra-cflags=*)
extra_cflags="${optval}" extra_cflags="${optval}"
@ -576,9 +561,11 @@ process_common_cmdline() {
--libc|--as|--prefix|--libdir|--sdk-path) --libc|--as|--prefix|--libdir|--sdk-path)
die "Option ${opt} requires argument" die "Option ${opt} requires argument"
;; ;;
--help|-h) show_help --help|-h)
show_help
;; ;;
*) die_unknown $opt *)
die_unknown $opt
;; ;;
esac esac
done done
@ -588,13 +575,13 @@ process_cmdline() {
for opt do for opt do
optval="${opt#*=}" optval="${opt#*=}"
case "$opt" in case "$opt" in
*) process_common_cmdline $opt *)
process_common_cmdline $opt
;; ;;
esac esac
done done
} }
post_process_common_cmdline() { post_process_common_cmdline() {
prefix="${prefix:-/usr/local}" prefix="${prefix:-/usr/local}"
prefix="${prefix%/}" prefix="${prefix%/}"
@ -605,7 +592,6 @@ post_process_common_cmdline() {
fi fi
} }
post_process_cmdline() { post_process_cmdline() {
true; true;
} }
@ -726,8 +712,12 @@ process_common_toolchain() {
# Enable the architecture family # Enable the architecture family
case ${tgt_isa} in case ${tgt_isa} in
arm*) enable_feature arm;; arm*)
mips*) enable_feature mips;; enable_feature arm
;;
mips*)
enable_feature mips
;;
esac esac
# PIC is probably what we want when building shared libs # PIC is probably what we want when building shared libs
@ -849,8 +839,7 @@ EOF
check_add_cflags -march=armv7-a -mfloat-abi=${float_abi} check_add_cflags -march=armv7-a -mfloat-abi=${float_abi}
check_add_asflags -march=armv7-a -mfloat-abi=${float_abi} check_add_asflags -march=armv7-a -mfloat-abi=${float_abi}
if enabled neon || enabled neon_asm if enabled neon || enabled neon_asm; then
then
check_add_cflags -mfpu=neon #-ftree-vectorize check_add_cflags -mfpu=neon #-ftree-vectorize
check_add_asflags -mfpu=neon check_add_asflags -mfpu=neon
fi fi
@ -1032,7 +1021,6 @@ EOF
enabled shared && add_cflags --shared enabled shared && add_cflags --shared
fi fi
;; ;;
esac esac
;; ;;
mips*) mips*)
@ -1209,7 +1197,8 @@ EOF
enabled debug && add_asflags -g enabled debug && add_asflags -g
EXE_SFX=.exe EXE_SFX=.exe
;; ;;
*) log "Warning: Unknown os $tgt_os while setting up $AS flags" *)
log "Warning: Unknown os $tgt_os while setting up $AS flags"
;; ;;
esac esac
;; ;;
@ -1291,9 +1280,13 @@ EOF
# Almost every platform uses pthreads. # Almost every platform uses pthreads.
if enabled multithread; then if enabled multithread; then
case ${toolchain} in case ${toolchain} in
*-win*-vs*);; *-win*-vs*)
*-android-gcc);; ;;
*) check_header pthread.h && add_extralibs -lpthread *-android-gcc)
;;
*)
check_header pthread.h && add_extralibs -lpthread
;;
esac esac
fi fi