source: trunk/third/gcc/contrib/snapshot @ 16960

Revision 16960, 6.7 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r16959, which included commits to RCS files with non-trunk default branches.
  • Property svn:executable set to *
Line 
1#! /bin/csh
2#
3# GCC snapshot generation script.
4#
5# Originally written by Jeff Law <law@redhat.com>. Most minor modifications
6# by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>.
7
8# TODO: Include the FAQ and installation instructions in the snapshot
9
10set SCRIPTDIR=/home/law/gcc
11set STATEDIR=/home/law
12set TMPDIR=/var/tmp
13
14set path = (/usr/local/bin $path)
15
16# Get somewhere useful with a lot of disk space.
17cd $TMPDIR
18
19# Get date of current and previous snapshot.
20set date=`date +%Y%m%d`
21set last_date=`cat $STATEDIR/.snapshot_date`
22set snapdir=`date +%Y-%m-%d`
23
24# Update and uncomment the following lines to run a particular snapshot pair.
25#set date=971215
26#set last_date=19990920
27
28# We run this on the cvs server itself so we can get at
29# the cvs files quickly.
30setenv CVSROOT /cvs/gcc
31
32# Get into a temporary directory so as not to be confused by
33# any existing CVS administration files.
34rm -rf $$
35mkdir $$
36cd $$
37
38# Tag the current sources for the snapshot
39cvs -z 9 -Q rtag -F gcc_ss_$date gcc
40
41# Get an exported copy of the last gcc-core module snapshot
42# arggh gcc-core doesn't work right now, so check out the whole
43# thing and remove bits we don't need.
44#zcat ~ftp/pub/gcc/snapshots/1998-05-31/gcc-$last_date.tar.gz | tar xf -
45cvs -z 9 -Q export -rgcc_ss_$last_date gcc
46cd gcc
47find . -type f -print | sort > ../files_$last_date
48~law/bin/brik -Gb -f ../files_$last_date > ../.brik_$last_date
49cp ../.brik_$last_date ./.brik
50cd ..
51rm -rf gcc/{libio,libstdc++,libstdc++-v3,libf2c,libchill,libobjc}
52rm -rf gcc/{boehm-gc,fastjar,libffi,libjava,zlib}
53rm -rf gcc/gcc/{testsuite,f,objc,cp,java,ch}
54mv gcc gcc-$last_date
55
56# Similarly for today's gcc-core module snapshot
57cvs -z 9 -Q export -rgcc_ss_$date gcc
58cd gcc
59contrib/gcc_update --touch
60find . -type f -print  | sort > ../files_$date
61~law/bin/brik -Gb -f ../files_$date > ../.brik_$date
62cp ../.brik_$date ./.brik
63cd ..
64rm -rf gcc/{libio,libstdc++,libstdc++-v3,libf2c,libchill,libobjc}
65rm -rf gcc/{boehm-gc,fastjar,libffi,libjava,zlib}
66rm -rf gcc/gcc/{testsuite,f,objc,cp,java,ch}
67mv gcc gcc-$date
68
69rm -rf files_$date
70rm -rf files_$last_date
71
72# Diff them
73diff  -Nrc3p gcc-$last_date gcc-$date > gcc-core-$last_date-$date.diff
74
75# Make the tarball for the core
76tar cf - gcc-$date | gzip --best > gcc-core-$date.tar.gz
77
78# Remove the core gunk and get the whole thing back.
79rm -rf gcc-$last_date
80rm -rf gcc-$date
81#zcat ~ftp/pub/gcc/snapshots/1998-05-31/gcc-$last_date.tar.gz | tar xf -
82cvs -z 9 -Q export -rgcc_ss_$last_date gcc
83mv gcc gcc-$last_date
84cp .brik_$last_date gcc-$last_date/.brik
85cvs -z 9 -Q export -rgcc_ss_$date gcc
86cd gcc
87contrib/gcc_update --touch
88cd ..
89mv gcc gcc-$date
90cp .brik_$date gcc-$date/.brik
91
92# We don't need this anymore.
93rm -rf .brik_$date
94rm -rf .brik_$last_date
95
96# Now make diffs for g77, g77-testsuite chill, java objc, g++, g++-testsuite,
97# testsuite, then the whole bloody thing.
98diff  -Nrc3p gcc-$last_date/gcc/f gcc-$date/gcc/f > gcc-g77-$last_date-$date.diff
99diff  -Nrc3p gcc-$last_date/libf2c gcc-$date/libf2c >> gcc-g77-$last_date-$date.diff
100
101diff  -Nrc3p gcc-$last_date/gcc/testsuite/g77.f-torture  gcc-$date/gcc/testsuite/g77.f-torture > gcc-g77-testsuite-$last_date-$date.diff
102
103diff  -Nrc3p gcc-$last_date/gcc/objc gcc-$date/gcc/objc > gcc-objc-$last_date-$date.diff
104diff  -Nrc3p gcc-$last_date/libobjc gcc-$date/libobjc >> gcc-objc-$last_date-$date.diff
105
106diff  -Nrc3p gcc-$last_date/gcc/java gcc-$date/gcc/java > gcc-java-$last_date-$date.diff
107diff  -Nrc3p gcc-$last_date/boehm-gc gcc-$date/boehm-gc >> gcc-java-$last_date-$date.diff
108diff  -Nrc3p gcc-$last_date/fastjar gcc-$date/fastjar >> gcc-java-$last_date-$date.diff
109diff  -Nrc3p gcc-$last_date/libffi gcc-$date/libffi >> gcc-java-$last_date-$date.diff
110diff  -Nrc3p gcc-$last_date/libjava gcc-$date/libjava >> gcc-java-$last_date-$date.diff
111diff  -Nrc3p gcc-$last_date/zlib gcc-$date/zlib >> gcc-java-$last_date-$date.diff
112
113diff  -Nrc3p gcc-$last_date/gcc/ch gcc-$date/gcc/ch > gcc-chill-$last_date-$date.diff
114diff  -Nrc3p gcc-$last_date/libchill gcc-$date/libchill >> gcc-chill-$last_date-$date.diff
115
116diff  -Nrc3p gcc-$last_date/gcc/cp gcc-$date/gcc/cp > gcc-g++-$last_date-$date.diff
117diff  -Nrc3p gcc-$last_date/libio gcc-$date/libio >> gcc-g++-$last_date-$date.diff
118diff  -Nrc3p gcc-$last_date/libstdc++ gcc-$date/libstdc++ >> gcc-g++-$last_date-$date.diff
119diff  -Nrc3p gcc-$last_date/libstdc++-v3 gcc-$date/libstdc++-v3 >> gcc-g++-$last_date-$date.diff
120
121diff  -Nrc3p gcc-$last_date/gcc/testsuite/g++.old-deja gcc-$date/gcc/testsuite/g++.old-deja > gcc-g++-tests-$last_date-$date.diff
122
123diff  -Nrc3p gcc-$last_date/gcc/testsuite gcc-$date/gcc/testsuite > gcc-tests-$last_date-$date.diff
124
125diff  -Nrc3p gcc-$last_date gcc-$date > gcc-$last_date-$date.diff
126
127
128# Apply the patches to the old snapshot and run another diff to see if anything
129# bad happened.
130cd gcc-$last_date
131patch -p1 -E -s < ../gcc-$last_date-$date.diff
132find . -name \*.orig -print | xargs rm -rf
133rm -rf .brik.orig
134find . -name \*.rej > $STATEDIR/CHECKME
135~law/bin/brik -C .brik >> $STATEDIR/CHECKME
136cd ..
137diff  -Nrc3p gcc-$last_date gcc-$date >> $STATEDIR/CHECKME
138
139# Remove the old snapshot, we're done with it.
140#rm -rf gcc-$last_date
141
142# Make tarballs
143# Touch all the machine generated files so people don't need gperf, bison and friends.
144
145tar cf - gcc-$date/.brik gcc-$date/gcc/f gcc-$date/libf2c | gzip --best > gcc-g77-$date.tar.gz
146tar cf - gcc-$date/.brik gcc-$date/gcc/testsuite/g77.f-torture | gzip --best > gcc-g77-testsuite-$date.tar.gz
147tar cf - gcc-$date/.brik gcc-$date/gcc/objc gcc-$date/libobjc | gzip --best > gcc-objc-$date.tar.gz
148tar cf - gcc-$date/.brik gcc-$date/gcc/java gcc-$date/{boehm-gc,fastjar,libffi,libjava,zlib} | gzip --best > gcc-java-$date.tar.gz
149tar cf - gcc-$date/.brik gcc-$date/gcc/ch gcc-$date/libchill | gzip --best > gcc-chill-$date.tar.gz
150tar cf - gcc-$date/.brik gcc-$date/gcc/cp gcc-$date/{libio,libstdc++,libstdc++-v3} | gzip --best > gcc-g++-$date.tar.gz
151tar cf - gcc-$date/.brik gcc-$date/gcc/testsuite/g++.old-deja | gzip --best > gcc-g++-tests-$date.tar.gz
152tar cf - gcc-$date/.brik gcc-$date/gcc/testsuite | gzip --best > gcc-tests-$date.tar.gz
153tar cf - gcc-$date | gzip --best > gcc-$date.tar.gz
154
155# Compress the diff files.
156gzip --best *.diff
157
158# Copy them to the FTP server XXX
159mkdir ~ftp/pub/gcc/snapshots/$snapdir
160chmod 775 ~ftp/pub/gcc/snapshots/$snapdir
161cp *.gz ~ftp/pub/gcc/snapshots/$snapdir
162foreach tst (*.gz)
163  echo $tst `sum $tst` >>~ftp/pub/gcc/snapshots/$snapdir/CHECKSUMS
164end
165
166# Update links on the ftp server
167$SCRIPTDIR/update_links $date
168
169# Get back to the toplevel directory before we update the date.
170cd  $STATEDIR
171
172# Note that we made a snapshot today
173mv .snapshot_date .prev_snapshot_date
174echo $date > .snapshot_date
175
176$SCRIPTDIR/update_tags
177
178# Announce it XXX
179mail -s "gcc-ss-$date is now available" gcc@gcc.gnu.org < ~ftp/pub/gcc/snapshots/README
180mail -s "snapshot:CHECKME" law@cygnus.com < $STATEDIR/CHECKME
181rm -rf $TMPDIR/$$
Note: See TracBrowser for help on using the repository browser.