qtmobility/configure
branchRCL_3
changeset 6 eb34711bcc75
parent 3 87be51aa5b5b
child 13 4203353e74ea
equal deleted inserted replaced
3:87be51aa5b5b 6:eb34711bcc75
    40 ##
    40 ##
    41 #############################################################################
    41 #############################################################################
    42 
    42 
    43 # return status of 1 if absolute path as first argument
    43 # return status of 1 if absolute path as first argument
    44 # also prints the return status
    44 # also prints the return status
    45 function isAbsPath() {
    45 isAbsPath() {
    46     slash=$(echo $1 | cut -c 1)
    46     slash=$(echo $1 | cut -c 1)
    47     if [ "$slash" != "/" ]; then
    47     if [ "$slash" != "/" ]; then
    48         echo 0
    48         echo 0
    49         return 0
    49         return 0
    50     fi
    50     fi
    55 # Returns the absolute path for $1 for target $2
    55 # Returns the absolute path for $1 for target $2
    56 # as an example $2 might have value "maemo5".
    56 # as an example $2 might have value "maemo5".
    57 # This is required because when building in scratchbox for
    57 # This is required because when building in scratchbox for
    58 # maemo we do not want to follow symbolic links that are 
    58 # maemo we do not want to follow symbolic links that are 
    59 # introduced by scratchbox
    59 # introduced by scratchbox
    60 function absPath() {
    60 absPath() {
    61     
    61     
    62     if [ "$2" = "maemo5" -o "$2" = "maemo6" ]; then
    62     if [ "$2" = "maemo5" -o "$2" = "maemo6" ]; then
    63         if [ `isAbsPath $1` = '1' ]; then
    63         if [ `isAbsPath $1` = '1' ]; then
    64             echo $1;
    64             echo $1;
    65         else
    65         else
    87 QT_MOBILITY_LIB=
    87 QT_MOBILITY_LIB=
    88 QT_MOBILITY_BIN=
    88 QT_MOBILITY_BIN=
    89 BUILD_UNITTESTS=
    89 BUILD_UNITTESTS=
    90 BUILD_EXAMPLES=
    90 BUILD_EXAMPLES=
    91 BUILD_DOCS=yes
    91 BUILD_DOCS=yes
       
    92 BUILD_TOOLS=yes
    92 RELEASEMODE=
    93 RELEASEMODE=
    93 BUILD_SILENT=
    94 BUILD_SILENT=
    94 LINUX_TARGET=
    95 LINUX_TARGET=
    95 QMAKE_CACHE="$shadowpath/.qmake.cache"
    96 QMAKE_CACHE="$shadowpath/.qmake.cache"
    96 LIB_PATH="lib"
    97 LIB_PATH="lib"
   101 
   102 
   102 usage() 
   103 usage() 
   103 {
   104 {
   104     echo "Usage: configure [-prefix <dir>] [headerdir <dir>] [libdir <dir>]"
   105     echo "Usage: configure [-prefix <dir>] [headerdir <dir>] [libdir <dir>]"
   105     echo "                 [-bindir <dir>] [-tests] [-examples] [-no-docs]"
   106     echo "                 [-bindir <dir>] [-tests] [-examples] [-no-docs]"
   106     echo "                 [-debug] [-release] [-silent] [-modules <list>]"
   107     echo "                 [-no-tools] [-debug] [-release] [-silent]"
       
   108     echo "                 [-modules <list>]"
   107     echo
   109     echo
   108     echo "Options:"
   110     echo "Options:"
   109     echo
   111     echo
   110     echo "-prefix <dir> ..... This will install everything relative to <dir>"
   112     echo "-prefix <dir> ..... This will install everything relative to <dir>"
   111     echo "                    (default prefix: $shadowpath/install)"
   113     echo "                    (default prefix: $shadowpath/install)"
   121     echo "-tests ............ Build unit tests (not build by default)"
   123     echo "-tests ............ Build unit tests (not build by default)"
   122     echo "                    Note, this adds test symbols to all libraries"
   124     echo "                    Note, this adds test symbols to all libraries"
   123     echo "                    and should not be used for release builds."
   125     echo "                    and should not be used for release builds."
   124     echo "-examples ......... Build example applications"
   126     echo "-examples ......... Build example applications"
   125     echo "-no-docs .......... Do not build documentation (build by default)"
   127     echo "-no-docs .......... Do not build documentation (build by default)"
       
   128     echo "-no-tools ......... Do not build tools (build by default)"
   126     echo "-modules <list> ... Restrict list of modules to build (default all supported)"
   129     echo "-modules <list> ... Restrict list of modules to build (default all supported)"
   127     echo "                    Choose from: bearer contacts location publishsubscribe"
   130     echo "                    Choose from: bearer contacts location publishsubscribe"
   128     echo "                    messaging multimedia systeminfo serviceframework versit"
   131     echo "                    messaging multimedia systeminfo serviceframework versit"
   129     echo "                    sensors"
   132     echo "                    sensors"
   130     echo "                    Modules should be separated by a space and surrounded"
   133     echo "                    Modules should be separated by a space and surrounded"
   173             BUILD_EXAMPLES="yes"
   176             BUILD_EXAMPLES="yes"
   174             ;;
   177             ;;
   175         -no-docs)
   178         -no-docs)
   176             BUILD_DOCS=
   179             BUILD_DOCS=
   177             ;;
   180             ;;
       
   181         -no-tools)
       
   182             BUILD_TOOLS=
       
   183             ;;
   178         -debug)
   184         -debug)
   179             RELEASEMODE=debug
   185             RELEASEMODE=debug
   180             ;;
   186             ;;
   181         -release)
   187         -release)
   182             RELEASEMODE=release
   188             RELEASEMODE=release
   350     echo "build_docs = no" >> "$CONFIG_IN"
   356     echo "build_docs = no" >> "$CONFIG_IN"
   351 else
   357 else
   352     echo "build_docs = yes" >> "$CONFIG_IN"
   358     echo "build_docs = yes" >> "$CONFIG_IN"
   353 fi
   359 fi
   354 
   360 
       
   361 if [ -z "$BUILD_TOOLS" ]; then
       
   362     echo "build_tools = no" >> "$CONFIG_IN"
       
   363 else
       
   364     echo "build_tools = yes" >> "$CONFIG_IN"
       
   365 fi
       
   366 
   355 echo "Configuring Qt Mobility"
   367 echo "Configuring Qt Mobility"
   356 echo 
   368 echo 
   357 
   369 
   358 WHICH="$relpath/config.tests/tools/which.test"
   370 WHICH="$relpath/config.tests/tools/which.test"
   359 
   371