scripts/build/debug/template.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Jul 12 13:34:56 2007 +0000 (2007-07-12)
changeset 239 988e9b7f70eb
parent 156 0b7096103d95
permissions -rw-r--r--
Add strace debugging aid.
yann@156
     1
# Template file for a debug utility
yann@156
     2
yann@156
     3
# Check here wether your debug tool is enabled or not.
yann@156
     4
# This will get redefined over and over again for each tool, so don't
yann@156
     5
# count on it in the functions below.
yann@156
     6
is_enabled="${CT_FOOBAR}"
yann@156
     7
yann@156
     8
# Small function to print the filename
yann@156
     9
# Note that this function gets redefined over and over for each tool
yann@156
    10
# It's of no use when building the toolchain proper, but shows all its
yann@156
    11
# usefullness when saving the toolchain and building the tarball.
yann@156
    12
# You shall not echo anything if you're not enabled!
yann@156
    13
# Echo the name of the file, without the extension, below.
yann@156
    14
do_print_filename() {
yann@156
    15
    # For example:
yann@156
    16
    # [ "${CT_FOOBAR}" = "y" ] || return 0
yann@156
    17
    # echo "foobar-${CT_FOOBAR_VERSION}"
yann@156
    18
    :
yann@156
    19
}
yann@156
    20
yann@156
    21
# Put your download code here
yann@156
    22
do_debug_foobar_get() {
yann@156
    23
    # For example:
yann@156
    24
    # CT_GetFile "foobar-${CT_FOOBAR_VERSION}" http://foobar.com/releases/
yann@156
    25
    :
yann@156
    26
}
yann@156
    27
yann@156
    28
# Put your extract code here
yann@156
    29
do_debug_foobar_extract() {
yann@156
    30
    # For example:
yann@156
    31
    # CT_ExtractAndPatch "foobar-${CT_FOOBAR_VERSION}"
yann@156
    32
    :
yann@156
    33
}
yann@156
    34
yann@156
    35
# Put your build code here
yann@156
    36
do_debug_foobar_build() {
yann@156
    37
    # For example:
yann@234
    38
    # mkdir -p "${CT_BUILD_DIR}/build-foobar"
yann@234
    39
    # CT_Pushd "${CT_BUILD_DIR}/build-foobar"
yann@156
    40
    # "${CT_SRC_DIR}/foobar-${CT_FOOBAR_VERSION}/configure"   \
yann@156
    41
    #     --build=${CT_BUILD}                                 \
yann@156
    42
    #     --host=${CT_TARGET}                                 \
yann@156
    43
    #     --prefix=/usr                                       \
yann@156
    44
    #     --foobar-options
yann@156
    45
    # make
yann@156
    46
    # make DESTDIR="${CT_SYSROOT_DIR}" install
yann@156
    47
    # CT_Popd
yann@156
    48
    :
yann@156
    49
}
yann@156
    50