scripts/build/debug/100-dmalloc.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Nov 25 19:15:34 2008 +0000 (2008-11-25)
branch1.3
changeset 1080 c70053450b4e
parent 916 68af6b83ff7e
child 1112 c72aecd1a9ef
permissions -rw-r--r--
Bump version to 1.3.0+svn.

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