1998-08-11 16:38:09 +08:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
|
|
|
# Update a local CVS tree from the egcs repository, with an emphasis
|
|
|
|
# on treating generated files correctly, so that autoconf, bison et
|
|
|
|
# al are not required for the ``end'' user.
|
|
|
|
#
|
1998-08-11 17:04:53 +08:00
|
|
|
# By default all command-line options are passed to `cvs update` in
|
|
|
|
# addition to $UPDATE_OPTIONS (defined below). If the first parameter
|
|
|
|
# reads --nostdflags, $UPDATE_OPTIONS as well as this parameter itself
|
|
|
|
# are omitted.
|
|
|
|
#
|
|
|
|
# Examples:
|
|
|
|
#
|
|
|
|
# contrib/egcs_update -r egcs_latest_snapshot
|
|
|
|
# contrib/egcs_update -A
|
|
|
|
# contrib/egcs_update --nostdflags -P -r egcs_1_1_branch gcc/testsuite
|
|
|
|
#
|
1998-08-12 19:02:37 +08:00
|
|
|
#
|
|
|
|
# (C) 1998 Free Software Foundation
|
|
|
|
# Originally by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>, August 1998.
|
|
|
|
#
|
|
|
|
# This script is Free Software, and it can be copied, distributed and
|
|
|
|
# modified as defined in the GNU General Public License. A copy of
|
|
|
|
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
|
|
|
|
|
1998-08-11 16:38:09 +08:00
|
|
|
|
|
|
|
UPDATE_OPTIONS=-P
|
|
|
|
# Add -d to create any directories that exist in the repository but not
|
|
|
|
# locally.
|
|
|
|
# Add -A to reset any sticky tags, dates, or `-k' options.
|
|
|
|
|
|
|
|
|
|
|
|
echo "Current directory is `pwd`."
|
|
|
|
|
|
|
|
# First of all, check whether this indeed looks like a local CVS of egcs.
|
|
|
|
if [ ! -d CVS ] || [ ! -f gcc/version.c ]; then
|
|
|
|
echo "This does not seem to be an egcs CVS tree!"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
1998-08-11 17:04:53 +08:00
|
|
|
# Check command-line options
|
|
|
|
|
|
|
|
if [ x"${1}"x = x"--nostdflags"x ]; then
|
|
|
|
shift
|
|
|
|
else
|
|
|
|
set -- $UPDATE_OPTIONS ${1+"$@"}
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
1998-08-11 16:38:09 +08:00
|
|
|
echo "Pass 1: Updating autoconf and bison generated files"
|
1998-09-03 16:12:30 +08:00
|
|
|
# Do a CVS update on those files that exist in CVS directories. libg++
|
|
|
|
# makes sense to drop into the tree, but it isn't CVS-controlled.
|
|
|
|
for i in `find . -name configure.in -o -name '*.y'`
|
|
|
|
do
|
|
|
|
D=`dirname $i`/CVS
|
|
|
|
[ -f $i -a -d $D ] && echo $i
|
|
|
|
done | xargs cvs -q update
|
|
|
|
|
1998-08-11 16:38:09 +08:00
|
|
|
|
|
|
|
echo "Pass 2: Updating full tree"
|
1998-08-11 17:04:53 +08:00
|
|
|
cvs -q update ${1+"$@"}
|
1998-08-11 16:38:09 +08:00
|
|
|
|
|
|
|
echo "Pass 3: Fixing local tree"
|
|
|
|
touch `find . -name configure -print`
|
|
|
|
touch `find texinfo -name Makefile.in -print`
|
|
|
|
touch `find texinfo -name \*.pot -print`
|
|
|
|
touch `find texinfo -name \*.gmo -print`
|
|
|
|
for f in gcc/c-parse.y \
|
|
|
|
gcc/cstamp-h.in \
|
|
|
|
gcc/c-gperf.h \
|
|
|
|
gcc/c-parse.c \
|
|
|
|
gcc/c-parse.h \
|
|
|
|
gcc/cexp.c \
|
|
|
|
gcc/cp/parse.c \
|
|
|
|
gcc/cp/parse.h \
|
|
|
|
gcc/objc/objc-parse.c \
|
|
|
|
gcc/objc/objc-parse.y \
|
1998-09-16 21:16:27 +08:00
|
|
|
gcc/java/parse.h \
|
1998-10-30 07:40:27 +08:00
|
|
|
gcc/java/parse.c \
|
|
|
|
gcc/java/parse-scan.c \
|
1998-09-22 15:28:05 +08:00
|
|
|
libf2c/libU77/stamp-h.in \
|
|
|
|
contrib/fixinc/fixincl.x \
|
|
|
|
contrib/fixinc/inclhack.sh \
|
1998-10-16 15:39:32 +08:00
|
|
|
contrib/fixinc/fixincl.sh \
|
|
|
|
gcc/fixinc/fixincl.x \
|
|
|
|
gcc/fixinc/inclhack.sh \
|
|
|
|
gcc/fixinc/fixincl.sh
|
1998-08-11 16:38:09 +08:00
|
|
|
do
|
|
|
|
touch $f
|
|
|
|
done
|