debug/gdb: fix the mess do_{gdb,expat,ncurses} have become
author"Yann E. MORIN" <yann.morin.1998@free.fr>
Sun Mar 03 15:02:32 2013 +0100 (2013-03-03)
changeset 3187575a6f1d3b52
parent 3186 fb0aa58be2c5
child 3188 388459fe2c22
debug/gdb: fix the mess do_{gdb,expat,ncurses} have become

Rename those three variables to properly reflect their purpose: decide
whether we need to download/extract gdb/libexpat/libncurses, not whether
we need to build them or not.

This is only a rename for now, subsequent changes will further
fix this mess.

Reported-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
scripts/build/debug/300-gdb.sh
     1.1 --- a/scripts/build/debug/300-gdb.sh	Sun Mar 03 13:10:51 2013 -0500
     1.2 +++ b/scripts/build/debug/300-gdb.sh	Sun Mar 03 15:02:32 2013 +0100
     1.3 @@ -10,25 +10,25 @@
     1.4  CT_DEBUG_GDB_EXPAT_VERSION="2.1.0"
     1.5  
     1.6  do_debug_gdb_parts() {
     1.7 -    do_gdb=
     1.8 -    do_ncurses=
     1.9 -    do_expat=
    1.10 +    need_gdb_src=
    1.11 +    need_ncurses_src=
    1.12 +    need_expat_src=
    1.13  
    1.14      if [ "${CT_GDB_CROSS}" = y ]; then
    1.15 -        do_gdb=y
    1.16 +        need_gdb_src=y
    1.17      fi
    1.18  
    1.19      if [ "${CT_GDB_GDBSERVER}" = "y" ]; then
    1.20 -        do_gdb=y
    1.21 +        need_gdb_src=y
    1.22      fi
    1.23  
    1.24      if [ "${CT_GDB_NATIVE}" = "y" ]; then
    1.25 -        do_gdb=y
    1.26 +        need_gdb_src=y
    1.27          # GDB on Mingw depends on PDcurses, not ncurses
    1.28          if [ "${CT_MINGW32}" != "y" ]; then
    1.29 -            do_ncurses=y
    1.30 +            need_ncurses_src=y
    1.31          fi
    1.32 -        do_expat=y
    1.33 +        need_expat_src=y
    1.34      fi
    1.35  }
    1.36  
    1.37 @@ -47,7 +47,7 @@
    1.38  
    1.39      do_debug_gdb_parts
    1.40  
    1.41 -    if [ "${do_gdb}" = "y" ]; then
    1.42 +    if [ "${need_gdb_src}" = "y" ]; then
    1.43          if [ "${CT_GDB_CUSTOM}" = "y" ]; then
    1.44              CT_GetCustom "gdb" "${CT_GDB_VERSION}" "${CT_GDB_CUSTOM_LOCATION}"
    1.45          else
    1.46 @@ -58,13 +58,13 @@
    1.47          fi
    1.48      fi
    1.49  
    1.50 -    if [ "${do_ncurses}" = "y" ]; then
    1.51 +    if [ "${need_ncurses_src}" = "y" ]; then
    1.52          CT_GetFile "ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}" .tar.gz  \
    1.53                     {ftp,http}://ftp.gnu.org/pub/gnu/ncurses \
    1.54                     ftp://invisible-island.net/ncurses
    1.55      fi
    1.56  
    1.57 -    if [ "${do_expat}" = "y" ]; then
    1.58 +    if [ "${need_expat_src}" = "y" ]; then
    1.59          CT_GetFile "expat-${CT_DEBUG_GDB_EXPAT_VERSION}" .tar.gz    \
    1.60                     http://downloads.sourceforge.net/project/expat/expat/${CT_DEBUG_GDB_EXPAT_VERSION}
    1.61      fi
    1.62 @@ -73,7 +73,7 @@
    1.63  do_debug_gdb_extract() {
    1.64      do_debug_gdb_parts
    1.65  
    1.66 -    if [ "${do_gdb}" = "y" ]; then
    1.67 +    if [ "${need_gdb_src}" = "y" ]; then
    1.68          # If using custom directory location, nothing to do
    1.69          if [    "${CT_GDB_CUSTOM}" = "y" \
    1.70               -a -d "${CT_SRC_DIR}/gdb-${CT_GDB_VERSION}" ]; then
    1.71 @@ -83,13 +83,13 @@
    1.72          CT_Patch "gdb" "${CT_GDB_VERSION}"
    1.73      fi
    1.74  
    1.75 -    if [ "${do_ncurses}" = "y" ]; then
    1.76 +    if [ "${need_ncurses_src}" = "y" ]; then
    1.77          CT_Extract "ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}"
    1.78          CT_DoExecLog ALL chmod -R u+w "${CT_SRC_DIR}/ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}"
    1.79          CT_Patch "ncurses" "${CT_DEBUG_GDB_NCURSES_VERSION}"
    1.80      fi
    1.81  
    1.82 -    if [ "${do_expat}" = "y" ]; then
    1.83 +    if [ "${need_expat_src}" = "y" ]; then
    1.84          CT_Extract "expat-${CT_DEBUG_GDB_EXPAT_VERSION}"
    1.85          CT_Patch "expat" "${CT_DEBUG_GDB_EXPAT_VERSION}"
    1.86      fi
    1.87 @@ -145,7 +145,7 @@
    1.88              LD_for_gdb="ld -static"
    1.89          fi
    1.90  
    1.91 -        if [ "${do_expat}" = "y" ]; then
    1.92 +        if [ "${need_expat_src}" = "y" ]; then
    1.93              cross_extra_config+=("--with-expat=yes")
    1.94          else
    1.95              cross_extra_config+=("--disable-expat")
    1.96 @@ -215,7 +215,7 @@
    1.97          native_extra_config=("${extra_config[@]}")
    1.98  
    1.99          # GDB on Mingw depends on PDcurses, not ncurses
   1.100 -        if [ "${do_ncurses}" = "y" ]; then
   1.101 +        if [ "${need_ncurses_src}" = "y" ]; then
   1.102              CT_DoLog EXTRA "Building static target ncurses"
   1.103  
   1.104              [ "${CT_CC_LANG_CXX}" = "y" ] || ncurses_opts+=("--without-cxx" "--without-cxx-binding")
   1.105 @@ -278,9 +278,9 @@
   1.106              # There's no better way to tell gdb where to find -lcurses... :-(
   1.107              gdb_native_CFLAGS+=("-I${CT_BUILD_DIR}/static-target/include")
   1.108              gdb_native_CFLAGS+=("-L${CT_BUILD_DIR}/static-target/lib")
   1.109 -        fi # do_ncurses
   1.110 +        fi # need_ncurses_src
   1.111  
   1.112 -        if [ "${do_expat}" = "y" ]; then
   1.113 +        if [ "${need_expat_src}" = "y" ]; then
   1.114              CT_DoLog EXTRA "Building static target expat"
   1.115  
   1.116              mkdir -p "${CT_BUILD_DIR}/expat-build"
   1.117 @@ -299,7 +299,7 @@
   1.118  
   1.119              native_extra_config+=("--with-expat")
   1.120              native_extra_config+=("--with-libexpat-prefix=${CT_BUILD_DIR}/static-target")
   1.121 -        fi # do_expat
   1.122 +        fi # need_expat_src
   1.123  
   1.124          CT_DoLog EXTRA "Configuring native gdb"
   1.125