diff options
| author | Akim Demaille <akim@lrde.epita.fr> | 2012-12-21 13:55:26 +0100 |
|---|---|---|
| committer | Akim Demaille <akim@lrde.epita.fr> | 2012-12-21 13:57:22 +0100 |
| commit | 017bbbfee11b6b9ed615bb0e176f29e38b696f6f (patch) | |
| tree | 9d4e4e48ddd00ebdc57f891d09ddef128463dcbb /configure | |
| parent | d7264e02186d302cb55ac7b7f06bf9efb92bc46d (diff) | |
| download | tinycc-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-x | configure | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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 |
