scripts/build/debug/400-ltrace.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Jun 11 21:45:57 2008 +0000 (2008-06-11)
changeset 554 be6197b5b33b
parent 486 92f6149c4275
child 669 ca740b4c4262
permissions -rw-r--r--
Include the full version number in the directory paths installed.
Change the version string so that it does not break 'make', and so that it has no '/' (it would be a hell if installed directories would mirror the SVN branches... :-/ )
Do not use implicit rules for the Makefile.
Simplify and enc=hance the --local test to refuse (un)installing.
Double-quotes variables, they are based on user input.
Eye-candy in the 'compile' and install messages.

/trunk/configure | 26 14 12 0 ++++++++++---------
/trunk/Makefile.in | 83 45 38 0 +++++++++++++++++++++++++++++++++---------------------------
2 files changed, 59 insertions(+), 50 deletions(-)
     1 # Build script for ltrace
     2 
     3 is_enabled="${CT_LTRACE}"
     4 
     5 do_print_filename() {
     6     [ "${CT_LTRACE}" = "y" ] || return 0
     7     echo "ltrace-${CT_LTRACE_VERSION}.orig"
     8 }
     9 
    10 do_debug_ltrace_get() {
    11     CT_GetFile "ltrace_${CT_LTRACE_VERSION}.orig" {ftp,http}://ftp.de.debian.org/debian/pool/main/l/ltrace/
    12     # Create a link so that the following steps are easier to do:
    13     cd "${CT_TARBALLS_DIR}"
    14     ltrace_ext=$(CT_GetFileExtension "ltrace_${CT_LTRACE_VERSION}.orig")
    15     ln -sf "ltrace_${CT_LTRACE_VERSION}.orig${ltrace_ext}" "ltrace-${CT_LTRACE_VERSION}${ltrace_ext}"
    16 }
    17 
    18 do_debug_ltrace_extract() {
    19     CT_ExtractAndPatch "ltrace-${CT_LTRACE_VERSION}"
    20 }
    21 
    22 do_debug_ltrace_build() {
    23     CT_DoStep INFO "Installing ltrace"
    24     mkdir -p "${CT_BUILD_DIR}/build-ltrace"
    25     CT_Pushd "${CT_BUILD_DIR}/build-ltrace"
    26 
    27     CT_DoLog EXTRA "Configuring ltrace"
    28 #    CFLAGS="-I${CT_SYSROOT_DIR}/usr/include"                \
    29 #    LDFLAGS="-L${CT_SYSROOT_DIR}/usr/include"               \
    30     "${CT_SRC_DIR}/ltrace-${CT_LTRACE_VERSION}/configure"   \
    31         --build=${CT_BUILD}                                 \
    32         --host=${CT_TARGET}                                 \
    33         --prefix=/usr
    34 
    35     CT_DoLog EXTRA "Building ltrace"
    36     make
    37 
    38     CT_DoLog EXTRA "Installing ltrace"
    39     make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install
    40 
    41     CT_Popd
    42     CT_EndStep
    43 }
    44