diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-11 15:20:10 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-11 15:20:10 +0000 |
commit | e31f0c034862830369b5b3dde02954b02ffdbb8e (patch) | |
tree | eb779ea18aad2cd16fd36109dac5ac9e6e3d5af8 /gcc/fixproto | |
parent | 287d2cfb0a4443096ea7cbca69659f4b3c9608c9 (diff) | |
download | gcc-e31f0c034862830369b5b3dde02954b02ffdbb8e.tar.gz |
* fixproto: Recognize DOS paths with drive letters as absolute paths.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35636 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixproto')
-rwxr-xr-x | gcc/fixproto | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/gcc/fixproto b/gcc/fixproto index c2c82552a4b..1db488cec7a 100755 --- a/gcc/fixproto +++ b/gcc/fixproto @@ -90,11 +90,14 @@ src_dir_all=$2 # "standard" ANSI/POSIX files listed in $std_files are processed. src_dir_std=$3 -if [ `expr $rel_target_dir : '\(.\)'` != '/' ] ; then - abs_target_dir=$original_dir/$rel_target_dir -else - abs_target_dir=$rel_target_dir -fi +case $rel_target_dir in + /* | [A-Za-z]:[\\/]*) + abs_target_dir=$rel_target_dir + ;; + *) + abs_target_dir=$original_dir/$rel_target_dir + ;; +esac # Determine whether this system has symbolic links. if ln -s X $rel_target_dir/ShouldNotExist 2>/dev/null; then @@ -118,11 +121,14 @@ include_path="" if [ `echo $* | wc -w` != 0 ] ; then for rel_source_dir in $src_dir_all $src_dir_std; do - if [ `expr $rel_source_dir : '\(.\)'` != '/' ] ; then - abs_source_dir=$original_dir/$rel_source_dir - else - abs_source_dir=$rel_source_dir - fi + case $rel_source_dir in + /* | [A-Za-z]:[\\/]*) + abs_source_dir=$rel_source_dir + ;; + *) + abs_source_dir=$original_dir/$rel_source_dir + ;; + esac include_path="$include_path -I$abs_source_dir" done fi @@ -175,11 +181,14 @@ for code in ALL STD ; do ;; esac - if [ `expr $rel_source_dir : '\(.\)'` != '/' ] ; then - abs_source_dir=$original_dir/$rel_source_dir - else - abs_source_dir=$rel_source_dir - fi + case $rel_source_dir in + /* | [A-Za-z]:[\\/]*) + abs_source_dir=$rel_source_dir + ;; + *) + abs_source_dir=$original_dir/$rel_source_dir + ;; + esac if [ \! -d $abs_source_dir ] ; then echo $progname\: warning\: no such directory\: \`$rel_source_dir\' |