aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2016-05-20 16:02:42 +0300
committerseyko <seyko2@gmail.com>2016-05-20 16:02:42 +0300
commitbab4519617f9796990eee325925adb98ab635997 (patch)
treeb05c980eb16dcaac3d2ba16b9de863421337d52b /configure
parentd0e48c51c769dc84dc3ed8c4a1b5b07360faa818 (diff)
downloadtinycc-bab4519617f9796990eee325925adb98ab635997.tar.gz
tinycc-bab4519617f9796990eee325925adb98ab635997.tar.bz2
Allow to perform tests from the custom build dir:
mkdir build; cd build ../configure --prefix=./package make make test make install
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure23
1 files changed, 8 insertions, 15 deletions
diff --git a/configure b/configure
index d606521..5e467b6 100755
--- a/configure
+++ b/configure
@@ -596,24 +596,17 @@ rm -f $TMPN* $CONFTEST
fn_makelink()
{
- tgt=$1/$2
- case $2 in
- */*) dn=${2%/*}
- test -d $dn || mkdir -p $dn
- case $1 in
- /*) ;;
- *) while test $dn ; do
- tgt=../$tgt; dn=${dn#${dn%%/*}}; dn=${dn#/}
- done
- ;;
- esac
- ;;
- esac
- ln -sfn $tgt $2
+ SRCDIR=$(realpath $1)
+ DIR=$(dirname $2)
+ FILE=$(basename $2)
+ if test ! -d "$DIR"; then
+ mkdir -p "$DIR"
+ fi
+ ln -s $SRCDIR/$DIR/$FILE $DIR/
}
if test "$source_path_used" = "yes" ; then
- FILES="Makefile lib/Makefile tests/Makefile tests/tests2/Makefile"
+ FILES="Makefile lib/Makefile tests/Makefile tests/tests2/* tests/pp/* tests/exsymtab/*"
for f in $FILES ; do
fn_makelink $source_path $f
done