1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/scripts/build/debug/100-dmalloc.sh Sun May 04 10:46:32 2008 +0000
1.3 @@ -0,0 +1,58 @@
1.4 +# Build script for the dmalloc debug library facility
1.5 +
1.6 +is_enabled="${CT_DMALLOC}"
1.7 +
1.8 +do_print_filename() {
1.9 + [ "${CT_DMALLOC}" = "y" ] || return 0
1.10 + echo "dmalloc-${CT_DMALLOC_VERSION}"
1.11 +}
1.12 +
1.13 +do_debug_dmalloc_get() {
1.14 + CT_GetFile "dmalloc-${CT_DMALLOC_VERSION}" http://dmalloc.com/releases/
1.15 +}
1.16 +
1.17 +do_debug_dmalloc_extract() {
1.18 + CT_ExtractAndPatch "dmalloc-${CT_DMALLOC_VERSION}"
1.19 +}
1.20 +
1.21 +do_debug_dmalloc_build() {
1.22 + CT_DoStep INFO "Installing dmalloc"
1.23 + CT_DoLog EXTRA "Configuring dmalloc"
1.24 +
1.25 + mkdir -p "${CT_BUILD_DIR}/build-dmalloc"
1.26 + cd "${CT_BUILD_DIR}/build-dmalloc"
1.27 +
1.28 + extra_config=
1.29 + case "${CT_CC_LANG_CXX}" in
1.30 + y) extra_config="${extra_config} --enable-cxx";;
1.31 + *) extra_config="${extra_config} --disable-cxx";;
1.32 + esac
1.33 + case "${CT_THREADS_NONE}" in
1.34 + y) extra_config="${extra_config} --disable-threads";;
1.35 + *) extra_config="${extra_config} --enable-threads";;
1.36 + esac
1.37 + case "${CT_SHARED_LIBS}" in
1.38 + y) extra_config="${extra_config} --enable-shlib";;
1.39 + *) extra_config="${extra_config} --disable-shlib";;
1.40 + esac
1.41 +
1.42 + CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
1.43 +
1.44 + LD="${CT_TARGET}-ld" \
1.45 + AR="${CT_TARGET}-ar" \
1.46 + "${CT_SRC_DIR}/dmalloc-${CT_DMALLOC_VERSION}/configure" \
1.47 + --prefix=/usr \
1.48 + --build="${CT_BUILD}" \
1.49 + --host="${CT_TARGET}" \
1.50 + ${extra_config} 2>&1 |CT_DoLog ALL
1.51 +
1.52 + CT_DoLog EXTRA "Building dmalloc"
1.53 + make 2>&1 |CT_DoLog ALL
1.54 +
1.55 + CT_DoLog EXTRA "Installing dmalloc"
1.56 + make DESTDIR="${CT_SYSROOT_DIR}" installincs \
1.57 + installlib 2>&1 |CT_DoLog ALL
1.58 + make DESTDIR="${CT_DEBUG_INSTALL_DIR}" installutil 2>&1 |CT_DoLog ALL
1.59 +
1.60 + CT_EndStep
1.61 +}