]> sourceware.org Git - automake.git/commitdiff
2001-07-01 Tim Van Holder <tim.van.holder@pandora.be>
authorTom Tromey <tromey@redhat.com>
Sun, 1 Jul 2001 23:46:00 +0000 (23:46 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 1 Jul 2001 23:46:00 +0000 (23:46 +0000)
* lib/ylwrap: Improve support for DOS paths (and paths
containing backslashes in general).

ChangeLog
lib/ylwrap

index 5a4b133ced95a3d7394377c997a6fe8cd193156c..5ee02b23eb752acd663601f3e347d16ce9a1cffc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-07-01  Tim Van Holder  <tim.van.holder@pandora.be>
+
+       * lib/ylwrap: Improve support for DOS paths (and paths
+       containing backslashes in general).
+
 2001-07-01  Tom Tromey  <tromey@redhat.com>
 
        * lib/missing: Added special exception to license.
index f87c55ebd91c567e0f4d61b7f88802bc824af93f..d9e07bca0f497db4c1c2f5467920d5ca74629258 100755 (executable)
@@ -30,7 +30,7 @@
 input="$1"
 shift
 case "$input" in
/* | [A-Za-z]:*)
[\\/]* | ?:[\\/]*)
     # Absolute path; do nothing.
     ;;
  *)
@@ -40,10 +40,10 @@ case "$input" in
 esac
 
 # The directory holding the input.
-input_dir="`echo $input | sed -e 's,/[^/]*$,,'`"
+input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
 # Quote $INPUT_DIR so we can use it in a regexp.
-# FIXME: really we should care about more than `.'.
-input_rx="`echo $input_dir | sed -e 's,\.,\\\.,g'`"
+# FIXME: really we should care about more than `.' and `\'.
+input_rx=`echo "$input_dir" | sed -e 's,\\\\,\\\\\\\\,g' -e 's,\\.,\\\\.,g'`
 
 echo "got $input_rx"
 
@@ -62,8 +62,8 @@ prog="$1"
 shift
 # Make any relative path in $prog absolute.
 case "$prog" in
/* | [A-Za-z]:*) ;;
- */*) prog="`pwd`/$prog" ;;
[\\/]* | ?:[\\/]*) ;;
+ *[\\/]*) prog="`pwd`/$prog" ;;
 esac
 
 # FIXME: add hostname here for parallel makes that run commands on
@@ -105,7 +105,7 @@ if test $status -eq 0; then
          # If $2 is an absolute path name, then just use that,
          # otherwise prepend `../'.
          case "$2" in
-          /* | [A-Za-z]:*) target="$2";;
+          [\\/]* | ?:[\\/]*) target="$2";;
           *) target="../$2";;
         esac
 
This page took 0.035203 seconds and 5 git commands to generate.