Admin/makedist
author wenzelm
Wed, 19 Mar 2008 22:28:17 +0100
changeset 26338 f8ed02f22433
parent 26133 8ea867ad9a48
child 26370 2a4f0d0621f1
permissions -rwxr-xr-x
auxiliary dynamic_thm(s) for fact lookup; renamed local dynamic_thm(s) to goal_thm(s);
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}
23149
ddc5800b699f added src/Tools;
wenzelm
parents: 21712
diff changeset
    11
SRCS="CCL CTT Cube FOL FOLP HOL HOLCF LCF Provers Pure Sequents Tools 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
25214
91730b492a45 ASCIIfied README
haftmann
parents: 23895
diff changeset
    47
    * Check ANNOUNCE, README, INSTALL, NEWS, COPYRIGHT, CONTRIBUTORS.
11062
wenzelm
parents: 10928
diff changeset
    48
    * Try "isatool makeall all" with Poly/ML, SML/NJ, etc.
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    49
    * Tag the current repository version, e.g.:
17693
541f6367a431 avoid naming existing tags in explanations;
wenzelm
parents: 17655
diff changeset
    50
        cvs -d /usr/proj/isabelle-repository/archive rtag IsabelleXXXX isabelle
11062
wenzelm
parents: 10928
diff changeset
    51
      PLEASE DO NOT DO THIS UNLESS YOU KNOW WHAT YOU ARE DOING!
5727
1b708bfb0c1e fixed index.html;
wenzelm
parents: 5725
diff changeset
    52
25237
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
    53
   After running this script:
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
    54
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
    55
    * Symlink generated files in website/ directory to their appropriate
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
    56
      places in the isabelle website sources.
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
    57
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    58
EOF
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    59
  exit 1
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    60
}
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    61
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    62
function fail()
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    63
{
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    64
  echo "$1" >&2
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    65
  exit 2
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    66
}
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    67
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    68
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    69
## process command line
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    70
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    71
[ "$#" -ne 1 -a "$#" -ne 2 ] && usage
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    72
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    73
VERSION="$1"; shift
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    74
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    75
if [ "$#" -eq 0 ]; then
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    76
  DISTNAME=""
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    77
else
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    78
  DISTNAME="$1"; shift
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    79
fi
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    80
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    81
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    82
## main
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    83
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    84
# dist version
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    85
21712
8b2fd895a7fc date: forcing LC_ALL=C prevents funny file names;
wenzelm
parents: 20990
diff changeset
    86
DATE=$(env LC_ALL=C date "+%d-%b-%Y")
8b2fd895a7fc date: forcing LC_ALL=C prevents funny file names;
wenzelm
parents: 20990
diff changeset
    87
DISTDATE=$(env LC_ALL=C date "+%B %Y")
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    88
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    89
if [ "$VERSION" = "-" ]; then
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    90
  DISTIDENT="Isabelle_$DATE"
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    91
  [ -z "$DISTNAME" ] && DISTNAME="$DISTIDENT"
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    92
  DISTVERSION="$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
    93
  EXPORT="cvs -f -q checkout -P -d $DISTNAME isabelle"
17558
wenzelm
parents: 17554
diff changeset
    94
  UNOFFICIAL=true
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
    95
else
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    96
  DISTIDENT="$VERSION"
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
    97
  [ -z "$DISTNAME" ] && DISTNAME="$DISTIDENT"
4982
6f96354267e0 tuned dist version;
wenzelm
parents: 4979
diff changeset
    98
  DISTVERSION="$DISTNAME: $DISTDATE"
17561
bde06ed41123 fixed cvs export;
wenzelm
parents: 17560
diff changeset
    99
  EXPORT="cvs -f -q export -r $VERSION -d $DISTNAME isabelle"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   100
  UNOFFICIAL=""
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   101
fi
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   102
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   103
DISTBASE="$DISTPREFIX/dist-$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   104
mkdir -p "$DISTBASE" || fail "Unable to create distribution base dir $DISTBASE!"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   105
[ -e "$DISTBASE/$DISTNAME" ] && fail "$DISTBASE/$DISTNAME already exists!"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   106
[ -e "$DISTBASE/pdf/$DISTNAME" ] && fail "$DISTBASE/pdf/$DISTNAME already exists!"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   107
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   108
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   109
# export repository
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   110
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   111
echo "###"
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   112
echo "### Exporting $DISTIDENT ..."
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   113
echo "###"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   114
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   115
cd "$DISTBASE"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   116
13230
c5fad3c40d45 fail more gracefully, return proper exit codes, allow preset DISTPREFIX
kleing
parents: 13100
diff changeset
   117
$EXPORT || fail "Export failed!"
15438
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   118
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   119
if [ -n "$CVS2CL" ]; then
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   120
  cd $DISTNAME
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   121
  $CVS2CL
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   122
  gzip ChangeLog
26108
46f4e4cd3b69 keep ChangeLog.gz within distribution;
wenzelm
parents: 25949
diff changeset
   123
  cp ChangeLog.gz ..
15438
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   124
  cd ..
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   125
fi
dfc7d2a824d6 Added ChangeLog
berghofe
parents: 13803
diff changeset
   126
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   127
$FIND . -name CVS -print | xargs rm -rf
12986
58cd2ca93edc delete .cvsignore;
wenzelm
parents: 12721
diff changeset
   128
$FIND . -name .cvsignore -print | xargs rm -rf
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   129
$FIND . "(" -name \*.thy -o -name \*.ML ")" -perm +111 -print | xargs chmod -x
23895
89f8bfdbc269 chmod u+rw on all files;
wenzelm
parents: 23201
diff changeset
   130
$FIND . -print | xargs chmod u+rw
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   131
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   132
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   133
# build docs
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   134
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   135
echo "###"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   136
echo "### Building docs ..."
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   137
echo "###"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   138
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   139
cd "$DISTBASE/$DISTNAME/Doc"
6630
5f810292c030 make pdf;
wenzelm
parents: 6304
diff changeset
   140
PDFLATEX=$(type -path pdflatex)
3169
c13e54126fcd improved doc stuff;
wenzelm
parents: 3099
diff changeset
   141
c13e54126fcd improved doc stuff;
wenzelm
parents: 3099
diff changeset
   142
for DOC in $(cat Contents)
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   143
do
20990
0c1296049b47 now allowing subdirectories in Doc/
haftmann
parents: 18539
diff changeset
   144
  pushd "$DOC" > /dev/null
13230
c5fad3c40d45 fail more gracefully, return proper exit codes, allow preset DISTPREFIX
kleing
parents: 13100
diff changeset
   145
  make dvi || fail "DVI document for $DOC failed!"
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   146
  { [ -n "$PDFLATEX" ] && make clean pdf; } || fail "PDF document for $DOC failed!"
20990
0c1296049b47 now allowing subdirectories in Doc/
haftmann
parents: 18539
diff changeset
   147
  popd
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   148
done
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   149
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   150
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   151
# prepare dist dir for release
8059
9128e934bf51 new web pages integrated
kleing
parents: 7993
diff changeset
   152
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   153
echo "###"
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   154
echo "### Preparing distribution ..."
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   155
echo "###"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   156
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   157
cd "$DISTBASE/$DISTNAME" || fail "No dist directory: $DISTBASE/$DISTNAME"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   158
25237
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
   159
mkdir -p ../website
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
   160
cat > ../website/distinfo.mak <<EOF
17942
68988fd2fd27 towards an improved website/makedist integration
haftmann
parents: 17910
diff changeset
   161
# 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
   162
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   163
DISTNAME=$DISTNAME
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   164
DISTIDENT=$DISTIDENT
17910
2b435795c9e9 slight improvements for website
haftmann
parents: 17693
diff changeset
   165
DISTBASE=$DISTBASE
16301
f9f2e1643593 migrated scripts to new webiste
haftmann
parents: 16286
diff changeset
   166
EOF
9920
9734f2717203 improved WWW page generation (still somewhat experimental);
wenzelm
parents: 9880
diff changeset
   167
25237
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
   168
cp Distribution/lib/html/library_index_content.template ../website/
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
   169
23160
b7d0e78be86d doc: exclude isabelle_isar.pdf;
wenzelm
parents: 23149
diff changeset
   170
MOVE=$($FIND Doc \( -type f -a -not -type l -a -not -name isabelle_isar.pdf -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
   171
mv -f $MOVE Distribution/doc
3305
d8114e93ef66 fixed doc;
wenzelm
parents: 3281
diff changeset
   172
rm Distribution/doc/Isa-logics.eps
23201
85612df29daa proper handling of Tools;
wenzelm
parents: 23160
diff changeset
   173
rm -rf Doc
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   174
7115
37178f53ed4d mkdir contrib;
wenzelm
parents: 6958
diff changeset
   175
mkdir src contrib
23149
ddc5800b699f added src/Tools;
wenzelm
parents: 21712
diff changeset
   176
mv $SRCS src
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   177
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   178
mv Distribution/* .
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   179
rmdir Distribution
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   180
25949
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   181
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   182
#paranoia setting for sunbroy
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   183
PATH=/usr/local/dist/DIR/j2sdk1.5.0/bin:$PATH
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   184
25856
890c51553b33 build Isabelle process wrapper;
wenzelm
parents: 25433
diff changeset
   185
( cd lib/browser; make; ) || fail "Failed to build graph browser!"
890c51553b33 build Isabelle process wrapper;
wenzelm
parents: 25433
diff changeset
   186
25949
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   187
( cd lib/classes; ./mk; )
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   188
[ -f lib/classes/isabelle.jar ] || fail "Failed to build Isabelle process wrapper!"
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   189
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   190
if type -p scalac >/dev/null
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   191
then
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   192
  ( cd lib/jedit/plugin; ./mk; )
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   193
  [ -f lib/jedit/isabelle.jar ] || fail "Failed to build jEdit plugin!"
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   194
else
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   195
  echo "Warning: Scala unavailable -- skipping jEdit plugin"
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   196
fi
850b4c2d0f17 reactivated mk of java/scala sources, with paranoia PATH setting for sunbroy;
wenzelm
parents: 25859
diff changeset
   197
3638
2b67561c6488 Added some commands for building theory browser.
berghofe
parents: 3363
diff changeset
   198
5385
8fc3828fdc8a eps logis;
wenzelm
parents: 5172
diff changeset
   199
cp doc/isabelle*.eps lib/logo
8fc3828fdc8a eps logis;
wenzelm
parents: 5172
diff changeset
   200
3638
2b67561c6488 Added some commands for building theory browser.
berghofe
parents: 3363
diff changeset
   201
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   202
if [ -n "$UNOFFICIAL" ]; then
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   203
  {
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   204
    echo
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   205
    echo "IMPORTANT NOTE"
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   206
    echo "=============="
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   207
    echo
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   208
    echo "This is an unofficial release of Isabelle, created by $LOGNAME $DATE."
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   209
    echo
9925
wenzelm
parents: 9920
diff changeset
   210
  } >ANNOUNCE
26133
8ea867ad9a48 tuned structure Distribution;
wenzelm
parents: 26108
diff changeset
   211
  perl -pi -e "s/val is_official = true/val is_official = false/" src/Pure/ROOT.ML
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   212
fi
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   213
25433
d138fd74a1a1 cover ISABELLE_IDENTIFIER;
wenzelm
parents: 25237
diff changeset
   214
perl -pi -e "s/ISABELLE_IDENTIFIER=\"\"/ISABELLE_IDENTIFIER=\"$DISTNAME\"/g;" lib/scripts/getsettings
25237
5dbb6d583adc improved website integration
haftmann
parents: 25235
diff changeset
   215
perl -pi -e "s/{ISABELLE}/$DISTNAME/g;" lib/html/library_index_header.template
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   216
perl -pi -e "s/Isabelle repository version/$DISTVERSION/" src/Pure/ROOT.ML lib/Tools/version
25214
91730b492a45 ASCIIfied README
haftmann
parents: 23895
diff changeset
   217
perl -pi -e "s/the internal repository version of Isabelle/$DISTVERSION/" README
3257
4e3724e0659f README generation;
wenzelm
parents: 3186
diff changeset
   218
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   219
( cd src; ../Admin/maketags; )
10077
wenzelm
parents: 10068
diff changeset
   220
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   221
rm -rf Admin
16286
550d113ccd8f find empty dirs up to depth 5;
wenzelm
parents: 16165
diff changeset
   222
rm -f TODO
9052
7db48fe85b05 provide TAGS file for Isabelle sources;
wenzelm
parents: 8810
diff changeset
   223
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   224
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   225
# create archive
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   226
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   227
echo "###"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   228
echo "### Creating archives ..."
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   229
echo "###"
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   230
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   231
cd "$DISTBASE"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   232
10087
wenzelm
parents: 10077
diff changeset
   233
echo "$DISTBASE/$DISTNAME.tar.gz" > ../ISABELLE_DIST
wenzelm
parents: 10077
diff changeset
   234
10068
46db6fde4ee3 include "Isabelle" link;
wenzelm
parents: 10017
diff changeset
   235
rm -f Isabelle
46db6fde4ee3 include "Isabelle" link;
wenzelm
parents: 10017
diff changeset
   236
ln -s "$DISTNAME" Isabelle
46db6fde4ee3 include "Isabelle" link;
wenzelm
parents: 10017
diff changeset
   237
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   238
chown -R "$LOGNAME" "$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   239
chmod -R u+w "$DISTNAME"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   240
chmod -R g=o "$DISTNAME"
10077
wenzelm
parents: 10068
diff changeset
   241
chgrp -R isabelle "$DISTNAME" Isabelle
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   242
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   243
mkdir -p "pdf/$DISTNAME/doc"
17655
0039abe88816 yet another atempt to get doc/Contents right;
wenzelm
parents: 17653
diff changeset
   244
mv "$DISTNAME/doc/"*.pdf "pdf/$DISTNAME/doc"
0039abe88816 yet another atempt to get doc/Contents right;
wenzelm
parents: 17653
diff changeset
   245
0039abe88816 yet another atempt to get doc/Contents right;
wenzelm
parents: 17653
diff changeset
   246
sync; sleep 3
6748
f1f70344b749 separate archive for pdf docs;
wenzelm
parents: 6630
diff changeset
   247
10096
wenzelm
parents: 10087
diff changeset
   248
echo "$DISTNAME.tar.gz"
10077
wenzelm
parents: 10068
diff changeset
   249
"$TAR" cf "$DISTNAME.tar" Isabelle "$DISTNAME"
10096
wenzelm
parents: 10087
diff changeset
   250
gzip "$DISTNAME.tar"
wenzelm
parents: 10087
diff changeset
   251
wenzelm
parents: 10087
diff changeset
   252
echo "${DISTNAME}_pdf.tar.gz"
10112
wenzelm
parents: 10096
diff changeset
   253
( cd pdf; "$TAR" cf "../${DISTNAME}_pdf.tar" "$DISTNAME"; )
10096
wenzelm
parents: 10087
diff changeset
   254
gzip "${DISTNAME}_pdf.tar"
6748
f1f70344b749 separate archive for pdf docs;
wenzelm
parents: 6630
diff changeset
   255
17655
0039abe88816 yet another atempt to get doc/Contents right;
wenzelm
parents: 17653
diff changeset
   256
mv "pdf/$DISTNAME/doc/"*.pdf "$DISTNAME/doc"
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   257
rmdir "pdf/$DISTNAME/doc" "pdf/$DISTNAME" pdf
6750
0681dd2211b5 move pdfs back into dist;
wenzelm
parents: 6748
diff changeset
   258
6304
9a82e1c3d9da fixed again;
wenzelm
parents: 6296
diff changeset
   259
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   260
# cleanup dist
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   261
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   262
mv "$DISTNAME" "${DISTNAME}-old"
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   263
mkdir "$DISTNAME"
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   264
25214
91730b492a45 ASCIIfied README
haftmann
parents: 23895
diff changeset
   265
mv "${DISTNAME}-old/README" "${DISTNAME}-old/INSTALL" "${DISTNAME}-old/NEWS" \
17554
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   266
  "${DISTNAME}-old/ANNOUNCE" "${DISTNAME}-old/COPYRIGHT" "${DISTNAME}-old/CONTRIBUTORS" \
d16abc8f4fb0 removed "--" argument;
wenzelm
parents: 16508
diff changeset
   267
  "$DISTNAME"
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   268
mkdir "$DISTNAME/doc"
17655
0039abe88816 yet another atempt to get doc/Contents right;
wenzelm
parents: 17653
diff changeset
   269
mv "${DISTNAME}-old/doc/"*.pdf "${DISTNAME}-old/doc/Contents" "$DISTNAME/doc"
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   270
9867
wenzelm
parents: 9797
diff changeset
   271
chgrp -R isabelle "$DISTNAME"
wenzelm
parents: 9797
diff changeset
   272
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   273
rm -rf "${DISTNAME}-old"
9782
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   274
63b195acdaaa cleanup dist sources afterwards;
wenzelm
parents: 9052
diff changeset
   275
2667
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   276
# final note
b2172eab9ba6 makedist -- make Isabelle distribution.
wenzelm
parents:
diff changeset
   277
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   278
echo "###"
10112
wenzelm
parents: 10096
diff changeset
   279
echo "### Finished makedist."
9797
49e55730eb7a provide "--" argument: tentative release;
wenzelm
parents: 9782
diff changeset
   280
echo "###"