From: Tom Tromey Date: Fri, 17 Jul 1998 22:00:24 +0000 (+0000) Subject: recognize DOS paths as absolute X-Git-Tag: Release-1-3b~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a349bbaf59ba128e2ed1bef45e99c2a05df3852;p=thirdparty%2Fautomake.git recognize DOS paths as absolute --- diff --git a/ChangeLog b/ChangeLog index c85a3f9da..d87842f3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Jul 17 12:56:14 1998 Tom Tromey + + * 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 diff --git a/automake.in b/automake.in index 0ebdd9673..a957bf015 100755 --- a/automake.in +++ b/automake.in @@ -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. } diff --git a/lib/ylwrap b/lib/ylwrap index 93bfecd7b..13fc38d75 100755 --- a/lib/ylwrap +++ b/lib/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 . # # 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 93bfecd7b..13fc38d75 100755 --- 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 . # # 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=$?