]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
ltmain.sh: append relative path trailing slashes explicitly.
authorGary V. Vaughan <gary@gnu.org>
Fri, 11 Nov 2011 03:06:20 +0000 (10:06 +0700)
committerGary V. Vaughan <gary@gnu.org>
Mon, 14 Nov 2011 10:11:19 +0000 (17:11 +0700)
In addition to being more idiomatic, and hence minimising
suprises, seeing the slash written explicity when appending to
the result of a relative path calculation is a lot more
readable.
* libltdl/config/general.m4sh (func_relative_path): Don't append
an implicit trailing slash...
* libltdl/config/ltmain.m4sh (func_mode_link): ...write it
explicitly at the time of use.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
libltdl/config/general.m4sh
libltdl/config/ltmain.m4sh

index 40d5413818e06f02bcef54880f45986cb84a8476..f1ee6e5cf29deac02ddca296b6f2956fd74b2e7b 100644 (file)
@@ -221,9 +221,7 @@ func_normal_abspath ()
 }
 
 # func_relative_path SRCDIR DSTDIR
-# generates a relative path from SRCDIR to DSTDIR, with a trailing
-# slash if non-empty, suitable for immediately appending a filename
-# without needing to append a separator.
+# generates a relative path from SRCDIR to DSTDIR.
 #             value returned in "$func_relative_path_result"
 func_relative_path ()
 {
@@ -274,10 +272,9 @@ func_relative_path ()
   fi
 
   # Normalisation. If bindir is libdir, return empty string,
-  # else relative path ending with a slash; either way, target
-  # file name can be directly appended.
+  # else relative path.
   if test ! -z "$func_relative_path_result"; then
-    func_stripname './' '' "$func_relative_path_result/"
+    func_stripname './' '' "$func_relative_path_result"
     func_relative_path_result=$func_stripname_result
   fi
 }
index ca67c8a7b9d11e5fd337963dfd4cd5b50def4ff7..24491a9f27d285207248ae17e212942391925217 100644 (file)
@@ -8621,7 +8621,7 @@ EOF
              if test "x$bindir" != x ;
              then
                func_relative_path "$install_libdir" "$bindir"
-               tdlname=$func_relative_path_result$dlname
+               tdlname=$func_relative_path_result/$dlname
              else
                # Otherwise fall back on heuristic.
                tdlname=../bin/$dlname