tuned messages;
authorwenzelm
Wed Jun 15 21:22:51 2011 +0200 (2011-06-15)
changeset 43405723a8af9d3f0
parent 43404 c8369f3d88a1
child 43406 40c67d894be4
tuned messages;
src/Pure/build-jars
src/Tools/jEdit/lib/Tools/jedit
     1.1 --- a/src/Pure/build-jars	Wed Jun 15 21:11:53 2011 +0200
     1.2 +++ b/src/Pure/build-jars	Wed Jun 15 21:22:51 2011 +0200
     1.3 @@ -117,18 +117,31 @@
     1.4  
     1.5  ## main
     1.6  
     1.7 +declare -a UPDATED=()
     1.8 +
     1.9  if [ -n "$FRESH" ]; then
    1.10    OUTDATED=true
    1.11  else
    1.12    OUTDATED=false
    1.13 -  for SOURCE in "${SOURCES[@]}"
    1.14 +  for TARGET in "${TARGETS[@]}"
    1.15    do
    1.16 -    [ ! -e "$SOURCE" ] && fail "Missing source file: $SOURCE"
    1.17 -    for TARGET in "${TARGETS[@]}"
    1.18 +    [ ! -e "$TARGET" ] && OUTDATED=true
    1.19 +  done
    1.20 +  if [ "$OUTDATED" = false ]; then
    1.21 +    for DEP in "${SOURCES[@]}"
    1.22      do
    1.23 -      [ ! -e "$TARGET" -o "$SOURCE" -nt "$TARGET" ] && OUTDATED=true
    1.24 +      [ ! -e "$DEP" ] && fail "Missing file: $DEP"
    1.25 +      UPDATE=""
    1.26 +      for TARGET in "${TARGETS[@]}"
    1.27 +      do
    1.28 +        [ "$DEP" -nt "$TARGET" ] && {
    1.29 +          OUTDATED=true
    1.30 +          UPDATE=true
    1.31 +        }
    1.32 +      done
    1.33 +      [ -n "$UPDATE" ] && UPDATED["${#UPDATED[@]}"]="$DEP"
    1.34      done
    1.35 -  done
    1.36 +  fi
    1.37  fi
    1.38  
    1.39  if [ "$OUTDATED" = true ]
    1.40 @@ -137,6 +150,14 @@
    1.41    echo "### Building Isabelle/Scala layer ..."
    1.42    echo "###"
    1.43  
    1.44 +  [ "${#UPDATED[@]}" -gt 0 ] && {
    1.45 +    echo "Changed files:"
    1.46 +    for FILE in "${UPDATED[@]}"
    1.47 +    do
    1.48 +      echo "  $FILE"
    1.49 +    done
    1.50 +  }
    1.51 +
    1.52    rm -rf classes && mkdir classes
    1.53    "$SCALA_HOME/bin/scalac" -unchecked -deprecation -d classes -target:jvm-1.5 "${SOURCES[@]}" || \
    1.54      fail "Failed to compile sources"
     2.1 --- a/src/Tools/jEdit/lib/Tools/jedit	Wed Jun 15 21:11:53 2011 +0200
     2.2 +++ b/src/Tools/jEdit/lib/Tools/jedit	Wed Jun 15 21:22:51 2011 +0200
     2.3 @@ -196,27 +196,26 @@
     2.4  
     2.5  if [ "$OUTDATED" = true ]
     2.6  then
     2.7 +  [ -z "$SCALA_HOME" ] && fail "Unknown SCALA_HOME -- Scala unavailable"
     2.8 +
     2.9 +  [ -e "$ISABELLE_HOME/Admin/build" ] && \
    2.10 +    { "$ISABELLE_HOME/Admin/build" "$BUILD_JARS" || exit $?; }
    2.11 +
    2.12 +  echo "###"
    2.13 +  echo "### Building Isabelle/jEdit ..."
    2.14 +  echo "###"
    2.15 +
    2.16    [ "${#UPDATED[@]}" -gt 0 ] && {
    2.17 -    echo "Rebuild due changed files:"
    2.18 +    echo "Changed files:"
    2.19      for FILE in "${UPDATED[@]}"
    2.20      do
    2.21        echo "  $FILE"
    2.22      done
    2.23    }
    2.24  
    2.25 -  [ -z "$SCALA_HOME" ] && fail "Unknown SCALA_HOME -- Scala unavailable"
    2.26 -
    2.27    [ -z "$ISABELLE_JEDIT_BUILD_HOME" ] && \
    2.28      fail "Unknown ISABELLE_JEDIT_BUILD_HOME -- missing auxiliary component"
    2.29  
    2.30 -  [ -e "$ISABELLE_HOME/Admin/build" ] && \
    2.31 -    { "$ISABELLE_HOME/Admin/build" "$BUILD_JARS" || exit $?; }
    2.32 -
    2.33 -
    2.34 -  echo "###"
    2.35 -  echo "### Building Isabelle/jEdit ..."
    2.36 -  echo "###"
    2.37 -
    2.38    rm -rf dist || failed
    2.39    mkdir -p dist dist/classes || failed
    2.40