Allow multi-word "install" command.
Autoconf can determine that the correct install command includes flags,
e.g., "/usr/bin/install -c". When using this as a command, we can't
enclose the value in double-quotes, as that makes some shells use the
whole expression as a filename:
# this is the value returned by autoconf and stored in CT_install
$ ins="/usr/bin/install -c"
# if we call it with quotes, the command is not found
$ "${ins}"
bash: /usr/bin/install -c: No such file or directory
# removing the quotes lets it work as expected
$ ${ins}
/usr/bin/install: missing file operand
Try `/usr/bin/install --help' for more information.
Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
1 # This file adds the functions to build the MPC library
2 # Copyright 2009 Yann E. MORIN
3 # Licensed under the GPL v2. See COPYING in the root of this package
6 do_mpc_extract() { :; }
7 do_mpc_for_build() { :; }
8 do_mpc_for_host() { :; }
10 # Overide functions depending on configuration
11 if [ "${CT_MPC}" = "y" ]; then
15 CT_GetFile "mpc-${CT_MPC_VERSION}" .tar.gz \
16 http://www.multiprecision.org/mpc/download
21 CT_Extract "mpc-${CT_MPC_VERSION}"
22 CT_Patch "mpc" "${CT_MPC_VERSION}"
25 # Build MPC for running on build
26 # - always build statically
27 # - we do not have build-specific CFLAGS
28 # - install in build-tools prefix
32 case "${CT_TOOLCHAIN_TYPE}" in
33 native|cross) return 0;;
36 CT_DoStep INFO "Installing MPC for build"
37 CT_mkdir_pushd "${CT_BUILD_DIR}/build-mpc-build-${CT_BUILD}"
39 mpc_opts+=( "host=${CT_BUILD}" )
40 mpc_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
41 do_mpc_backend "${mpc_opts[@]}"
47 # Build MPC for running on host
51 CT_DoStep INFO "Installing MPC for host"
52 CT_mkdir_pushd "${CT_BUILD_DIR}/build-mpc-host-${CT_HOST}"
54 mpc_opts+=( "host=${CT_HOST}" )
55 mpc_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
56 mpc_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
57 do_mpc_backend "${mpc_opts[@]}"
64 # Parameter : description : type : default
65 # host : machine to run on : tuple : (none)
66 # prefix : prefix to install into : dir : (none)
67 # cflags : host cflags to use : string : (empty)
78 CT_DoLog EXTRA "Configuring MPC"
82 "${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \
85 --prefix="${prefix}" \
86 --with-gmp="${prefix}" \
87 --with-mpfr="${prefix}" \
91 CT_DoLog EXTRA "Building MPC"
92 CT_DoExecLog ALL make ${JOBSFLAGS}
94 if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
95 CT_DoLog EXTRA "Checking MPC"
96 CT_DoExecLog ALL make ${JOBSFLAGS} -s check
99 CT_DoLog EXTRA "Installing MPC"
100 CT_DoExecLog ALL make install