scripts/build/companion_libs/cloog.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Sep 12 10:16:28 2009 +0200 (2009-09-12)
changeset 1530 fafe0dd00c66
parent 1399 d603008707f1
child 1537 a53a5e1d61db
permissions -rw-r--r--
comp-libs/cloog: new versions have the version number in the dir name

For CLooG/PPL 0.15.3, the directory name was simply cloog-ppl.
For any later versions, the driectory name does have the version, such as
cloog-ppl-0.15.4.
     1 # This file adds the functions to build the CLooG library
     2 # Copyright 2009 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 do_cloog_get() { :; }
     6 do_cloog_extract() { :; }
     7 do_cloog() { :; }
     8 do_cloog_target() { :; }
     9 
    10 # Overide functions depending on configuration
    11 if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
    12 
    13 # Download CLooG
    14 do_cloog_get() {
    15     CT_GetFile "cloog-ppl-${CT_CLOOG_VERSION}"  \
    16         ftp://gcc.gnu.org/pub/gcc/infrastructure
    17 }
    18 
    19 # Extract CLooG
    20 do_cloog_extract() {
    21     local _t
    22 
    23     CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}"
    24 
    25     # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!)
    26     # while versions 0.15.4 onward do have the version in the dirname.
    27     case "${CT_CLOOG_VERSION}" in
    28         0.15.3) _t="";;
    29         *)      _t="-${CT_CLOOG_VERSION}";;
    30     esac
    31     CT_Pushd "${CT_SRC_DIR}/cloog-ppl${_t}"
    32     CT_Patch "cloog-ppl-${CT_CLOOG_VERSION}" nochdir
    33     CT_Popd
    34 }
    35 
    36 do_cloog() {
    37     mkdir -p "${CT_BUILD_DIR}/build-cloog-ppl"
    38     cd "${CT_BUILD_DIR}/build-cloog-ppl"
    39 
    40     CT_DoStep INFO "Installing CLooG/ppl"
    41 
    42     CT_DoLog EXTRA "Configuring CLooG/ppl"
    43     CFLAGS="${CT_CFLAGS_FOR_HOST}"      \
    44     CT_DoExecLog ALL                    \
    45     "${CT_SRC_DIR}/cloog-ppl/configure" \
    46         --build=${CT_BUILD}             \
    47         --host=${CT_HOST}               \
    48         --prefix="${CT_PREFIX_DIR}"     \
    49         --with-gmp="${CT_PREFIX_DIR}"   \
    50         --with-ppl="${CT_PREFIX_DIR}"   \
    51         --enable-shared                 \
    52         --disable-static                \
    53         --with-bits=gmp
    54 
    55     CT_DoLog EXTRA "Building CLooG/ppl"
    56     CT_DoExecLog ALL make ${PARALLELMFLAGS}
    57 
    58     if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then
    59         CT_DoLog EXTRA "Checking CLooG/ppl"
    60         CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
    61     fi
    62 
    63     CT_DoLog EXTRA "Installing CLooG/ppl"
    64     CT_DoExecLog ALL make install
    65 
    66     # Remove spuriously installed file
    67     CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/bin/cloog"
    68 
    69     CT_EndStep
    70 }
    71 
    72 fi # CT_PPL_CLOOG_MPC