recognize DOS paths as absolute
authorTom Tromey <tromey@redhat.com>
Fri, 17 Jul 1998 22:00:24 +0000 (22:00 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 17 Jul 1998 22:00:24 +0000 (22:00 +0000)
ChangeLog
automake.in
lib/ylwrap
ylwrap

index c85a3f9..d87842f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Fri Jul 17 12:56:14 1998  Tom Tromey  <tromey@cygnus.com>
+
+       * automake.in (scan_dependency_file): Recognize DOS-style paths as
+       absolute.
+       * ylwrap: Recognize DOS-style paths as absolute.  From Ian Lance
+       Taylor.
+
 Fri Jul 17 07:37:20 1998  H.J. Lu  (hjl@gnu.org)
 
        * ylwrap: Don't use absolute path if the input is in the
index 0ebdd96..a957bf0 100755 (executable)
@@ -2783,7 +2783,7 @@ sub scan_dependency_file
                ($xform = $one_dep) =~ s/^$srcdir_rx/$rewrite_builddir/;
                push (@dependencies, $xform);
            }
-           elsif ($one_dep =~ /^\//)
+           elsif ($one_dep =~ /^\// || $one_dep =~ /^[A-Za-z]:\\/)
            {
                # Absolute path; ignore.
            }
index 93bfecd..13fc38d 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # ylwrap - wrapper for lex/yacc invocations.
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -31,7 +31,7 @@ prog="$1"
 shift
 # Make any relative path in $prog absolute.
 case "$prog" in
- /*) ;;
+ /* | [A-Za-z]:\\*) ;;
  */*) prog="`pwd`/$prog" ;;
 esac
 
@@ -39,7 +39,7 @@ esac
 input="$1"
 shift
 case "$input" in
- /*)
+ /* | [A-Za-z]:\\*)
     # Absolute path; do nothing.
     ;;
  *)
@@ -75,7 +75,7 @@ mkdir $dirname || exit 1
 
 cd $dirname
 case "$input" in
- /*)
+ /* | [A-Za-z]:\\*)
     # Absolute path; do nothing.
     ;;
  *)
@@ -95,7 +95,7 @@ if test $status -eq 0; then
          # If $2 is an absolute path name, then just use that,
          # otherwise prepend `../'.
          case "$2" in
-          /*) target="$2";;
+          /* | [A-Za-z]:\\*) target="$2";;
           *) target="../$2";;
         esac
         mv "$1" "$target" || status=$?
diff --git a/ylwrap b/ylwrap
index 93bfecd..13fc38d 100755 (executable)
--- a/ylwrap
+++ b/ylwrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # ylwrap - wrapper for lex/yacc invocations.
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -31,7 +31,7 @@ prog="$1"
 shift
 # Make any relative path in $prog absolute.
 case "$prog" in
- /*) ;;
+ /* | [A-Za-z]:\\*) ;;
  */*) prog="`pwd`/$prog" ;;
 esac
 
@@ -39,7 +39,7 @@ esac
 input="$1"
 shift
 case "$input" in
- /*)
+ /* | [A-Za-z]:\\*)
     # Absolute path; do nothing.
     ;;
  *)
@@ -75,7 +75,7 @@ mkdir $dirname || exit 1
 
 cd $dirname
 case "$input" in
- /*)
+ /* | [A-Za-z]:\\*)
     # Absolute path; do nothing.
     ;;
  *)
@@ -95,7 +95,7 @@ if test $status -eq 0; then
          # If $2 is an absolute path name, then just use that,
          # otherwise prepend `../'.
          case "$2" in
-          /*) target="$2";;
+          /* | [A-Za-z]:\\*) target="$2";;
           *) target="../$2";;
         esac
         mv "$1" "$target" || status=$?