scripts/build/gmp.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri May 02 21:59:14 2008 +0000 (2008-05-02)
changeset 479 05c62432ec19
parent 466 7f9bbf94b0bb
child 486 92f6149c4275
permissions -rw-r--r--
For tools/ and debug/ build scripts, annd a numeric prefix, so that they always get built in the same order, in case of library dependencies.

/trunk/scripts/build/debug.sh | 2 1 1 0 +-
/trunk/scripts/build/tools.sh | 2 1 1 0 +-
2 files changed, 2 insertions(+), 2 deletions(-)
     1 # This file adds the functions to build the GMP library
     2 # Copyright 2008 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 if [ "${CT_CC_GCC_GMP_MPFR}" = "y" ]; then
     6 
     7 do_print_filename() {
     8     echo "gmp-${CT_GMP_VERSION}"
     9 }
    10 
    11 # Download GMP
    12 do_gmp_get() {
    13     CT_GetFile "${CT_GMP_FILE}"                 \
    14                http://ftp.sunet.se/pub/gnu/gmp  \
    15                ftp://ftp.gnu.org/gnu/gmp
    16 }
    17 
    18 # Extract GMP
    19 do_gmp_extract() {
    20     CT_ExtractAndPatch "${CT_GMP_FILE}"
    21 }
    22 
    23 do_gmp() {
    24     mkdir -p "${CT_BUILD_DIR}/build-gmp"
    25     cd "${CT_BUILD_DIR}/build-gmp"
    26 
    27     CT_DoStep INFO "Installing GMP"
    28 
    29     CT_DoLog EXTRA "Configuring GMP"
    30     CFLAGS="${CT_CFLAGS_FOR_HOST}"              \
    31     "${CT_SRC_DIR}/${CT_GMP_FILE}/configure"    \
    32         --build=${CT_BUILD}                     \
    33         --host=${CT_HOST}                       \
    34         --prefix="${CT_PREFIX_DIR}"             \
    35         --disable-shared --enable-static        \
    36         --enable-fft --enable-mpbsd             2>&1 |CT_DoLog ALL
    37 
    38     CT_DoLog EXTRA "Building GMP"
    39     make ${PARALLELMFLAGS}  2>&1 |CT_DoLog ALL
    40 
    41     if [ "${CT_GMP_CHECK}" = "y" ]; then
    42         CT_DoLog EXTRA "Checking GMP"
    43         make -s check       2>&1 |CT_DoLog ALL
    44     fi
    45 
    46     CT_DoLog EXTRA "Installing GMP"
    47     make install            2>&1 |CT_DoLog ALL
    48 
    49     CT_EndStep
    50 }
    51 
    52 else # Mo GMP 
    53 
    54 do_print_filename() { :; }
    55 do_gmp_get() { :; }
    56 do_gmp_extract() { :; }
    57 do_gmp() { :; }
    58 
    59 fi