From 5a46d6e5c1f3bf5165c45f903f39e00ccd2492a2 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sun, 1 Nov 2009 11:41:34 +0100 Subject: [PATCH] Fix func_normal_abspath sed script for Solaris. * libltdl/config/general.m4sh (pathcar, pathcdr, removedotparts) (collapseslashes, finalslash): Use single quotes, for clarity. (removedotparts): Avoid \{N,M\} after subexpression \(...\), for Solaris /bin/sed. Signed-off-by: Ralf Wildenhues --- ChangeLog | 6 ++++++ libltdl/config/general.m4sh | 13 ++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 61bc746bd..caf125a5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-11-01 Ralf Wildenhues + Fix func_normal_abspath sed script for Solaris. + * libltdl/config/general.m4sh (pathcar, pathcdr, removedotparts) + (collapseslashes, finalslash): Use single quotes, for clarity. + (removedotparts): Avoid \{N,M\} after subexpression \(...\), for + Solaris /bin/sed. + Improve versioning algorithm documentation. * doc/libtool.texi (Updating version info): Repeat the algorithms in different, hopefully simpler terms. diff --git a/libltdl/config/general.m4sh b/libltdl/config/general.m4sh index 53fafbadf..fcf75e945 100644 --- a/libltdl/config/general.m4sh +++ b/libltdl/config/general.m4sh @@ -101,11 +101,14 @@ func_dirname_and_basename () # Generated shell functions inserted here. # These SED scripts presuppose an absolute path with a trailing slash. -pathcar="s,^/\([^/]*\).*$,\1," -pathcdr="s,^/[^/]*,," -removedotparts="s@/\(\./\)\{1,\}@/@g;s,/\.$,/," -collapseslashes="s@/\{1,\}@/@g" -finalslash="s,/*$,/," +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, -- 2.47.3