Index: tools/configure =================================================================== --- tools/configure (revisione 18508) +++ tools/configure (copia locale) @@ -82,7 +82,7 @@ parse_args() { ret="1" - for i in $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7 $arg8 $arg9 + for i in "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9" do if [ "$1" = "--ccache" ]; then if [ "$i" = "--ccache" ]; then @@ -92,7 +92,7 @@ if [ "$i" = "--no-ccache" ]; then ret="0" fi - elif [ "$1" = `echo $i|cut -d'=' -f1` ]; then + elif [ "$1" = "`echo $i|cut -d'=' -f1`" ]; then ret=`echo $i|cut -d'=' -f2` fi done @@ -315,22 +315,31 @@ ################################################################## # Prompt for specific developer options # - echo "" - echo "Enter your developer options (press enter when done)" - printf "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice" - if [ "$memory" = "2" ]; then - printf ", (8)MB MOD" + if [ "1" != "`parse_args --atype`" ]; then + aoptions=`parse_args --atype` + atype=1 + else + echo "" + echo "Enter your developer options (press enter when done)" + printf "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice" + if [ "$memory" = "2" ]; then + printf ", (8)MB MOD" + fi + if [ "$modelname" = "h120" ]; then + printf ", (R)TC MOD" + fi + echo "" fi - if [ "$modelname" = "h120" ]; then - printf ", (R)TC MOD" - fi - echo "" cont=1 while [ $cont = "1" ]; do - option=`input`; + if [ "$atype" ]; then + option=`echo "$aoptions" | cut -c 1` + else + option=`input` + fi case $option in [Dd]) @@ -366,7 +375,7 @@ memory="8" echo "Memory size selected: 8MB" else - cont=0 + [ "$atype" ] || cont=0 fi ;; [Rr]) @@ -375,19 +384,21 @@ have_rtc_alarm="#define HAVE_RTC_ALARM" echo "RTC functions enabled (DS1339/DS3231)" else - cont=0 + [ "$atype" ] || cont=0 fi ;; *) - cont=0 + [ "$atype" ] || cont=0 ;; esac + [ "$aoptions" ] && aoptions=`echo "$aoptions" | cut -c 2-` + [ "$aoptions" ] || cont=0 done - echo "done" + [ "$atype" ] || echo "done" if [ "yes" = "$voice" ]; then # Ask about languages to build - echo "Select a number for the language to use (default is english)" + [ "1" != "`parse_args --atype`" ] || echo "Select a number for the language to use (default is english)" # The multiple-language feature is currently broken # echo "You may enter a comma-separated list of languages to build" @@ -425,8 +436,10 @@ # Configure voice settings voiceconfig () { thislang=$1 - echo "Building $thislang voice for $modelname. Select options" - echo "" + if [ "1" = "`parse_args --tts`" ]; then + echo "Building $thislang voice for $modelname. Select options" + echo "" + fi if [ -n "`findtool flite`" ]; then FLITE="F(l)ite " @@ -491,8 +504,12 @@ exit 3 fi - echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?" - option=`input` + if [ "1" != "`parse_args --tts`" ]; then + option=`parse_args --tts`; + else + echo "TTS engine to use: ${FLITE}${FESTIVAL}${ESPEAK}${SAPI}${SWIFT}(${DEFAULT_CHOICE})?" + option=`input` + fi case "$option" in [Ll]) TTS_ENGINE="flite" @@ -527,13 +544,17 @@ echo "Using $TTS_ENGINE for TTS" # Allow the user to input manual commandline options - printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): " - USER_TTS_OPTS=`input` + if [ "1" != "`parse_args --ttsopts`" ]; then + USER_TTS_OPTS=`parse_args --ttsopts`; + else + printf "Enter $TTS_ENGINE options (enter for defaults \"$TTS_OPTS\"): " + USER_TTS_OPTS=`input` + echo "" + fi if [ -n "$USER_TTS_OPTS" ]; then TTS_OPTS="$USER_TTS_OPTS" fi - echo "" if [ "$swcodec" = "yes" ]; then ENCODER="rbspeexenc" @@ -554,8 +575,12 @@ echo "Using $ENCODER for encoding voice clips" # Allow the user to input manual commandline options - printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): " - USER_ENC_OPTS=`input` + if [ "1" != "`parse_args --encopts`" ]; then + USER_ENC_OPTS=`parse_args --encopts`; + else + printf "Enter $ENCODER options (enter for defaults \"$ENC_OPTS\"): " + USER_ENC_OPTS=`input` + fi if [ -n "$USER_ENC_OPTS" ]; then ENC_OPTS=$USER_ENC_OPTS fi @@ -573,13 +598,16 @@ langs="$langs $clean" done - num=1 - for one in $langs; do - echo "$num. $one" - num=`expr $num + 1` - done - - read pick + if [ "1" != "`parse_args --language`" ]; then + pick=`parse_args --language`; + else + num=1 + for one in $langs; do + echo "$num. $one" + num=`expr $num + 1` + done + pick=`input` + fi } whichlang() { @@ -624,7 +652,20 @@ number is. --type=TYPE Sets the build type. The shortcut is also valid. - Run without this option to see available types. + Run without this option to see all available types. + + --atype=ATYPE Sets the advanced build type. The shortcut is also valid. + Run without this option to see all available types. + + --language=LANG Set the language used for voice generation (used only if + TYPE is V). + + --tts=ENGINE Set the TTS engine used for voice generation (used only + if TYPE is V). + + --ttsopts=OPTS Set TTS engine manual options (used only if ATYPE is V). + + --encopts=OPTS Set encoder manual options (used only if ATYPE is V). --rbdir=dir Use alternative rockbox directory (default: ${rbdir}). This is useful for having multiple alternate builds on @@ -697,7 +738,7 @@ # Figure out target platform # -if [ "1" != `parse_args --target` ]; then +if [ "1" != "`parse_args --target`" ]; then buildfor=`parse_args --target`; else echo "Enter target platform:" @@ -2020,10 +2061,10 @@ if [ -z "$memory" ]; then case $target_id in 15) - echo "Enter size of your RAM (in MB): (Defaults to 32)" - if [ "1" != `parse_args --ram` ]; then + if [ "1" != "`parse_args --ram`" ]; then size=`parse_args --ram`; else + echo "Enter size of your RAM (in MB): (Defaults to 32)" size=`input`; fi case $size in @@ -2036,24 +2077,24 @@ esac ;; *) - echo "Enter size of your RAM (in MB): (Defaults to 2)" - if [ "1" != `parse_args --ram` ]; then - size=`parse_args --ram`; - else - size=`input`; - fi - case $size in - 8) - memory="8" - ;; - *) - memory="2" - ;; - esac + if [ "1" != "`parse_args --ram`" ]; then + size=`parse_args --ram`; + else + echo "Enter size of your RAM (in MB): (Defaults to 2)" + size=`input`; + fi + case $size in + 8) + memory="8" + ;; + *) + memory="2" + ;; + esac ;; esac echo "Memory size selected: $memory MB" - echo "" + [ "1" != "`parse_args --type`" ] || echo "" fi #remove end @@ -2076,7 +2117,7 @@ *) ;; esac -if [ "1" != `parse_args --type` ]; then +if [ "1" != "`parse_args --type`" ]; then btype=`parse_args --type`; else echo "Build (N)ormal, (A)dvanced, (S)imulator, (B)ootloader, $gdbstub(M)anual: (Defaults to N)" @@ -2310,11 +2351,11 @@ GCCOPTS=`echo $GCCOPTS | sed 's/ -O / -Os /'` fi -if [ "1" != `parse_args --ccache` ]; then +if [ "1" != "`parse_args --ccache`" ]; then echo "Enable ccache for building" ccache="ccache" else - if [ "1" = `parse_args --no-ccache` ]; then + if [ "1" = "`parse_args --no-ccache`" ]; then ccache=`findtool ccache` if test -n "$ccache"; then echo "Found and uses ccache ($ccache)"