3 # Administrative build for Isabelle source distribution.
7 if [ -z "$ISABELLE_HOME" ]; then
8 ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)"
9 ISABELLE_TOOL="$ISABELLE_HOME/bin/isabelle"
15 PRG="$(basename "$0")"
23 Produce Isabelle distribution modules from current repository sources.
24 The MODULES list may contain any of the following:
26 all all modules below *except* doc-src
27 browser graph browser (requires jdk)
28 doc documentation (requires latex and rail)
29 doc-src documentation sources from Isabelle theories
30 jars Isabelle/Scala layer (requires \$ISABELLE_JDK_HOME and \$SCALA_HOME)
31 jars_test test separate build of jars
32 jars_fresh fresh build of jars
45 ## process command line
47 [ "$#" -eq 0 ] && usage
49 MODULES="$@"; shift "$#"
62 function build_browser ()
64 pushd "$ISABELLE_HOME/lib/browser" >/dev/null
65 "$ISABELLE_TOOL" env ./build || exit $?
73 echo "### Building documentation ..."
76 cd "$ISABELLE_HOME/doc-src"
77 for DOC in $(cat Dirs)
79 pushd "$DOC" >/dev/null
80 make clean dvi || fail "DVI document for $DOC failed!"
81 make clean pdf || fail "PDF document for $DOC failed!"
87 function build_doc-src ()
90 echo "### Building documentation sources..."
93 cd "$ISABELLE_HOME/doc-src"
94 for DOC in $(cat Dirs)
96 pushd "$DOC" >/dev/null
97 if [[ -f "IsaMakefile" ]]
99 "$ISABELLE_TOOL" make || exit $?
106 function build_jars ()
108 pushd "$ISABELLE_HOME/src/Pure" >/dev/null
109 "$ISABELLE_TOOL" env ./build-jars "$@" || exit $?
116 for MODULE in $MODULES
120 browser) build_browser;;
122 doc-src) build_doc-src;;
124 jars_fresh) build_jars -f;;
125 jars_test) build_jars -t;;
126 *) fail "Bad module $MODULE"