Admin/makedist
author krauss
Tue, 23 Jan 2007 20:29:03 +0100
changeset 22170 5682eeaefaf4
parent 21712 8b2fd895a7fc
child 23149 ddc5800b699f
permissions -rwxr-xr-x
fixes smlnj-related problem, updated signature
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12721
226fc0e2e7e3 #!/usr/bin/env bash;
wenzelm
parents: 11981
diff changeset
     1
#!/usr/bin/env bash
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     2
#
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     3
# $Id$
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     4
#
10077
wenzelm
parents: 10068
diff changeset
     5
# makedist -- make Isabelle source distribution.
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     6
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     7
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     8
## global settings
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
     9
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    10
DISTPREFIX=${DISTPREFIX:-~/tmp/isadist}
7993
wenzelm
parents: 7859
diff changeset
    11
LOGICS="CCL CTT Cube FOL FOLP HOL HOLCF LCF Provers Pure Sequents TFL ZF"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    12
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    13
export CVSROOT=/usr/proj/isabelle-repository/archive
18539
35b9ed76b59a ISABELLE_USER for remote cvs access;
wenzelm
parents: 17942
diff changeset
    14
[ ! -d "$CVSROOT" ] && CVSROOT="${ISABELLE_USER:-$USER}@sunbroy2.informatik.tu-muenchen.de:$CVSROOT"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    15
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    16
umask 022
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    17
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
    18
TAR=tar
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
    19
type -path gtar >/dev/null && TAR=gtar
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
    20
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
    21
FIND=find
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
    22
type -path gfind >/dev/null && FIND=gfind
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
    23
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    24
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    25
## diagnostics
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    26
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    27
PRG=$(basename "$0")
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    28
THIS=$(cd $(dirname "$0"); echo "$PWD")
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    29
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    30
function usage()
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    31
{
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    32
  cat <<EOF
11062
wenzelm
parents: 10928
diff changeset
    33
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    34
Usage: $PRG VERSION [NAME]
11062
wenzelm
parents: 10928
diff changeset
    35
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    36
  Make Isabelle distribution from the master sources at TUM.
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    37
17693
541f6367a431 avoid naming existing tags in explanations;
wenzelm
parents: 17655
diff changeset
    38
  VERSION may be either a tag like "IsabelleXXXX" that specifies the
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    39
  release to be exported from the repository, or "-" to checkout the
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    40
  current sources as an unofficial release.
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    41
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    42
  NAME specifies an explicit distribution name, by default it is
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    43
  derived from VERSION.
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    44
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    45
  Checklist for official releases (before running this script):
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    46
20990
0c1296049b47 now allowing subdirectories in Doc/
haftmann
parents: 18539
diff changeset
    47
    * Symlink website to Admin/website
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    48
    * Check Admin/website contents.
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    49
    * Check ANNOUNCE, README.html, INSTALL, NEWS, COPYRIGHT, CONTRIBUTORS.
11062
wenzelm
parents: 10928
diff changeset
    50
    * Try "isatool makeall all" with Poly/ML, SML/NJ, etc.
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    51
    * Tag the current repository version, e.g.:
17693
541f6367a431 avoid naming existing tags in explanations;
wenzelm
parents: 17655
diff changeset
    52
        cvs -d /usr/proj/isabelle-repository/archive rtag IsabelleXXXX isabelle
11062
wenzelm
parents: 10928
diff changeset
    53
      PLEASE DO NOT DO THIS UNLESS YOU KNOW WHAT YOU ARE DOING!
5727
1b708bfb0c1e fixed index.html;
wenzelm
parents: 5725
diff changeset
    54
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    55
EOF
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    56
  exit 1
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    57
}
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    58
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    59
function fail()
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    60
{
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    61
  echo "$1" >&2
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    62
  exit 2
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    63
}
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    64
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    65
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    66
## process command line
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    67
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    68
[ "$#" -ne 1 -a "$#" -ne 2 ] && usage
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    69
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    70
VERSION="$1"; shift
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    71
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    72
if [ "$#" -eq 0 ]; then
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    73
  DISTNAME=""
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    74
else
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    75
  DISTNAME="$1"; shift
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    76
fi
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    77
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    78
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    79
## main
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    80
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    81
# dist version
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    82
21712
8b2fd895a7fc date: forcing LC_ALL=C prevents funny file names;
wenzelm
parents: 20990
diff changeset
    83
DATE=$(env LC_ALL=C date "+%d-%b-%Y")
8b2fd895a7fc date: forcing LC_ALL=C prevents funny file names;
wenzelm
parents: 20990
diff changeset
    84
DISTDATE=$(env LC_ALL=C date "+%B %Y")
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    85
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    86
if [ "$VERSION" = "-" ]; then
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    87
  DISTIDENT="Isabelle_$DATE"
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    88
  [ -z "$DISTNAME" ] && DISTNAME="$DISTIDENT"
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    89
  DISTVERSION="$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    90
  EXPORT="cvs -f -q checkout -P -d $DISTNAME isabelle"
17558
wenzelm
parents: 17554
diff changeset
    91
  UNOFFICIAL=true
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    92
else
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    93
  DISTIDENT="$VERSION"
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    94
  [ -z "$DISTNAME" ] && DISTNAME="$DISTIDENT"
4982
6f96354267e0 tuned dist version;
wenzelm
parents: 4979
diff changeset
    95
  DISTVERSION="$DISTNAME: $DISTDATE"
17561
bde06ed41123 fixed cvs export;
wenzelm
parents: 17560
diff changeset
    96
  EXPORT="cvs -f -q export -r $VERSION -d $DISTNAME isabelle"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    97
  UNOFFICIAL=""
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    98
fi
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    99
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   100
DISTBASE="$DISTPREFIX/dist-$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   101
mkdir -p "$DISTBASE" || fail "Unable to create distribution base dir $DISTBASE!"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   102
[ -e "$DISTBASE/$DISTNAME" ] && fail "$DISTBASE/$DISTNAME already exists!"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   103
[ -e "$DISTBASE/pdf/$DISTNAME" ] && fail "$DISTBASE/pdf/$DISTNAME already exists!"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   104
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   105
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   106
# export repository
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   107
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   108
echo "###"
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   109
echo "### Exporting $DISTIDENT ..."
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   110
echo "###"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   111
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   112
cd "$DISTBASE"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   113
13230
c5fad3c40d45 fail more gracefully, return proper exit codes, allow preset DISTPREFIX
kleing
parents: 13100
diff changeset
   114
$EXPORT || fail "Export failed!"
15438
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   115
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   116
if [ -n "$CVS2CL" ]; then
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   117
  cd $DISTNAME
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   118
  $CVS2CL
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   119
  gzip ChangeLog
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   120
  mv ChangeLog.gz ..
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   121
  cd ..
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   122
fi
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   123
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   124
$FIND . -name CVS -print | xargs rm -rf
12986
58cd2ca93edc delete .cvsignore;
wenzelm
parents: 12721
diff changeset
   125
$FIND . -name .cvsignore -print | xargs rm -rf
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   126
$FIND . "(" -name \*.thy -o -name \*.ML ")" -perm +111 -print | xargs chmod -x
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   127
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   128
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   129
# build docs
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   130
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   131
echo "###"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   132
echo "### Building docs ..."
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   133
echo "###"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   134
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   135
cd "$DISTBASE/$DISTNAME/Doc"
6630
5f810292c030 make pdf;
wenzelm
parents: 6304
diff changeset
   136
PDFLATEX=$(type -path pdflatex)
3169
c13e54126fcd improved doc stuff;
wenzelm
parents: 3099
diff changeset
   137
c13e54126fcd improved doc stuff;
wenzelm
parents: 3099
diff changeset
   138
for DOC in $(cat Contents)
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   139
do
20990
0c1296049b47 now allowing subdirectories in Doc/
haftmann
parents: 18539
diff changeset
   140
  pushd "$DOC" > /dev/null
13230
c5fad3c40d45 fail more gracefully, return proper exit codes, allow preset DISTPREFIX
kleing
parents: 13100
diff changeset
   141
  make dvi || fail "DVI document for $DOC failed!"
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   142
  { [ -n "$PDFLATEX" ] && make clean pdf; } || fail "PDF document for $DOC failed!"
20990
0c1296049b47 now allowing subdirectories in Doc/
haftmann
parents: 18539
diff changeset
   143
  popd
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   144
done
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   145
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   146
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   147
# prepare dist dir for release
8059
9128e934bf51 new web pages integrated
kleing
parents: 7993
diff changeset
   148
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   149
echo "###"
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   150
echo "### Preparing distribution ..."
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   151
echo "###"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   152
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   153
cd "$DISTBASE/$DISTNAME" || fail "No dist directory: $DISTBASE/$DISTNAME"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   154
16301
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   155
cp -R Admin/website ..
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   156
mkdir -p ../website/conf
17942
68988fd2fd27 towards an improved website/makedist integration
haftmann
parents: 17910
diff changeset
   157
cat > ../website/conf/distinfo.mak <<EOF
68988fd2fd27 towards an improved website/makedist integration
haftmann
parents: 17910
diff changeset
   158
# this is a generated file - do not edit unless you know what you are doing!
16301
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   159
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   160
DISTNAME=$DISTNAME
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   161
DISTIDENT=$DISTIDENT
17910
2b435795c9e9 slight improvements for website
haftmann
parents: 17693
diff changeset
   162
DISTBASE=$DISTBASE
16301
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   163
EOF
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   164
16481
fe61cdf5af51 exclude pghead.pdf from doc;
wenzelm
parents: 16328
diff changeset
   165
MOVE=$($FIND Doc \( -type f -a -not -type l -a -not -name pghead.pdf -a \( -name \*.dvi -o -name \*.eps -o -name \*.ps -o -name \*.pdf \) -a -print \) | grep -v 'gfx/.*pdf')
6630
5f810292c030 make pdf;
wenzelm
parents: 6304
diff changeset
   166
mv -f $MOVE Distribution/doc
3305
d8114e93ef66 fixed doc;
wenzelm
parents: 3281
diff changeset
   167
rm Distribution/doc/Isa-logics.eps
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   168
rm -rf Doc Tools
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   169
7115
37178f53ed4d mkdir contrib;
wenzelm
parents: 6958
diff changeset
   170
mkdir src contrib
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   171
mv $LOGICS src
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   172
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   173
mv Distribution/* .
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   174
rmdir Distribution
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   175
13230
c5fad3c40d45 fail more gracefully, return proper exit codes, allow preset DISTPREFIX
kleing
parents: 13100
diff changeset
   176
( cd lib/browser; make; ) || fail "Graph browser build failed!"
3638
2b67561c6488 Added some commands for building theory browser.
berghofe
parents: 3363
diff changeset
   177
5385
8fc3828fdc8a eps logis;
wenzelm
parents: 5172
diff changeset
   178
cp doc/isabelle*.eps lib/logo
8fc3828fdc8a eps logis;
wenzelm
parents: 5172
diff changeset
   179
3638
2b67561c6488 Added some commands for building theory browser.
berghofe
parents: 3363
diff changeset
   180
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   181
if [ -n "$UNOFFICIAL" ]; then
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   182
  {
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   183
    echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   184
    echo "IMPORTANT NOTE"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   185
    echo "=============="
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   186
    echo
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   187
    echo "This is an unofficial release of Isabelle, created by $LOGNAME $DATE."
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   188
    echo
9925
wenzelm
parents: 9920
diff changeset
   189
  } >ANNOUNCE
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   190
fi
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   191
8810
d0eae42f6d12 removed index2;
wenzelm
parents: 8059
diff changeset
   192
perl -pi -e "s/{ISABELLE}/$DISTNAME/g;" lib/html/index.html
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   193
perl -pi -e "s/Isabelle repository version/$DISTVERSION/" src/Pure/ROOT.ML lib/Tools/version
4986
d4f257d3445a tuned msgs;
wenzelm
parents: 4982
diff changeset
   194
perl -pi -e "s/the internal repository version of Isabelle/$DISTVERSION/" README.html
3257
4e3724e0659f README generation;
wenzelm
parents: 3186
diff changeset
   195
lynx -dump README.html >README
4e3724e0659f README generation;
wenzelm
parents: 3186
diff changeset
   196
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   197
( cd src; ../Admin/maketags; )
10077
wenzelm
parents: 10068
diff changeset
   198
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   199
rm -rf Admin
16286
550d113ccd8f find empty dirs up to depth 5;
wenzelm
parents: 16165
diff changeset
   200
rm -f TODO
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   201
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   202
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   203
# create archive
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   204
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   205
echo "###"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   206
echo "### Creating archives ..."
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   207
echo "###"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   208
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   209
cd "$DISTBASE"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   210
10087
wenzelm
parents: 10077
diff changeset
   211
echo "$DISTBASE/$DISTNAME.tar.gz" > ../ISABELLE_DIST
wenzelm
parents: 10077
diff changeset
   212
10068
46db6fde4ee3 include "Isabelle" link;
wenzelm
parents: 10017
diff changeset
   213
rm -f Isabelle
46db6fde4ee3 include "Isabelle" link;
wenzelm
parents: 10017
diff changeset
   214
ln -s "$DISTNAME" Isabelle
46db6fde4ee3 include "Isabelle" link;
wenzelm
parents: 10017
diff changeset
   215
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   216
chown -R "$LOGNAME" "$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   217
chmod -R u+w "$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   218
chmod -R g=o "$DISTNAME"
10077
wenzelm
parents: 10068
diff changeset
   219
chgrp -R isabelle "$DISTNAME" Isabelle
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   220
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   221
mkdir -p "pdf/$DISTNAME/doc"
17655
0039abe88816 yet another atempt to get doc/Contents right;
wenzelm
parents: 17653
diff changeset
   222
mv "$DISTNAME/doc/"*.pdf "pdf/$DISTNAME/doc"
0039abe88816 yet another atempt to get doc/Contents right;
wenzelm
parents: 17653
diff changeset
   223
0039abe88816 yet another atempt to get doc/Contents right;
wenzelm
parents: 17653
diff changeset
   224
sync; sleep 3
6748
f1f70344b749 separate archive for pdf docs;
wenzelm
parents: 6630
diff changeset
   225
10096
wenzelm
parents: 10087
diff changeset
   226
echo "$DISTNAME.tar.gz"
10077
wenzelm
parents: 10068
diff changeset
   227
"$TAR" cf "$DISTNAME.tar" Isabelle "$DISTNAME"
10096
wenzelm
parents: 10087
diff changeset
   228
gzip "$DISTNAME.tar"
wenzelm
parents: 10087
diff changeset
   229
wenzelm
parents: 10087
diff changeset
   230
echo "${DISTNAME}_pdf.tar.gz"
10112
wenzelm
parents: 10096
diff changeset
   231
( cd pdf; "$TAR" cf "../${DISTNAME}_pdf.tar" "$DISTNAME"; )
10096
wenzelm
parents: 10087
diff changeset
   232
gzip "${DISTNAME}_pdf.tar"
6748
f1f70344b749 separate archive for pdf docs;
wenzelm
parents: 6630
diff changeset
   233
17655
0039abe88816 yet another atempt to get doc/Contents right;
wenzelm
parents: 17653
diff changeset
   234
mv "pdf/$DISTNAME/doc/"*.pdf "$DISTNAME/doc"
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   235
rmdir "pdf/$DISTNAME/doc" "pdf/$DISTNAME" pdf
6750
0681dd2211b5 move pdfs back into dist;
wenzelm
parents: 6748
diff changeset
   236
6304
9a82e1c3d9da fixed again;
wenzelm
parents: 6296
diff changeset
   237
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   238
# cleanup dist
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   239
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   240
mv "$DISTNAME" "${DISTNAME}-old"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   241
mkdir "$DISTNAME"
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   242
16328
49c1f9dedc56 added CONTRIBUTORS
haftmann
parents: 16301
diff changeset
   243
mv "${DISTNAME}-old/README.html" "${DISTNAME}-old/INSTALL" "${DISTNAME}-old/NEWS" \
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   244
  "${DISTNAME}-old/ANNOUNCE" "${DISTNAME}-old/COPYRIGHT" "${DISTNAME}-old/CONTRIBUTORS" \
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   245
  "$DISTNAME"
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   246
mkdir "$DISTNAME/doc"
17655
0039abe88816 yet another atempt to get doc/Contents right;
wenzelm
parents: 17653
diff changeset
   247
mv "${DISTNAME}-old/doc/"*.pdf "${DISTNAME}-old/doc/Contents" "$DISTNAME/doc"
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   248
9867
wenzelm
parents: 9797
diff changeset
   249
chgrp -R isabelle "$DISTNAME"
wenzelm
parents: 9797
diff changeset
   250
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   251
rm -rf "${DISTNAME}-old"
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   252
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   253
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   254
# final note
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   255
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   256
echo "###"
10112
wenzelm
parents: 10096
diff changeset
   257
echo "### Finished makedist."
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   258
echo "###"