src/Pure/build-jars
changeset 43523 5aaa0fe92672
parent 43521 d477b92109b8
child 43600 4ac04bf9ff89
     1.1 --- a/src/Pure/build-jars	Thu Jun 23 16:34:29 2011 +0200
     1.2 +++ b/src/Pure/build-jars	Thu Jun 23 17:17:40 2011 +0200
     1.3 @@ -107,16 +107,10 @@
     1.4  
     1.5  
     1.6  
     1.7 -## dependencies
     1.8 +# build
     1.9  
    1.10  TARGET_DIR="$ISABELLE_HOME/lib/classes"
    1.11 -PURE_JAR="$TARGET_DIR/Pure.jar"
    1.12 -FULL_JAR="$TARGET_DIR/isabelle-scala.jar"
    1.13 -
    1.14 -declare -a TARGETS=("$PURE_JAR" "$FULL_JAR")
    1.15 -
    1.16 -
    1.17 -## main
    1.18 +TARGET="$TARGET_DIR/ext/Pure.jar"
    1.19  
    1.20  declare -a UPDATED=()
    1.21  
    1.22 @@ -124,23 +118,16 @@
    1.23    OUTDATED=true
    1.24  else
    1.25    OUTDATED=false
    1.26 -  for TARGET in "${TARGETS[@]}"
    1.27 -  do
    1.28 -    [ ! -e "$TARGET" ] && OUTDATED=true
    1.29 -  done
    1.30 -  if [ "$OUTDATED" = false ]; then
    1.31 +  if [ ! -e "$TARGET" ]; then
    1.32 +    OUTDATED=true
    1.33 +  else
    1.34      for DEP in "${SOURCES[@]}"
    1.35      do
    1.36        [ ! -e "$DEP" ] && fail "Missing file: $DEP"
    1.37 -      UPDATE=""
    1.38 -      for TARGET in "${TARGETS[@]}"
    1.39 -      do
    1.40 -        [ "$DEP" -nt "$TARGET" ] && {
    1.41 -          OUTDATED=true
    1.42 -          UPDATE=true
    1.43 -        }
    1.44 -      done
    1.45 -      [ -n "$UPDATE" ] && UPDATED["${#UPDATED[@]}"]="$DEP"
    1.46 +      [ "$DEP" -nt "$TARGET" ] && {
    1.47 +        OUTDATED=true
    1.48 +        UPDATED["${#UPDATED[@]}"]="$DEP"
    1.49 +      }
    1.50      done
    1.51    fi
    1.52  fi
    1.53 @@ -162,7 +149,7 @@
    1.54    rm -rf classes && mkdir classes
    1.55    "$SCALA_HOME/bin/scalac" -unchecked -deprecation -d classes -target:jvm-1.5 "${SOURCES[@]}" || \
    1.56      fail "Failed to compile sources"
    1.57 -  mkdir -p "$TARGET_DIR" || fail "Failed to create directory $TARGET_DIR"
    1.58 +  mkdir -p "$TARGET_DIR/ext" || fail "Failed to create directory $TARGET_DIR/ext"
    1.59  
    1.60    pushd classes >/dev/null
    1.61  
    1.62 @@ -170,18 +157,10 @@
    1.63    mkdir -p "$(dirname "$CHARSET_SERVICE")"
    1.64    echo isabelle.Isabelle_Charset_Provider > "$CHARSET_SERVICE"
    1.65  
    1.66 -  jar cfe "$(jvmpath "$PURE_JAR")" isabelle.GUI_Setup META-INF isabelle || \
    1.67 -    fail "Failed to produce $PURE_JAR"
    1.68 -
    1.69 -  cp "$SCALA_HOME/lib/scala-swing.jar" .
    1.70 -  jar xf scala-swing.jar
    1.71 +  jar cfe "$(jvmpath "$TARGET")" isabelle.GUI_Setup META-INF isabelle || \
    1.72 +    fail "Failed to produce $TARGET"
    1.73  
    1.74 -  cp "$SCALA_HOME/lib/scala-library.jar" "$FULL_JAR"
    1.75 -  jar ufe "$(jvmpath "$FULL_JAR")" isabelle.GUI_Setup isabelle scala || \
    1.76 -    fail "Failed to produce $FULL_JAR"
    1.77 -
    1.78 -  mkdir -p "$TARGET_DIR/ext"
    1.79 -  cp "$FULL_JAR" "$TARGET_DIR/ext/"
    1.80 +  cp "$SCALA_HOME/lib/scala-swing.jar" "$SCALA_HOME/lib/scala-library.jar" "$TARGET_DIR/ext"
    1.81  
    1.82    popd >/dev/null
    1.83