aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAkim Demaille <akim@lrde.epita.fr>2012-12-21 13:55:26 +0100
committerAkim Demaille <akim@lrde.epita.fr>2012-12-21 13:57:22 +0100
commit017bbbfee11b6b9ed615bb0e176f29e38b696f6f (patch)
tree9d4e4e48ddd00ebdc57f891d09ddef128463dcbb /configure
parentd7264e02186d302cb55ac7b7f06bf9efb92bc46d (diff)
downloadtinycc-017bbbfee11b6b9ed615bb0e176f29e38b696f6f.tar.gz
tinycc-017bbbfee11b6b9ed615bb0e176f29e38b696f6f.tar.bz2
configure: support absolete out-of-tree builds
configure: handle the case of absolute paths. Reported by grishka.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 8 insertions, 3 deletions
diff --git a/configure b/configure
index 1c1497a..e4321b7 100755
--- a/configure
+++ b/configure
@@ -502,9 +502,14 @@ if test "$source_path_used" = "yes" ; then
for f in $FILES ; do
dir=`fn_dirname "$f"`
test -d "$dir" || mkdir -p "$dir"
- back=`echo "$source_path/$dir/" | sed 's,/\./,/,g;s,[^/]*/,../,g'`
- back=$back$f
- ln -sf $back $f
+ # Build a symlink $f that points to $dest, its $source_path
+ # counterpart.
+ case $source_path in
+ /*) dest=$source_path/$f;;
+ *) dest=`echo "$source_path/$dir/" | sed 's,/\./,/,g;s,[^/]*/,../,g'`
+ dest=$dest$f;;
+ esac
+ ln -sf $dest $f
done
fi
cat >>config.mak <<EOF