3060
|
1 |
#!/bin/bash
|
2667
|
2 |
#
|
|
3 |
# $Id$
|
|
4 |
#
|
|
5 |
# makedist -- make Isabelle distribution.
|
|
6 |
|
|
7 |
|
|
8 |
## global settings
|
|
9 |
|
2829
|
10 |
LOGICS="CCL CTT Cube FOL FOLP HOL HOLCF LCF Provers Pure Sequents TFL Tools ZF"
|
2667
|
11 |
|
|
12 |
CVSROOT=/isabelle/archive
|
|
13 |
DISTBASE=~/tmp/isadist
|
|
14 |
|
|
15 |
|
|
16 |
## diagnostics
|
|
17 |
|
|
18 |
PRG=$(basename $0)
|
|
19 |
|
|
20 |
function usage()
|
|
21 |
{
|
|
22 |
echo
|
|
23 |
echo "Usage: $PRG VERSION"
|
|
24 |
echo
|
|
25 |
cat <<EOF
|
|
26 |
Make Isabelle distribution from the master sources at TUM.
|
|
27 |
|
|
28 |
VERSION may be either a tag like "Isabelle94-XX" that specifies the
|
|
29 |
release to be exported from the repository, or "-" to checkout the
|
|
30 |
current sources as an unofficial release.
|
|
31 |
|
|
32 |
Checklist for official releases (before running this script):
|
|
33 |
|
2668
|
34 |
* Check that README files are up to date (should have Id: lines).
|
2667
|
35 |
* Check that Pure/ROOT.ML/version is up to date!
|
2686
|
36 |
* Check release name and date in NEWS!
|
2970
|
37 |
* Make sure that encoding info is consistent (fixencoding)!
|
2667
|
38 |
* Make sure that the repository version of Doc is consistent
|
|
39 |
(watch out for *.bbl, *.rao, *.ind)!
|
3186
|
40 |
* Check ML_SYSTEM defaults!
|
2667
|
41 |
EOF
|
|
42 |
#Wicked! We just won't tell other users ...
|
|
43 |
if [ $LOGNAME = paulson -o $LOGNAME = nipkow -o $LOGNAME = wenzelm ]; then
|
|
44 |
cat <<EOF
|
|
45 |
* Tag the current repository version, e.g.:
|
|
46 |
cvs rtag Isabelle94-XX isabelle
|
|
47 |
PLEASE DON'T DO THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
|
|
48 |
EOF
|
|
49 |
fi
|
|
50 |
cat <<EOF
|
|
51 |
|
|
52 |
After the distribution has been created succesfully, you might want
|
|
53 |
to run some makeall tests using different ML systems.
|
|
54 |
|
|
55 |
EOF
|
|
56 |
exit 1
|
|
57 |
}
|
|
58 |
|
|
59 |
function fail()
|
|
60 |
{
|
|
61 |
echo "$1" >&2
|
|
62 |
exit 2
|
|
63 |
}
|
|
64 |
|
|
65 |
|
|
66 |
## process command line
|
|
67 |
|
|
68 |
[ $# -ne 1 ] && usage
|
|
69 |
|
|
70 |
VERSION="$1"
|
|
71 |
shift
|
|
72 |
|
|
73 |
|
|
74 |
## main
|
|
75 |
|
|
76 |
# dist version
|
|
77 |
|
|
78 |
DATE=$(date "+%d-%b-%Y")
|
|
79 |
|
|
80 |
if [ "$VERSION" = "-" ]; then
|
|
81 |
DISTNAME=Isabelle_$DATE
|
3363
|
82 |
EXPORT="checkout -P"
|
2667
|
83 |
UNOFFICIAL=true
|
|
84 |
else
|
|
85 |
DISTNAME="$VERSION"
|
|
86 |
EXPORT="export -r $VERSION"
|
|
87 |
UNOFFICIAL=""
|
|
88 |
fi
|
|
89 |
|
|
90 |
mkdir -p $DISTBASE || fail "Unable to create distribution base dir $DISTBASE!"
|
|
91 |
[ -e $DISTBASE/$DISTNAME ] && fail "$DISTBASE/$DISTNAME already exists!"
|
|
92 |
|
|
93 |
|
|
94 |
# export from repository
|
|
95 |
|
|
96 |
echo
|
|
97 |
echo "Exporting $DISTNAME from repository. Please be patient ..."
|
|
98 |
echo
|
|
99 |
|
|
100 |
cd $DISTBASE
|
|
101 |
|
|
102 |
export CVSROOT
|
3363
|
103 |
cvs -f -q $EXPORT -d $DISTNAME isabelle
|
2667
|
104 |
|
|
105 |
|
|
106 |
# make docs
|
|
107 |
|
3169
|
108 |
cd $DISTBASE/$DISTNAME/Doc
|
|
109 |
|
|
110 |
for DOC in $(cat Contents)
|
2667
|
111 |
do
|
3169
|
112 |
cd $DOC
|
2667
|
113 |
make dist
|
3169
|
114 |
cd ..
|
2667
|
115 |
done
|
|
116 |
|
|
117 |
|
|
118 |
# prepare dist dir for release
|
|
119 |
|
|
120 |
cd $DISTBASE/$DISTNAME
|
|
121 |
|
|
122 |
find . -name CVS -exec rm -rf {} \;
|
|
123 |
|
3099
|
124 |
mkdir -p Tools/8bit/bin #FIXME tmp
|
3305
|
125 |
find Doc \( -name \*.dvi -o -name \*.eps -o -name \*.ps \) -exec mv {} Distribution/doc \;
|
|
126 |
rm Distribution/doc/Isa-logics.eps
|
3099
|
127 |
rm -rf Admin Doc
|
2667
|
128 |
|
|
129 |
mkdir src
|
|
130 |
mv $LOGICS src
|
2829
|
131 |
mv index.html src
|
2667
|
132 |
|
|
133 |
mv Distribution/* .
|
|
134 |
rmdir Distribution
|
|
135 |
|
3638
|
136 |
# build theory browser
|
|
137 |
|
|
138 |
cd lib/browser
|
|
139 |
make
|
|
140 |
cd ../..
|
|
141 |
|
2667
|
142 |
if [ -n "$UNOFFICIAL" ]; then
|
|
143 |
{
|
|
144 |
echo
|
|
145 |
echo "IMPORTANT NOTE"
|
|
146 |
echo "=============="
|
|
147 |
echo
|
|
148 |
echo "This is an unofficial release of Isabelle, created by $LOGNAME $DATE."
|
|
149 |
echo
|
|
150 |
} >UNOFFICIAL
|
|
151 |
fi
|
|
152 |
|
3257
|
153 |
lynx -dump README.html >README
|
|
154 |
|
2667
|
155 |
|
|
156 |
# create archive
|
|
157 |
|
|
158 |
cd $DISTBASE
|
|
159 |
|
2794
|
160 |
#FIXME sometimes doesn't work!?
|
|
161 |
chown -R $LOGNAME:isabelle $DISTNAME
|
|
162 |
chmod -R u+w $DISTNAME
|
|
163 |
chmod -R g+w $DISTNAME
|
2667
|
164 |
|
|
165 |
tar cf - $DISTNAME | gzip >$DISTNAME.tar.gz
|
|
166 |
|
|
167 |
|
|
168 |
# final note
|
|
169 |
|
|
170 |
echo
|
|
171 |
echo "That's it. You'll find the distribution in $DISTBASE."
|
|
172 |
echo
|