diff -r 2651341cc084 -r b132d22c912a scripts/build/debug/300-gdb.sh --- a/scripts/build/debug/300-gdb.sh Sun Jul 24 20:30:52 2011 +0200 +++ b/scripts/build/debug/300-gdb.sh Wed Aug 03 00:00:44 2011 +0200 @@ -150,20 +150,22 @@ CT_DoLog EXTRA "Installing cross-gdb" CT_DoExecLog ALL make install - CT_DoLog EXTRA "Install '.gdbinit' template" - # See in scripts/build/internals.sh for why we do this - if [ -f "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER" ]; then - gcc_version=$( cat "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER" ) - else - gcc_version=$( sed -r -e '/version_string/!d; s/^.+= "([^"]+)".*$/\1/;' \ - "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/version.c" \ - ) - fi - ${sed} -r \ - -e "s:@@PREFIX@@:${CT_PREFIX_DIR}:;" \ - -e "s:@@VERSION@@:${gcc_version}:;" \ - "${CT_LIB_DIR}/scripts/build/debug/gdbinit.in" \ - >"${CT_PREFIX_DIR}/share/gdb/gdbinit" + if [ "${CT_GDB_INSTALL_GDBINIT}" = "y" ]; then + CT_DoLog EXTRA "Install '.gdbinit' template" + # See in scripts/build/internals.sh for why we do this + if [ -f "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER" ]; then + gcc_version=$( cat "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER" ) + else + gcc_version=$( sed -r -e '/version_string/!d; s/^.+= "([^"]+)".*$/\1/;' \ + "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/version.c" \ + ) + fi + ${sed} -r \ + -e "s:@@PREFIX@@:${CT_PREFIX_DIR}:;" \ + -e "s:@@VERSION@@:${gcc_version}:;" \ + "${CT_LIB_DIR}/scripts/build/debug/gdbinit.in" \ + >"${CT_PREFIX_DIR}/share/gdb/gdbinit" + fi # Install gdbinit sample CT_EndStep fi