Admin/build
changeset 34282 549969a7f582
parent 31831 92993da74973
child 34283 7911e83d06c0
equal deleted inserted replaced
34281:eedea6f0b37e 34282:549969a7f582
     1 #!/usr/bin/env bash
     1 #!/usr/bin/env bash
     2 #
     2 #
     3 # Administrative build for Isabelle source distribution.
     3 # Administrative build for Isabelle source distribution.
     4 
     4 
     5 ## global environment
       
     6 
       
     7 #paranoia setting for sunbroy
       
     8 PATH="/usr/local/dist/DIR/j2sdk1.5.0/bin:$PATH"
       
     9 
       
    10 PATH="/home/scala/current/bin:$PATH"
       
    11 if [ -z "$SCALA_HOME" ]; then
       
    12   export SCALA_HOME="$(dirname "$(dirname "$(type -p scalac)")")"
       
    13 fi
       
    14 
       
    15 
       
    16 ## directory layout
     5 ## directory layout
    17 
     6 
    18 ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)"
     7 if [ -z "$ISABELLE_HOME" ]; then
    19 ISABELLE_TOOL="$ISABELLE_HOME/bin/isabelle"
     8   ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)"
       
     9   ISABELLE_TOOL="$ISABELLE_HOME/bin/isabelle"
       
    10 fi
    20 
    11 
    21 
    12 
    22 ## diagnostics
    13 ## diagnostics
    23 
    14 
    24 PRG="$(basename "$0")"
    15 PRG="$(basename "$0")"
    33   The MODULES list may contain any of the following:
    24   The MODULES list may contain any of the following:
    34 
    25 
    35     all             all modules below
    26     all             all modules below
    36     browser         graph browser (requires jdk)
    27     browser         graph browser (requires jdk)
    37     doc             documentation (requires latex and rail)
    28     doc             documentation (requires latex and rail)
    38     jars            Scala/JVM components (requires scala)
    29     jars            Scala/JVM components (requires scala in SCALA_HOME)
    39 
    30 
    40 EOF
    31 EOF
    41   exit 1
    32   exit 1
    42 }
    33 }
    43 
    34 
    93 }
    84 }
    94 
    85 
    95 
    86 
    96 function build_jars ()
    87 function build_jars ()
    97 {
    88 {
    98   echo "###"
       
    99   echo "### Building Scala/JVM components ..."
       
   100   echo "###"
       
   101 
       
   102   [ -z "$SCALA_HOME" ] && fail "Scala unavailable: unknown SCALA_HOME"
       
   103 
       
   104   pushd "$ISABELLE_HOME/src/Pure" >/dev/null
    89   pushd "$ISABELLE_HOME/src/Pure" >/dev/null
   105   "$ISABELLE_TOOL" make jars || fail "Failed to build isabelle-scala.jar"
    90   "$ISABELLE_TOOL" env ./mk-jars || fail "Failed."
   106   popd >/dev/null
    91   popd >/dev/null
   107 }
    92 }
   108 
    93 
   109 
    94 
   110 ## main
    95 ## main