5 # Administrative build for Isabelle source distribution.
9 #paranoia setting for sunbroy
10 PATH="/usr/local/dist/DIR/j2sdk1.5.0/bin:$PATH"
12 PATH="/home/scala/scala/bin:$PATH"
17 ISABELLE_DIR="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)"
19 if [ -d "$ISABELLE_DIR/Distribution" ]; then
28 PRG="$(basename "$0")"
36 Produce Isabelle distribution modules from current repository sources.
37 The MODULES list may contain any of the following:
40 browser graph browser (requires jdk)
41 doc documentation (requires latex and rail)
42 jars JVM components (requires jdk and scala)
55 ## process command line
57 [ "$#" -eq 0 ] && usage
59 MODULES="$@"; shift "$#"
72 function build_browser ()
75 echo "### Building graph browser ..."
78 if [ "$OLD_LAYOUT" = true ]; then
79 cd "$ISABELLE_DIR/Distribution/lib/browser"
81 cd "$ISABELLE_DIR/lib/browser"
83 make clean all || fail "Failed to build graph browser!"
90 echo "### Building documentation ..."
93 if [ "$OLD_LAYOUT" = true ]; then
94 cd "$ISABELLE_DIR/Doc"
96 cd "$ISABELLE_DIR/doc-src"
99 for DOC in $(cat Dirs)
101 pushd "$DOC" >/dev/null
102 make clean dvi || fail "DVI document for $DOC failed!"
103 make clean pdf || fail "PDF document for $DOC failed!"
109 function build_jars ()
112 echo "### Building JVM components ..."
115 if [ "$OLD_LAYOUT" = true ]; then
116 cd "$ISABELLE_DIR/Distribution"
121 pushd lib/classes >/dev/null
123 [ -f isabelle.jar ] || fail "Failed to build Isabelle process wrapper!"
126 if [ -d "$HOME/lib/jedit/current" ]; then
127 type -p scalac >/dev/null || fail "Scala compiler unavailable"
128 pushd lib/jedit/plugin >/dev/null
130 [ -f ../isabelle.jar ] || fail "Failed to build jEdit plugin!"
133 echo "Warning: skipping jedit plugin"
140 for MODULE in $MODULES
144 browser) build_browser;;
147 *) fail "Bad module $MODULE"