--- a/src/Pure/build-jars Wed Jun 15 21:11:53 2011 +0200
+++ b/src/Pure/build-jars Wed Jun 15 21:22:51 2011 +0200
@@ -117,18 +117,31 @@
## main
+declare -a UPDATED=()
+
if [ -n "$FRESH" ]; then
OUTDATED=true
else
OUTDATED=false
- for SOURCE in "${SOURCES[@]}"
+ for TARGET in "${TARGETS[@]}"
do
- [ ! -e "$SOURCE" ] && fail "Missing source file: $SOURCE"
- for TARGET in "${TARGETS[@]}"
+ [ ! -e "$TARGET" ] && OUTDATED=true
+ done
+ if [ "$OUTDATED" = false ]; then
+ for DEP in "${SOURCES[@]}"
do
- [ ! -e "$TARGET" -o "$SOURCE" -nt "$TARGET" ] && OUTDATED=true
+ [ ! -e "$DEP" ] && fail "Missing file: $DEP"
+ UPDATE=""
+ for TARGET in "${TARGETS[@]}"
+ do
+ [ "$DEP" -nt "$TARGET" ] && {
+ OUTDATED=true
+ UPDATE=true
+ }
+ done
+ [ -n "$UPDATE" ] && UPDATED["${#UPDATED[@]}"]="$DEP"
done
- done
+ fi
fi
if [ "$OUTDATED" = true ]
@@ -137,6 +150,14 @@
echo "### Building Isabelle/Scala layer ..."
echo "###"
+ [ "${#UPDATED[@]}" -gt 0 ] && {
+ echo "Changed files:"
+ for FILE in "${UPDATED[@]}"
+ do
+ echo " $FILE"
+ done
+ }
+
rm -rf classes && mkdir classes
"$SCALA_HOME/bin/scalac" -unchecked -deprecation -d classes -target:jvm-1.5 "${SOURCES[@]}" || \
fail "Failed to compile sources"
--- a/src/Tools/jEdit/lib/Tools/jedit Wed Jun 15 21:11:53 2011 +0200
+++ b/src/Tools/jEdit/lib/Tools/jedit Wed Jun 15 21:22:51 2011 +0200
@@ -196,27 +196,26 @@
if [ "$OUTDATED" = true ]
then
+ [ -z "$SCALA_HOME" ] && fail "Unknown SCALA_HOME -- Scala unavailable"
+
+ [ -e "$ISABELLE_HOME/Admin/build" ] && \
+ { "$ISABELLE_HOME/Admin/build" "$BUILD_JARS" || exit $?; }
+
+ echo "###"
+ echo "### Building Isabelle/jEdit ..."
+ echo "###"
+
[ "${#UPDATED[@]}" -gt 0 ] && {
- echo "Rebuild due changed files:"
+ echo "Changed files:"
for FILE in "${UPDATED[@]}"
do
echo " $FILE"
done
}
- [ -z "$SCALA_HOME" ] && fail "Unknown SCALA_HOME -- Scala unavailable"
-
[ -z "$ISABELLE_JEDIT_BUILD_HOME" ] && \
fail "Unknown ISABELLE_JEDIT_BUILD_HOME -- missing auxiliary component"
- [ -e "$ISABELLE_HOME/Admin/build" ] && \
- { "$ISABELLE_HOME/Admin/build" "$BUILD_JARS" || exit $?; }
-
-
- echo "###"
- echo "### Building Isabelle/jEdit ..."
- echo "###"
-
rm -rf dist || failed
mkdir -p dist dist/classes || failed