Fix out-of-tree build with relative path to root
authorThomas Preud'homme <robotux@celest.fr>
Mon, 14 Jan 2013 17:18:27 +0000 (14 18:18 +0100)
committerThomas Preud'homme <robotux@celest.fr>
Mon, 14 Jan 2013 17:18:27 +0000 (14 18:18 +0100)
Fix path of Makefile symlinks in a out-of-tree build where the root
directory of the source is given as a relative path.

configure

index e4321b7..c0c0bd9 100755 (executable)
--- a/configure
+++ b/configure
@@ -506,8 +506,8 @@ if test "$source_path_used" = "yes" ; then
         # counterpart.
         case $source_path in
           /*) dest=$source_path/$f;;
-           *) dest=`echo "$source_path/$dir/" | sed 's,/\./,/,g;s,[^/]*/,../,g'`
-              dest=$dest$f;;
+           *) dest=`echo "$dir/" | sed 's,^\./,,;s,[^/]*/,../,g'`
+              dest=$dest$source_path/$f;;
         esac
         ln -sf $dest $f
     done