From: Gary V. Vaughan Date: Mon, 14 Nov 2011 10:15:39 +0000 (+0700) Subject: general.m4sh: relative path to the same directory is `.'. X-Git-Tag: v2.4.2.418~276 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65f9e9a2e5b1005ef949da3510bad4d582cee9d5;p=thirdparty%2Flibtool.git general.m4sh: relative path to the same directory is `.'. * general.m4sh (func_relative_path): We sometimes want to use the result of this function directly, rather than purely as a prefix, so we need to return `.' when both directories end up at the same location. Signed-off-by: Gary V. Vaughan --- diff --git a/libltdl/config/general.m4sh b/libltdl/config/general.m4sh index f1ee6e5cf..b6e3d4193 100644 --- a/libltdl/config/general.m4sh +++ b/libltdl/config/general.m4sh @@ -271,12 +271,13 @@ func_relative_path () func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi - # Normalisation. If bindir is libdir, return empty string, - # else relative path. + # Normalisation. If bindir is libdir, return `.' else relative path. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi + + test -n "$func_relative_path_result" || func_relative_path_result=. } # The name of this program: