3 # Update a local CVS tree from the egcs repository, with an emphasis
4 # on treating generated files correctly, so that autoconf, bison et
5 # al are not required for the ``end'' user.
7 # By default all command-line options are passed to `cvs update` in
8 # addition to $UPDATE_OPTIONS (defined below). If the first parameter
9 # reads --nostdflags, $UPDATE_OPTIONS as well as this parameter itself
14 # contrib/egcs_update -r egcs_latest_snapshot
15 # contrib/egcs_update -A
16 # contrib/egcs_update --nostdflags -P -r egcs_1_1_branch gcc/testsuite
19 # (C) 1998 Free Software Foundation
20 # Originally by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>, August 1998.
22 # This script is Free Software, and it can be copied, distributed and
23 # modified as defined in the GNU General Public License. A copy of
24 # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
28 # Add -d to create any directories that exist in the repository but not
30 # Add -A to reset any sticky tags, dates, or `-k' options.
33 echo "Current directory is `pwd`."
35 # First of all, check whether this indeed looks like a local CVS of egcs.
36 if [ ! -d CVS
] ||
[ ! -f gcc
/version.c
]; then
37 echo "This does not seem to be an egcs CVS tree!"
41 # Check command-line options
43 if [ x
"${1}"x
= x
"--nostdflags"x
]; then
46 set -- $UPDATE_OPTIONS ${1+"$@"}
50 echo "Pass 1: Updating autoconf and bison generated files"
51 # Do a CVS update on those files that exist in CVS directories. libg++
52 # makes sense to drop into the tree, but it isn't CVS-controlled.
53 X
=`for i in \`find .
-name configure.
in -o -name '*.y'\
`
56 if [ -f $i -a -d $D ]; then
62 echo "CVS update of generated files failed." >&2
67 echo "Pass 2: Updating full tree"
68 cvs
-q update
${1+"$@"}
70 echo "CVS update of full tree failed." >&2
74 echo "Pass 3: Fixing local tree"
75 # Please also update the FAQ accordingly if you change the list of
76 # files below. Note that generated files should be touched only
77 # after the corresponding *.y files.
78 touch `find . -name configure -print`
79 touch `find texinfo -name Makefile.in -print`
80 touch `find texinfo -name \*.pot -print`
81 touch `find texinfo -name \*.gmo -print`
82 for f
in gcc
/c-parse.y \
90 gcc
/objc
/objc-parse.y \
91 gcc
/objc
/objc-parse.c \
94 gcc
/java
/parse-scan.c \
95 libf2c
/libU77
/stamp-h.
in \
96 contrib
/fixinc
/fixincl.x \
97 contrib
/fixinc
/inclhack.sh \
98 contrib
/fixinc
/fixincl.sh \
99 gcc
/fixinc
/fixincl.x \
100 gcc
/fixinc
/inclhack.sh \
101 gcc
/fixinc
/fixincl.sh