libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: [PATCH] ltmain.sh: append relative path trailing slashes explicitly


From: Gary V. Vaughan
Subject: FYI: [PATCH] ltmain.sh: append relative path trailing slashes explicitly.
Date: Mon, 14 Nov 2011 17:44:09 +0700

A small refactoring necessary to enable upcoming changesets.

Applied as obvious.

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 <address@hidden>
---
 libltdl/config/general.m4sh |    9 +++------
 libltdl/config/ltmain.m4sh  |    2 +-
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/libltdl/config/general.m4sh b/libltdl/config/general.m4sh
index 40d5413..f1ee6e5 100644
--- a/libltdl/config/general.m4sh
+++ b/libltdl/config/general.m4sh
@@ -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
 }
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index ca67c8a..24491a9 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -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
-- 
1.7.7.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]