From: Gary V. Vaughan Date: Fri, 11 Nov 2011 03:06:20 +0000 (+0700) Subject: ltmain.sh: append relative path trailing slashes explicitly. X-Git-Tag: v2.4.2.418~277 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f5df1ceef1653a0c9a86edcb277a6a4c99d9364;p=thirdparty%2Flibtool.git ltmain.sh: append relative path trailing slashes explicitly. 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 --- diff --git a/libltdl/config/general.m4sh b/libltdl/config/general.m4sh index 40d541381..f1ee6e5cf 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 ca67c8a7b..24491a9f2 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