scripts/build/debug/dmalloc.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 27 20:22:06 2007 +0000 (2007-05-27)
changeset 136 22b5ef41df97
parent 104 fcad4374caba
child 161 be4484f10ac7
permissions -rw-r--r--
Merge the NPTL stuff.
That still leaves the linuxthreads stuff broken, but it was just before. I don't care anyway. Time to fix that later...
     1 # Build script for the dmalloc debug library facility
     2 
     3 is_enabled="${CT_DMALLOC}"
     4 
     5 do_debug_dmalloc_get() {
     6     CT_GetFile "dmalloc-${CT_DMALLOC_VERSION}" http://dmalloc.com/releases/
     7 }
     8 
     9 do_debug_dmalloc_extract() {
    10     CT_ExtractAndPatch "dmalloc-${CT_DMALLOC_VERSION}"
    11 }
    12 
    13 do_debug_dmalloc_build() {
    14     CT_DoStep INFO "Installing dmalloc"
    15     CT_DoLog EXTRA "Configuring dmalloc"
    16 
    17     mkdir -p "${CT_BUILD_DIR}/build-dmalloc"
    18     cd "${CT_BUILD_DIR}/build-dmalloc"
    19 
    20     extra_config=
    21     case "${CT_CC_LANG_CXX}" in
    22         y)  extra_config="${extra_config} --enable-cxx";;
    23         *)  extra_config="${extra_config} --disable-cxx";;
    24     esac
    25     case "${CT_THREADS_NONE}" in
    26         y)  extra_config="${extra_config} --disable-threads";;
    27         *)  extra_config="${extra_config} --enable-threads";;
    28     esac
    29     case "${CT_SHARED_LIBS}" in
    30         y)  extra_config="${extra_config} --enable-shlib";;
    31         *)  extra_config="${extra_config} --disable-shlib";;
    32     esac
    33 
    34     CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
    35 
    36     LD="${CT_TARGET}-ld"                                        \
    37     AR="${CT_TARGET}-ar"                                        \
    38     "${CT_SRC_DIR}/dmalloc-${CT_DMALLOC_VERSION}/configure"     \
    39         --prefix=/usr                                           \
    40         --build="${CT_BUILD}"                                   \
    41         --host="${CT_TARGET}"                                   \
    42         ${extra_config}                                         2>&1 |CT_DoLog ALL
    43 
    44     CT_DoLog EXTRA "Building dmalloc"
    45     make ${PARALLELMFLAGS}                                      2>&1 |CT_DoLog ALL
    46 
    47     CT_DoLog EXTRA "Installing dmalloc"
    48     make DESTDIR="${CT_SYSROOT_DIR}"       installincs      \
    49                                            installlib       2>&1 |CT_DoLog ALL
    50     make DESTDIR="${CT_DEBUG_INSTALL_DIR}" installutil      2>&1 |CT_DoLog ALL
    51 
    52     CT_EndStep
    53 }