summaryrefslogtreecommitdiffstats
path: root/tests/rpath-3_b
blob: 875ff24f250a7d8ebc862c01a8fe478e3f938a2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Common portion of all rpath-3?b? tests.

tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15

builddir=`pwd`
global_top_srcdir=`cd "$top_srcdir" && pwd`
export global_top_srcdir

tmpfiles="$tmpfiles $rp-prefix1"
rm -rf $rp-prefix1
mkdir $rp-prefix1

tmpfiles="$tmpfiles $rp-prefix2"
rm -rf $rp-prefix2
mkdir $rp-prefix2

tmpfiles="$tmpfiles $rp-prefix3"
rm -rf $rp-prefix3
mkdir $rp-prefix3

tmpfiles="$tmpfiles $rp-prefix"
rm -rf $rp-prefix
mkdir $rp-prefix

tmpfiles="$tmpfiles $rp-build1"
rm -rf $rp-build1
mkdir $rp-build1
(cd $top_srcdir/tests/rpathx && tar cf - *) | (cd $rp-build1 && tar xf -)
(cd $rp-build1
 ${CONFIG_SHELL-/bin/sh} ./configure $build1_configure_flags --prefix=$builddir/$rp-prefix1 > configure.log 2>&1
 make > make.log 2>&1
 make install > install.log 2>&1
)
if test $remove_la = yes; then
  rm -f $rp-prefix1/lib/librpathx.la
fi

tmpfiles="$tmpfiles $rp-build2"
rm -rf $rp-build2
mkdir $rp-build2
(cd $top_srcdir/tests/rpathy && tar cf - *) | (cd $rp-build2 && tar xf -)
(cd $rp-build2
 ${CONFIG_SHELL-/bin/sh} ./configure $build2_configure_flags --prefix=$builddir/$rp-prefix2 --with-librpathx-prefix=$builddir/$rp-prefix1 > configure.log 2>&1
 make > make.log 2>&1
 make install > install.log 2>&1
)
if test $remove_la = yes; then
  rm -f $rp-prefix2/lib/librpathy.la
fi

tmpfiles="$tmpfiles $rp-build3"
rm -rf $rp-build3
mkdir $rp-build3
(cd $top_srcdir/tests/rpathz && tar cf - *) | (cd $rp-build3 && tar xf -)
(cd $rp-build3
 ${CONFIG_SHELL-/bin/sh} ./configure $build3_configure_flags --prefix=$builddir/$rp-prefix3 --with-librpathx-prefix=$builddir/$rp-prefix1 --with-librpathy-prefix=$builddir/$rp-prefix2 > configure.log 2>&1
 make > make.log 2>&1
 make install > install.log 2>&1
)
if test $remove_la = yes; then
  rm -f $rp-prefix3/lib/librpathz.la
fi

tmpfiles="$tmpfiles $rp-build4"
rm -rf $rp-build4
mkdir $rp-build4
(cd $top_srcdir/tests/$build4_package && tar cf - *) | (cd $rp-build4 && tar xf -)
(cd $rp-build4
 if test $remove_la = yes; then
   build4_configure_flags="--with-librpathx-prefix=$builddir/$rp-prefix1 --with-librpathy-prefix=$builddir/$rp-prefix2"
 else
   build4_configure_flags=
 fi
 ${CONFIG_SHELL-/bin/sh} ./configure --prefix=$builddir/$rp-prefix --with-librpathz-prefix=$builddir/$rp-prefix3 $build4_configure_flags > configure.log 2>&1
 make > make.log 2>&1
 make check >> make.log
)
result=$?

rm -rf $tmpfiles

exit $result