summaryrefslogtreecommitdiff
path: root/contrib/egcs_update
blob: 7a0f69e01f1776f9e5fc79f9dab29e1e38d6af46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#! /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.
#
# 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
#
#
# (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


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

# Check command-line options

if [ x"${1}"x = x"--nostdflags"x ]; then
    shift
else
    set -- $UPDATE_OPTIONS ${1+"$@"}
fi


echo "Pass 1: Updating autoconf and bison generated files"
# 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.
X=`for i in \`find . -name configure.in -o -name '*.y'\`
do
    D=\`dirname $i\`/CVS
    if [ -f $i -a -d $D ]; then 
        echo $i
    fi
done`
cvs -q update $X


echo "Pass 2: Updating full tree"
cvs -q update ${1+"$@"}

echo "Pass 3: Fixing local tree"
# Please also update the FAQ accordingly if you change the list of
# files below. Note that generated files should be touched only
# after the corresponding *.y files.
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/c-parse.h \
	 gcc/c-parse.c \
	 gcc/cstamp-h.in \
	 gcc/c-gperf.h \
	 gcc/cexp.c \
	 gcc/cp/parse.c \
	 gcc/cp/parse.h \
	 gcc/objc/objc-parse.y \
	 gcc/objc/objc-parse.c \
	 gcc/java/parse.h \
	 gcc/java/parse.c \
	 gcc/java/parse-scan.c \
	 libf2c/libU77/stamp-h.in \
	 contrib/fixinc/fixincl.x \
	 contrib/fixinc/inclhack.sh \
	 contrib/fixinc/fixincl.sh \
	 gcc/fixinc/fixincl.x \
	 gcc/fixinc/inclhack.sh \
	 gcc/fixinc/fixincl.sh
do
	if [ -f $f ]; then
		touch $f
	fi
done