source: trunk/bin/get_adolc.sh @ 2939

Last change on this file since 2939 was 2939, checked in by bradbell, 7 years ago
  1. Make sure all '# defines' have an '# undef' and vise-verser.
  2. Add adolc tests to jenkins.sh.

check_define.sh: New reoutine that check defines have matching undef.
package.sh: run check_define.sh.
search.sh: add missing source directory to search.
configure.hpp.in: fix bug in speed tests (name of preprocessor macro).
pow.hpp: fix comment.
thread_alloc.hpp: fix spelling in comment.
jenkins.sh: Automatically set LD_LIBRARY_PATH.
base_adolc.hpp: fix problem when using ADOL-C-2.4.1
adolc_prefix.omh: add link to get_adolc.sh.

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1#! /bin/bash -e
2# $Id: get_adolc.sh 2939 2013-10-14 11:06:18Z bradbell $
3# -----------------------------------------------------------------------------
4# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
5#
6# CppAD is distributed under multiple licenses. This distribution is under
7# the terms of the
8#                     Eclipse Public License Version 1.0.
9#
10# A copy of this license is included in the COPYING file of this distribution.
11# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
12# -----------------------------------------------------------------------------
13# $begin get_adolc.sh$$ $newlinech #$$
14# $spell
15#       tgz
16#       Adolc
17#       gz
18#       CppAD
19# $$
20#
21# $section Download and Install Adolc in Build Directory$$
22# $index adolc, download and install$$
23# $index download, install adolc$$
24# $index install, adolc$$
25#
26# $head Syntax$$
27# $code bin/get_adolc.sh$$
28#
29# $head Purpose$$
30# If you are using Unix, this command will download and install
31# $href%https://projects.coin-or.org/ADOL-C%ADOL-C%$$ in the
32# CppAD $code build$$ directory.
33#
34# $children%
35#       bin/get_colpack.sh
36# %$$
37# $head Requirements$$
38# You must first use $cref get_colpack.sh$$ to download and install
39# $code ColPack$$ (coloring algorithms used for sparse matrix derivatives).
40#
41# $head Distribution Directory$$
42# This command must be executed in the
43# $cref/distribution directory/download/Distribution Directory/$$.
44#
45# $head External Directory$$
46# The Adolc source code is downloaded into the sub-directory
47# $code build/external$$ below the distribution directory.
48#
49# $head Prefix Directory$$
50# The Adolc include files are installed in the sub-directory
51# $code build/prefix/include/adolc$$ below the distribution directory.
52#
53# $head Reuse$$
54# The files $codei%build/external/ADOL-C-%version%.tgz%$$
55# and the directory $codei%build/external/ADOL-C-%version%$$
56# will be reused if they exist. Delete this file and directory
57# to get a complete rebuild.
58#
59# $end
60# -----------------------------------------------------------------------------
61if [ $0 != "bin/get_adolc.sh" ]
62then
63        echo "bin/get_adolc.sh: must be executed from its parent directory"
64        exit 1
65fi
66# -----------------------------------------------------------------------------
67# bash function that echos and executes a command
68echo_eval() {
69        echo $*
70        eval $*
71}
72# -----------------------------------------------------------------------------
73echo 'Download adolc to build/external and install it to build/prefix'
74version='2.4.1'
75web_page="http://www.coin-or.org/download/source/ADOL-C"
76prefix=`pwd`'/build/prefix'
77# --------------------------------------------------------------------------
78if [ -e /usr/lib64 ]
79then
80        libdir='lib64'
81else
82        libdir='lib'
83fi
84# -----------------------------------------------------------------------------
85if [ ! -d build/external ]
86then
87        echo_eval mkdir -p build/external
88fi
89echo_eval cd build/external
90# -----------------------------------------------------------------------------
91if [ ! -e "ADOL-C-$version.tgz" ]
92then
93        echo_eval wget --no-check-certificate $web_page/ADOL-C-$version.tgz
94fi
95# -----------------------------------------------------------------------------
96if [ -e "$prefix/include/adolc" ]
97then
98        echo_eval rm -r "$prefix/include/adolc"
99fi
100# -----------------------------------------------------------------------------
101if [ ! -e ADOL-C-$version ]
102then
103        echo_eval tar -xzf ADOL-C-$version.tgz
104fi
105echo_eval cd ADOL-C-$version
106# -----------------------------------------------------------------------------
107if [ ! -e build ]
108then
109        echo_eval mkdir build
110fi
111echo_eval cd build
112# -----------------------------------------------------------------------------
113flags="--prefix=$prefix --with-colpack=$prefix --libdir=$prefix/$libdir"
114#
115echo "../configure $flags" 
116../configure $flags
117#
118echo "make install"
119make install
120# -----------------------------------------------------------------------------
121echo "get_adolc: OK"
Note: See TracBrowser for help on using the repository browser.