Home | History | Annotate | Line # | Download | only in tests
      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 test -d tstdir || mkdir tstdir
     11 
     12 tmpfiles="$tmpfiles $rp-prefix1"
     13 rm -rf $rp-prefix1
     14 mkdir $rp-prefix1
     15 
     16 tmpfiles="$tmpfiles $rp-prefix2"
     17 rm -rf $rp-prefix2
     18 mkdir $rp-prefix2
     19 
     20 tmpfiles="$tmpfiles $rp-prefix3"
     21 rm -rf $rp-prefix3
     22 mkdir $rp-prefix3
     23 
     24 tmpfiles="$tmpfiles $rp-prefix"
     25 rm -rf $rp-prefix
     26 mkdir $rp-prefix
     27 
     28 tmpfiles="$tmpfiles tstdir/$rp-build1"
     29 rm -rf tstdir/$rp-build1
     30 mkdir tstdir/$rp-build1
     31 (cd $srcdir/rpathx && tar cf - *) | (cd tstdir/$rp-build1 && tar xf -)
     32 (cd tstdir/$rp-build1
     33  ${CONFIG_SHELL-/bin/sh} ./configure $build1_configure_flags --prefix=$builddir/$rp-prefix1 --libdir=$builddir/$rp-prefix1/$LIBDIRSTEM > configure.log 2>&1
     34  make > make.log 2>&1
     35  make install > install.log 2>&1
     36 )
     37 if test $remove_la = yes; then
     38   rm -f $rp-prefix1/lib/librpathx.la
     39 fi
     40 
     41 tmpfiles="$tmpfiles tstdir/$rp-build2"
     42 rm -rf tstdir/$rp-build2
     43 mkdir tstdir/$rp-build2
     44 (cd $srcdir/rpathy && tar cf - *) | (cd tstdir/$rp-build2 && tar xf -)
     45 (cd tstdir/$rp-build2
     46  ${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
     47  make > make.log 2>&1
     48  make install > install.log 2>&1
     49 )
     50 if test $remove_la = yes; then
     51   rm -f $rp-prefix2/lib/librpathy.la
     52 fi
     53 
     54 tmpfiles="$tmpfiles tstdir/$rp-build3"
     55 rm -rf tstdir/$rp-build3
     56 mkdir tstdir/$rp-build3
     57 (cd $srcdir/rpathz && tar cf - *) | (cd tstdir/$rp-build3 && tar xf -)
     58 (cd tstdir/$rp-build3
     59  ${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
     60  make > make.log 2>&1
     61  make install > install.log 2>&1
     62 )
     63 if test $remove_la = yes; then
     64   rm -f $rp-prefix3/lib/librpathz.la
     65 fi
     66 
     67 tmpfiles="$tmpfiles tstdir/$rp-build4"
     68 rm -rf tstdir/$rp-build4
     69 mkdir tstdir/$rp-build4
     70 (cd $srcdir/$build4_package && tar cf - *) | (cd tstdir/$rp-build4 && tar xf -)
     71 (cd tstdir/$rp-build4
     72  if test $remove_la = yes; then
     73    build4_configure_flags="--with-librpathx-prefix=$builddir/$rp-prefix1 --with-librpathy-prefix=$builddir/$rp-prefix2"
     74  else
     75    build4_configure_flags=
     76  fi
     77  ${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
     78  make > make.log 2>&1
     79  make check >> make.log
     80 )
     81 result=$?
     82 
     83 rm -rf $tmpfiles
     84 
     85 exit $result
     86