equal
deleted
inserted
replaced
21 cat <<EOF |
21 cat <<EOF |
22 |
22 |
23 Usage: $PRG [OPTIONS] [VERSION] |
23 Usage: $PRG [OPTIONS] [VERSION] |
24 |
24 |
25 Options are: |
25 Options are: |
|
26 -D retain doc-src component |
26 -j JEDIT_BUILD build Isabelle/jEdit via given jedit_build component |
27 -j JEDIT_BUILD build Isabelle/jEdit via given jedit_build component |
27 -r RELEASE proper release with name" |
28 -r RELEASE proper release with name" |
28 |
29 |
29 Make Isabelle distribution from the main Mercurial repository at TUM. |
30 Make Isabelle distribution from the main Mercurial repository at TUM. |
30 |
31 |
44 |
45 |
45 ## process command line |
46 ## process command line |
46 |
47 |
47 # options |
48 # options |
48 |
49 |
|
50 RETAIN_DOC_SRC="" |
49 RELEASE="" |
51 RELEASE="" |
50 ISABELLE_JEDIT_BUILD_HOME="" |
52 ISABELLE_JEDIT_BUILD_HOME="" |
51 |
53 |
52 while getopts "j:r:" OPT |
54 while getopts "Dj:r:" OPT |
53 do |
55 do |
54 case "$OPT" in |
56 case "$OPT" in |
|
57 D) |
|
58 RETAIN_DOC_SRC=true |
|
59 ;; |
55 j) |
60 j) |
56 ISABELLE_JEDIT_BUILD_HOME="$OPTARG" |
61 ISABELLE_JEDIT_BUILD_HOME="$OPTARG" |
57 ;; |
62 ;; |
58 r) |
63 r) |
59 RELEASE="$OPTARG" |
64 RELEASE="$OPTARG" |
145 find . "(" -name \*.thy -o -name \*.ML -o -name \*.scala ")" -perm +111 -print | xargs chmod -f -x |
150 find . "(" -name \*.thy -o -name \*.ML -o -name \*.scala ")" -perm +111 -print | xargs chmod -f -x |
146 find . -print | xargs chmod -f u+rw |
151 find . -print | xargs chmod -f u+rw |
147 |
152 |
148 perl -pi -e 's/^(ISABELLE_SCALA_BUILD_OPTIONS=")/$1-optimise /,' etc/settings |
153 perl -pi -e 's/^(ISABELLE_SCALA_BUILD_OPTIONS=")/$1-optimise /,' etc/settings |
149 |
154 |
|
155 if [ -n "$RETAIN_DOC_SRC" ]; then |
|
156 cp -a doc-src doc-src.orig |
|
157 fi |
|
158 |
150 ./Admin/build all || fail "Failed to build distribution" |
159 ./Admin/build all || fail "Failed to build distribution" |
151 |
160 |
152 if [ -n "$ISABELLE_JEDIT_BUILD_HOME" ]; then |
161 if [ -n "$ISABELLE_JEDIT_BUILD_HOME" ]; then |
153 [ -d "$ISABELLE_JEDIT_BUILD_HOME" ] || fail "Bad jedit_build component directory: \"$ISABELLE_JEDIT_BUILD_HOME\"" |
162 [ -d "$ISABELLE_JEDIT_BUILD_HOME" ] || fail "Bad jedit_build component directory: \"$ISABELLE_JEDIT_BUILD_HOME\"" |
154 eval "$(fgrep ISABELLE_JEDIT_BUILD_VERSION "$ISABELLE_JEDIT_BUILD_HOME/etc/settings")" |
163 eval "$(fgrep ISABELLE_JEDIT_BUILD_VERSION "$ISABELLE_JEDIT_BUILD_HOME/etc/settings")" |
162 MOVE=$(find doc-src \( -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') |
171 MOVE=$(find doc-src \( -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') |
163 mv -f $MOVE doc |
172 mv -f $MOVE doc |
164 rm doc/Isa-logics.eps |
173 rm doc/Isa-logics.eps |
165 rm doc/adaptation.dvi doc/adaptation.pdf doc/architecture.dvi doc/architecture.pdf |
174 rm doc/adaptation.dvi doc/adaptation.pdf doc/architecture.dvi doc/architecture.pdf |
166 rm -rf doc-src |
175 rm -rf doc-src |
|
176 |
|
177 if [ -n "$RETAIN_DOC_SRC" ]; then |
|
178 mv doc-src.orig doc-src |
|
179 fi |
167 |
180 |
168 mkdir -p contrib |
181 mkdir -p contrib |
169 cat >contrib/README <<EOF |
182 cat >contrib/README <<EOF |
170 This directory contains add-on components that contribute to the main |
183 This directory contains add-on components that contribute to the main |
171 Isabelle distribution. Separate licensing conditions apply, see each |
184 Isabelle distribution. Separate licensing conditions apply, see each |