From 42b0a64885d45a49313046b2ab11bb95f91684cc Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 3 Mar 2013 15:02:32 +0100 Subject: 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 Signed-off-by: "Yann E. MORIN" diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 6c76334..2d52909 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -10,25 +10,25 @@ CT_DEBUG_GDB_NCURSES_VERSION="5.9" CT_DEBUG_GDB_EXPAT_VERSION="2.1.0" do_debug_gdb_parts() { - do_gdb= - do_ncurses= - do_expat= + need_gdb_src= + need_ncurses_src= + need_expat_src= if [ "${CT_GDB_CROSS}" = y ]; then - do_gdb=y + need_gdb_src=y fi if [ "${CT_GDB_GDBSERVER}" = "y" ]; then - do_gdb=y + need_gdb_src=y fi if [ "${CT_GDB_NATIVE}" = "y" ]; then - do_gdb=y + need_gdb_src=y # GDB on Mingw depends on PDcurses, not ncurses if [ "${CT_MINGW32}" != "y" ]; then - do_ncurses=y + need_ncurses_src=y fi - do_expat=y + need_expat_src=y fi } @@ -47,7 +47,7 @@ do_debug_gdb_get() { do_debug_gdb_parts - if [ "${do_gdb}" = "y" ]; then + if [ "${need_gdb_src}" = "y" ]; then if [ "${CT_GDB_CUSTOM}" = "y" ]; then CT_GetCustom "gdb" "${CT_GDB_VERSION}" "${CT_GDB_CUSTOM_LOCATION}" else @@ -58,13 +58,13 @@ do_debug_gdb_get() { fi fi - if [ "${do_ncurses}" = "y" ]; then + if [ "${need_ncurses_src}" = "y" ]; then CT_GetFile "ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}" .tar.gz \ {ftp,http}://ftp.gnu.org/pub/gnu/ncurses \ ftp://invisible-island.net/ncurses fi - if [ "${do_expat}" = "y" ]; then + if [ "${need_expat_src}" = "y" ]; then CT_GetFile "expat-${CT_DEBUG_GDB_EXPAT_VERSION}" .tar.gz \ http://downloads.sourceforge.net/project/expat/expat/${CT_DEBUG_GDB_EXPAT_VERSION} fi @@ -73,7 +73,7 @@ do_debug_gdb_get() { do_debug_gdb_extract() { do_debug_gdb_parts - if [ "${do_gdb}" = "y" ]; then + if [ "${need_gdb_src}" = "y" ]; then # If using custom directory location, nothing to do if [ "${CT_GDB_CUSTOM}" = "y" \ -a -d "${CT_SRC_DIR}/gdb-${CT_GDB_VERSION}" ]; then @@ -83,13 +83,13 @@ do_debug_gdb_extract() { CT_Patch "gdb" "${CT_GDB_VERSION}" fi - if [ "${do_ncurses}" = "y" ]; then + if [ "${need_ncurses_src}" = "y" ]; then CT_Extract "ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}" CT_DoExecLog ALL chmod -R u+w "${CT_SRC_DIR}/ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}" CT_Patch "ncurses" "${CT_DEBUG_GDB_NCURSES_VERSION}" fi - if [ "${do_expat}" = "y" ]; then + if [ "${need_expat_src}" = "y" ]; then CT_Extract "expat-${CT_DEBUG_GDB_EXPAT_VERSION}" CT_Patch "expat" "${CT_DEBUG_GDB_EXPAT_VERSION}" fi @@ -145,7 +145,7 @@ do_debug_gdb_build() { LD_for_gdb="ld -static" fi - if [ "${do_expat}" = "y" ]; then + if [ "${need_expat_src}" = "y" ]; then cross_extra_config+=("--with-expat=yes") else cross_extra_config+=("--disable-expat") @@ -215,7 +215,7 @@ do_debug_gdb_build() { native_extra_config=("${extra_config[@]}") # GDB on Mingw depends on PDcurses, not ncurses - if [ "${do_ncurses}" = "y" ]; then + if [ "${need_ncurses_src}" = "y" ]; then CT_DoLog EXTRA "Building static target ncurses" [ "${CT_CC_LANG_CXX}" = "y" ] || ncurses_opts+=("--without-cxx" "--without-cxx-binding") @@ -278,9 +278,9 @@ do_debug_gdb_build() { # There's no better way to tell gdb where to find -lcurses... :-( gdb_native_CFLAGS+=("-I${CT_BUILD_DIR}/static-target/include") gdb_native_CFLAGS+=("-L${CT_BUILD_DIR}/static-target/lib") - fi # do_ncurses + fi # need_ncurses_src - if [ "${do_expat}" = "y" ]; then + if [ "${need_expat_src}" = "y" ]; then CT_DoLog EXTRA "Building static target expat" mkdir -p "${CT_BUILD_DIR}/expat-build" @@ -299,7 +299,7 @@ do_debug_gdb_build() { native_extra_config+=("--with-expat") native_extra_config+=("--with-libexpat-prefix=${CT_BUILD_DIR}/static-target") - fi # do_expat + fi # need_expat_src CT_DoLog EXTRA "Configuring native gdb" -- cgit v0.10.2-6-g49f6