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...
yann@103
     1
# Build script for the dmalloc debug library facility
yann@103
     2
yann@103
     3
is_enabled="${CT_DMALLOC}"
yann@103
     4
yann@103
     5
do_debug_dmalloc_get() {
yann@103
     6
    CT_GetFile "dmalloc-${CT_DMALLOC_VERSION}" http://dmalloc.com/releases/
yann@103
     7
}
yann@103
     8
yann@103
     9
do_debug_dmalloc_extract() {
yann@103
    10
    CT_ExtractAndPatch "dmalloc-${CT_DMALLOC_VERSION}"
yann@103
    11
}
yann@103
    12
yann@103
    13
do_debug_dmalloc_build() {
yann@103
    14
    CT_DoStep INFO "Installing dmalloc"
yann@103
    15
    CT_DoLog EXTRA "Configuring dmalloc"
yann@103
    16
yann@103
    17
    mkdir -p "${CT_BUILD_DIR}/build-dmalloc"
yann@103
    18
    cd "${CT_BUILD_DIR}/build-dmalloc"
yann@103
    19
yann@103
    20
    extra_config=
yann@103
    21
    case "${CT_CC_LANG_CXX}" in
yann@103
    22
        y)  extra_config="${extra_config} --enable-cxx";;
yann@103
    23
        *)  extra_config="${extra_config} --disable-cxx";;
yann@103
    24
    esac
yann@136
    25
    case "${CT_THREADS_NONE}" in
yann@103
    26
        y)  extra_config="${extra_config} --disable-threads";;
yann@103
    27
        *)  extra_config="${extra_config} --enable-threads";;
yann@103
    28
    esac
yann@103
    29
    case "${CT_SHARED_LIBS}" in
yann@103
    30
        y)  extra_config="${extra_config} --enable-shlib";;
yann@103
    31
        *)  extra_config="${extra_config} --disable-shlib";;
yann@103
    32
    esac
yann@103
    33
yann@103
    34
    CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
yann@103
    35
yann@103
    36
    LD="${CT_TARGET}-ld"                                        \
yann@103
    37
    AR="${CT_TARGET}-ar"                                        \
yann@103
    38
    "${CT_SRC_DIR}/dmalloc-${CT_DMALLOC_VERSION}/configure"     \
yann@103
    39
        --prefix=/usr                                           \
yann@103
    40
        --build="${CT_BUILD}"                                   \
yann@103
    41
        --host="${CT_TARGET}"                                   \
yann@103
    42
        ${extra_config}                                         2>&1 |CT_DoLog ALL
yann@103
    43
yann@103
    44
    CT_DoLog EXTRA "Building dmalloc"
yann@103
    45
    make ${PARALLELMFLAGS}                                      2>&1 |CT_DoLog ALL
yann@103
    46
yann@104
    47
    CT_DoLog EXTRA "Installing dmalloc"
yann@103
    48
    make DESTDIR="${CT_SYSROOT_DIR}"       installincs      \
yann@103
    49
                                           installlib       2>&1 |CT_DoLog ALL
yann@103
    50
    make DESTDIR="${CT_DEBUG_INSTALL_DIR}" installutil      2>&1 |CT_DoLog ALL
yann@103
    51
yann@103
    52
    CT_EndStep
yann@103
    53
}