libtool-patches
[Top][All Lists]
Advanced

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

FYI: [PATCH] general.m4sh: relative path to the same directory is `.'.


From: Gary V. Vaughan
Subject: FYI: [PATCH] general.m4sh: relative path to the same directory is `.'.
Date: Mon, 14 Nov 2011 17:45:32 +0700

Another small refactoring to enable upcoming changesets.

Applied as obvious.

* 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 <address@hidden>
---
 libltdl/config/general.m4sh |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libltdl/config/general.m4sh b/libltdl/config/general.m4sh
index f1ee6e5..b6e3d41 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:
-- 
1.7.7.3




reply via email to

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