src/main/resources/make/configure.vm

changeset 162
79eeb33c738f
parent 161
3d1cd23f88f7
child 165
f4f11f755ee7
equal deleted inserted replaced
161:3d1cd23f88f7 162:79eeb33c738f
113 --release add extra compile flags for release builds 113 --release add extra compile flags for release builds
114 #if( $options.size() > 0 ) 114 #if( $options.size() > 0 )
115 115
116 Options: 116 Options:
117 #foreach( $opt in $options ) 117 #foreach( $opt in $options )
118 --${opt.argument}=${opt.valuesString} 118 ${opt.helpText}
119 #end 119 #end
120 #end 120 #end
121 #if( $features.size() > 0 ) 121 #if( $features.size() > 0 )
122 122
123 Optional Features: 123 Optional Features:
213 "--localedir"*) localedir=${D}{ARG#--localedir} ;; 213 "--localedir"*) localedir=${D}{ARG#--localedir} ;;
214 "--help"*) printhelp; abort_configure ;; 214 "--help"*) printhelp; abort_configure ;;
215 "--debug") BUILD_TYPE="debug" ;; 215 "--debug") BUILD_TYPE="debug" ;;
216 "--release") BUILD_TYPE="release" ;; 216 "--release") BUILD_TYPE="release" ;;
217 #foreach( $opt in $options ) 217 #foreach( $opt in $options )
218 "--${opt.argument}="*) ${opt.varName}=${D}{ARG#--${opt.argument}=} ;; 218 "--${opt.arg}="*) ${opt.varName}=${D}{ARG#--${opt.arg}=} ;;
219 "--${opt.argument}") echo "option '$ARG' needs a value:"; echo " $ARG=${opt.valuesString}"; abort_configure ;; 219 "--${opt.arg}") echo "option '$ARG' needs a value:"; echo " $ARG=${opt.valuesString}"; abort_configure ;;
220 #end 220 #end
221 #foreach( $feature in $features ) 221 #foreach( $feature in $features )
222 "--enable-${feature.arg}") ${feature.varName}=on ;; 222 "--enable-${feature.arg}") ${feature.varName}=on ;;
223 "--disable-${feature.arg}") unset ${feature.varName} ;; 223 "--disable-${feature.arg}") unset ${feature.varName} ;;
224 #end 224 #end
668 #end 668 #end
669 fi 669 fi
670 #end 670 #end
671 671
672 #foreach( $opt in $target.options ) 672 #foreach( $opt in $target.options )
673 # Option: --${opt.argument} 673 # Option: --${opt.arg}
674 if [ -z "${D}${opt.varName}" ]; then 674 if [ -z "${D}${opt.varName}" ]; then
675 echo "auto-detecting option '${opt.argument}'" 675 echo "auto-detecting option '${opt.arg}'"
676 SAVED_ERROR="$ERROR" 676 SAVED_ERROR="$ERROR"
677 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" 677 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED"
678 ERROR=1 678 ERROR=1
679 while true 679 while true
680 do 680 do
681 #foreach( $optdef in $opt.defaults ) 681 #foreach( $optdef in $opt.defaults )
682 #if( $optdef.platform ) 682 #if( $optdef.platform )
683 if isplatform "$optdef.platform"; then 683 if isplatform "$optdef.platform"; then
684 #end 684 #end
685 if $optdef.func ; then 685 if $optdef.func ; then
686 echo " ${opt.argument}: ${optdef.valueName}" >> "$TEMP_DIR/options" 686 echo " ${opt.arg}: ${optdef.valueName}" >> "$TEMP_DIR/options"
687 ERROR=0 687 ERROR=0
688 break 688 break
689 fi 689 fi
690 #if( $optdef.platform ) 690 #if( $optdef.platform )
691 fi 691 fi
693 #end 693 #end
694 break 694 break
695 done 695 done
696 if [ $ERROR -ne 0 ]; then 696 if [ $ERROR -ne 0 ]; then
697 SAVED_ERROR=1 697 SAVED_ERROR=1
698 SAVED_DEPENDENCIES_FAILED="option '${opt.argument}' $SAVED_DEPENDENCIES_FAILED" 698 SAVED_DEPENDENCIES_FAILED="option '${opt.arg}' $SAVED_DEPENDENCIES_FAILED"
699 fi 699 fi
700 ERROR="$SAVED_ERROR" 700 ERROR="$SAVED_ERROR"
701 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED" 701 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED"
702 else 702 else
703 echo "checking option ${opt.argument} = ${D}${opt.varName}" 703 echo "checking option ${opt.arg} = ${D}${opt.varName}"
704 if false; then 704 if false; then
705 false 705 false
706 #foreach( $optval in $opt.values ) 706 #foreach( $optval in $opt.values )
707 elif [ "${D}${opt.varName}" = "${optval.value}" ]; then 707 elif [ "${D}${opt.varName}" = "${optval.value}" ]; then
708 echo " ${opt.argument}: ${D}${opt.varName}" >> $TEMP_DIR/options 708 echo " ${opt.arg}: ${D}${opt.varName}" >> $TEMP_DIR/options
709 if $optval.func ; then 709 if $optval.func ; then
710 : 710 :
711 else 711 else
712 ERROR=1 712 ERROR=1
713 DEPENDENCIES_FAILED="option '${opt.argument}' $DEPENDENCIES_FAILED" 713 DEPENDENCIES_FAILED="option '${opt.arg}' $DEPENDENCIES_FAILED"
714 fi 714 fi
715 #end 715 #end
716 else 716 else
717 echo 717 echo
718 echo "Invalid option value - usage:" 718 echo "Invalid option value - usage:"
719 echo " --${opt.argument}=${opt.valuesString}" 719 echo " --${opt.arg}=${opt.valuesString}"
720 abort_configure 720 abort_configure
721 fi 721 fi
722 fi 722 fi
723 #end 723 #end
724 724

mercurial