summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/fixproto
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-02-01 18:16:02 +0000
committerobrien <obrien@FreeBSD.org>2002-02-01 18:16:02 +0000
commitc9ab9ae440a8066b2c2b85b157b1fdadcf09916a (patch)
tree086d9d6c8fbd4fc8fe4495059332f66bc0f8d12b /contrib/gcc/fixproto
parent2ecfd8bd04b63f335c1ec6295740a4bfd97a4fa6 (diff)
downloadFreeBSD-src-c9ab9ae440a8066b2c2b85b157b1fdadcf09916a.zip
FreeBSD-src-c9ab9ae440a8066b2c2b85b157b1fdadcf09916a.tar.gz
Enlist the FreeBSD-CURRENT users as testers of what is to become Gcc 3.1.0.
These bits are taken from the FSF anoncvs repo on 1-Feb-2002 08:20 PST.
Diffstat (limited to 'contrib/gcc/fixproto')
-rwxr-xr-xcontrib/gcc/fixproto58
1 files changed, 37 insertions, 21 deletions
diff --git a/contrib/gcc/fixproto b/contrib/gcc/fixproto
index 9e02211..3d65cbb 100755
--- a/contrib/gcc/fixproto
+++ b/contrib/gcc/fixproto
@@ -5,25 +5,25 @@
#
# COPYRIGHT
# Copyright (C) 1993, 1994, 1997, 1998 Free Software Foundation, Inc.
-# This file is part of GNU CC.
+# This file is part of GCC.
#
-# GNU CC is free software; you can redistribute it and/or modify
+# GCC is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
-# GNU CC is distributed in the hope that it will be useful,
+# GCC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with GNU CC; see the file COPYING. If not, write to
+# along with GCC; see the file COPYING. If not, write to
# the Free Software Foundation, 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# DESCRIPTION
-# Adjunct script for GNU CC to populate a directory with ANSI,
+# Adjunct script for GCC to populate a directory with ANSI,
# Posix.1, and C++ compatible header files.
#
# Each file found under SOURCE-DIR-ALL is analyzed and "fixed."
@@ -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\'
@@ -264,6 +273,7 @@ for code in ALL STD ; do
then true
else
$FIX_HEADER $rel_source_file $abs_source_file $abs_target_file ${DEFINES} $include_path
+ if test $? != 0 ; then exit 1 ; fi
echo "${rel_source_file}" >>fixproto.list
fi
done
@@ -299,7 +309,13 @@ EOF
#endif /* __${rel_source_ident} */
EOF
${FIX_HEADER} $rel_source_file tmp.h $abs_target_dir/$rel_source_file ${DEFINES} $include_path
- rm tmp.h
+ if test $? != 0 ; then exit 1 ; fi
+ if test -f $abs_target_dir/$rel_source_file
+ then
+ rm tmp.h
+ else
+ mv tmp.h $abs_target_dir/$rel_source_file
+ fi
fi
done
OpenPOWER on IntegriCloud