1#!/bin/sh
2#
3#    install in build-tree script.
4#
5#    Copyright (C) 2010, Cisco Systems Inc.
6#
7#    This program is free software; you can redistribute it and/or modify
8#    it under the terms of the GNU General Public License as published by
9#    the Free Software Foundation; either version 2 of the License, or
10#    (at your option) any later version.
11#
12#    This program is distributed in the hope that it will be useful,
13#    but WITHOUT ANY WARRANTY; without even the implied warranty of
14#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15#    GNU General Public License for more details.
16#
17#    You should have received a copy of the GNU General Public License along
18#    with this program; if not, write to the Free Software Foundation, Inc.,
19#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20#
21# Ngie Cooper, January 2010
22
23export PATH="${0%/*}:$PATH"
24
25set -e
26. build_test_function.sh
27
28# 0. Setup the environment.
29setup_env "Install in build tree"
30# 1. Pull the SCM.
31pull_scm git "$tmp_srcdir"
32# 2. Pre-configure clean sanity.
33# i.   Is srcdir still there (should be)?
34clean_is_sane
35[ -d "$srcdir" ]
36# 3. Configure.
37configure "$srcdir" "$srcdir" "$srcdir"
38# 4. -->> Compile in-build-tree. <<--
39build
40# 5. -->> Install in-build-tree. <<--
41install_ltp
42# 6. Test.
43test_ltp
44# 7. Post-test clean sanity.
45# i.   Is srcdir still there (should be)?
46clean_is_sane
47[ -d "$srcdir" ]
48