Bump to 1.14.1
[platform/upstream/augeas.git] / tests / havelib / rpath-3_b
1 # Common portion of all rpath-3?b? tests.
2
3 tmpfiles=""
4 trap 'rm -fr $tmpfiles' 1 2 3 15
5
6 builddir=`pwd`
7 global_top_auxdir=`cd "$top_srcdir"/build-aux && pwd`
8 export global_top_auxdir
9
10 tstdir='tst/dir'
11 test -d $tstdir || { mkdir tst && mkdir $tstdir; }
12
13 tmpfiles="$tmpfiles $rp-prefix1"
14 rm -rf $rp-prefix1
15 mkdir $rp-prefix1
16
17 tmpfiles="$tmpfiles $rp-prefix2"
18 rm -rf $rp-prefix2
19 mkdir $rp-prefix2
20
21 tmpfiles="$tmpfiles $rp-prefix3"
22 rm -rf $rp-prefix3
23 mkdir $rp-prefix3
24
25 tmpfiles="$tmpfiles $rp-prefix"
26 rm -rf $rp-prefix
27 mkdir $rp-prefix
28
29 tmpfiles="$tmpfiles $tstdir/$rp-build1"
30 rm -rf $tstdir/$rp-build1
31 mkdir $tstdir/$rp-build1
32 (cd $srcdir/rpathx && tar cf - *) | (cd $tstdir/$rp-build1 && tar xf -)
33 (cd $tstdir/$rp-build1
34  ${CONFIG_SHELL-/bin/sh} ./configure $build1_configure_flags --prefix=$builddir/$rp-prefix1 --libdir=$builddir/$rp-prefix1/$LIBDIRSTEM > configure.log 2>&1
35  make > make.log 2>&1
36  make install > install.log 2>&1
37 )
38 if test $remove_la = yes; then
39   rm -f $rp-prefix1/lib/librpathx.la
40 fi
41
42 tmpfiles="$tmpfiles $tstdir/$rp-build2"
43 rm -rf $tstdir/$rp-build2
44 mkdir $tstdir/$rp-build2
45 (cd $srcdir/rpathy && tar cf - *) | (cd $tstdir/$rp-build2 && tar xf -)
46 (cd $tstdir/$rp-build2
47  ${CONFIG_SHELL-/bin/sh} ./configure $build2_configure_flags --prefix=$builddir/$rp-prefix2 --libdir=$builddir/$rp-prefix2/$LIBDIRSTEM --with-librpathx-prefix=$builddir/$rp-prefix1 > configure.log 2>&1
48  make > make.log 2>&1
49  make install > install.log 2>&1
50 )
51 if test $remove_la = yes; then
52   rm -f $rp-prefix2/lib/librpathy.la
53 fi
54
55 tmpfiles="$tmpfiles $tstdir/$rp-build3"
56 rm -rf $tstdir/$rp-build3
57 mkdir $tstdir/$rp-build3
58 (cd $srcdir/rpathz && tar cf - *) | (cd $tstdir/$rp-build3 && tar xf -)
59 (cd $tstdir/$rp-build3
60  ${CONFIG_SHELL-/bin/sh} ./configure $build3_configure_flags --prefix=$builddir/$rp-prefix3 --libdir=$builddir/$rp-prefix3/$LIBDIRSTEM --with-librpathx-prefix=$builddir/$rp-prefix1 --with-librpathy-prefix=$builddir/$rp-prefix2 > configure.log 2>&1
61  make > make.log 2>&1
62  make install > install.log 2>&1
63 )
64 if test $remove_la = yes; then
65   rm -f $rp-prefix3/lib/librpathz.la
66 fi
67
68 tmpfiles="$tmpfiles $tstdir/$rp-build4"
69 rm -rf $tstdir/$rp-build4
70 mkdir $tstdir/$rp-build4
71 (cd $srcdir/$build4_package && tar cf - *) | (cd $tstdir/$rp-build4 && tar xf -)
72 (cd $tstdir/$rp-build4
73  if test $remove_la = yes; then
74    build4_configure_flags="--with-librpathx-prefix=$builddir/$rp-prefix1 --with-librpathy-prefix=$builddir/$rp-prefix2"
75  else
76    build4_configure_flags=
77  fi
78  ${CONFIG_SHELL-/bin/sh} ./configure --prefix=$builddir/$rp-prefix --libdir=$builddir/$rp-prefix/$LIBDIRSTEM --with-librpathz-prefix=$builddir/$rp-prefix3 $build4_configure_flags > configure.log 2>&1
79  make > make.log 2>&1
80  make check >> make.log
81 )
82 result=$?
83
84 rm -rf $tmpfiles
85
86 exit $result