5 # makedist -- make Isabelle distribution.
10 LOGICS="CCL CTT Cube FOL FOLP HOL HOLCF LCF Provers Pure Sequents TFL ZF"
12 CVSROOT=/usr/proj/isabelle-repository/archive
13 DISTPREFIX=~/tmp/isadist
19 THIS=$(cd $(dirname "$0"); echo $PWD)
24 echo "Usage: $PRG VERSION"
27 Make Isabelle distribution from the master sources at TUM.
29 VERSION may be either a tag like "Isabelle94-XX" that specifies the
30 release to be exported from the repository, or "-" to checkout the
31 current sources as an unofficial release.
33 Checklist for official releases (before running this script):
35 * Check release name and date in NEWS!
36 * Check that README files are up to date (should have Id: lines).
37 * Check Admin/index.html.
38 * Make sure that encoding info is consistent (fixencoding)!
39 * Check ML_SYSTEM defaults!
41 #Wicked! We just won't tell other users ...
42 if [ $LOGNAME = paulson -o $LOGNAME = nipkow -o $LOGNAME = wenzelm -o $LOGNAME = berghofe ]; then
44 * Tag the current repository version, e.g.:
45 cvs -d $CVSROOT rtag Isabelle94-XX isabelle
46 PLEASE DON'T DO THIS UNLESS YOU KNOW WHAT YOU'RE DOING!
51 After the distribution has been created succesfully, you might want
52 to run some makeall tests using different ML systems.
65 ## process command line
77 DATE=$(date "+%d-%b-%Y")
78 DISTDATE=$(date "+%B %Y")
80 if [ "$VERSION" = "-" ]; then
81 DISTNAME=Isabelle_$DATE
82 DISTVERSION="$DISTNAME"
87 DISTVERSION="$DISTNAME: $DISTDATE"
88 EXPORT="export -r $VERSION"
92 DISTBASE=$DISTPREFIX/dist-$DISTNAME
93 mkdir -p $DISTBASE || fail "Unable to create distribution base dir $DISTBASE!"
94 [ -e $DISTBASE/$DISTNAME ] && fail "$DISTBASE/$DISTNAME already exists!"
95 [ -e $DISTBASE/pdf/$DISTNAME ] && fail "$DISTBASE/pdf/$DISTNAME already exists!"
98 # export from repository
101 echo "Exporting $DISTNAME from repository. Please be patient ..."
107 cvs -f -q $EXPORT -d $DISTNAME isabelle
108 find . -name CVS -exec rm -rf {} \;
113 cd $DISTBASE/$DISTNAME/Doc
114 PDFLATEX=$(type -path pdflatex)
116 for DOC in $(cat Contents)
120 [ -n "$PDFLATEX" ] && make clean pdf
128 (cd $DISTBASE/$DISTNAME/Admin/page; make clean; make dist; cd dist; cp * $DISTBASE)
131 # prepare dist dir for release
133 cd $DISTBASE/$DISTNAME
135 MOVE=$(find Doc \( -type f -a \( -name \*.dvi -o -name \*.eps -o -name \*.ps -o -name \*.pdf \) -a -print \) | grep -v 'gfx/.*pdf')
136 mv -f $MOVE Distribution/doc
137 rm Distribution/doc/Isa-logics.eps
146 ( cd lib/browser; make; )
148 cp doc/isabelle*.eps lib/logo
151 if [ -n "$UNOFFICIAL" ]; then
154 echo "IMPORTANT NOTE"
155 echo "=============="
157 echo "This is an unofficial release of Isabelle, created by $LOGNAME $DATE."
162 perl -pi -e "s/{ISABELLE}/$DISTNAME/g;" lib/html/index.html
163 perl -pi -e "s/Isabelle repository/$DISTVERSION/" src/Pure/ROOT.ML
164 perl -pi -e "s/the internal repository version of Isabelle/$DISTVERSION/" README.html
165 lynx -dump README.html >README
167 ( cd src; ../Admin/maketags; )
175 chown -R $LOGNAME:isabelle $DISTNAME
176 chmod -R u+w $DISTNAME
179 type -path gtar >/dev/null && TAR=gtar
181 mkdir -p pdf/$DISTNAME/doc
182 mv $DISTNAME/doc/*.pdf pdf/$DISTNAME/doc
184 $TAR cf $DISTNAME.tar $DISTNAME
185 ( cd pdf; $TAR cf ../${DISTNAME}_pdf.tar $DISTNAME; )
187 mv pdf/$DISTNAME/doc/*.pdf $DISTNAME/doc
188 rmdir pdf/$DISTNAME/doc pdf/$DISTNAME pdf
191 gzip ${DISTNAME}_pdf.tar
196 mv $DISTNAME ${DISTNAME}-old
199 mv ${DISTNAME}-old/lib/logo/isabelle.gif .
200 mv ${DISTNAME}-old/README.html ${DISTNAME}-old/INSTALL $DISTNAME
201 mkdir $DISTNAME/doc && \
202 mv ${DISTNAME}-old/doc/*.pdf ${DISTNAME}-old/doc/Contents $DISTNAME/doc
204 rm -rf ${DISTNAME}-old
210 #$THIS/filesizes -norpm
216 echo "That's it. You'll find the distribution in $DISTBASE."