clarified "jars" target;
authorwenzelm
Sun Jun 28 17:55:44 2009 +0200 (2009-06-28)
changeset 3183192993da74973
parent 31830 4c721440ee62
child 31841 2ce69d6d5581
clarified "jars" target;
Admin/build
src/Pure/IsaMakefile
     1.1 --- a/Admin/build	Sun Jun 28 17:42:22 2009 +0200
     1.2 +++ b/Admin/build	Sun Jun 28 17:55:44 2009 +0200
     1.3 @@ -8,6 +8,9 @@
     1.4  PATH="/usr/local/dist/DIR/j2sdk1.5.0/bin:$PATH"
     1.5  
     1.6  PATH="/home/scala/current/bin:$PATH"
     1.7 +if [ -z "$SCALA_HOME" ]; then
     1.8 +  export SCALA_HOME="$(dirname "$(dirname "$(type -p scalac)")")"
     1.9 +fi
    1.10  
    1.11  
    1.12  ## directory layout
    1.13 @@ -32,7 +35,7 @@
    1.14      all             all modules below
    1.15      browser         graph browser (requires jdk)
    1.16      doc             documentation (requires latex and rail)
    1.17 -    jars            JVM components (requires jdk and scala)
    1.18 +    jars            Scala/JVM components (requires scala)
    1.19  
    1.20  EOF
    1.21    exit 1
    1.22 @@ -93,13 +96,13 @@
    1.23  function build_jars ()
    1.24  {
    1.25    echo "###"
    1.26 -  echo "### Building JVM components ..."
    1.27 +  echo "### Building Scala/JVM components ..."
    1.28    echo "###"
    1.29  
    1.30 -  type -p scalac >/dev/null || fail "Scala compiler unavailable"
    1.31 +  [ -z "$SCALA_HOME" ] && fail "Scala unavailable: unknown SCALA_HOME"
    1.32  
    1.33    pushd "$ISABELLE_HOME/src/Pure" >/dev/null
    1.34 -  "$ISABELLE_TOOL" make jar || fail "Failed to build Pure.jar!"
    1.35 +  "$ISABELLE_TOOL" make jars || fail "Failed to build isabelle-scala.jar"
    1.36    popd >/dev/null
    1.37  }
    1.38  
     2.1 --- a/src/Pure/IsaMakefile	Sun Jun 28 17:42:22 2009 +0200
     2.2 +++ b/src/Pure/IsaMakefile	Sun Jun 28 17:55:44 2009 +0200
     2.3 @@ -130,19 +130,19 @@
     2.4  SCALA_TARGET = $(ISABELLE_HOME)/lib/classes/Pure.jar
     2.5  ISABELLE_SCALA = $(ISABELLE_HOME)/lib/classes/isabelle-scala.jar
     2.6  
     2.7 -jar: $(SCALA_TARGET)
     2.8 +jars: $(SCALA_TARGET)
     2.9  
    2.10  $(SCALA_TARGET): $(SCALA_FILES)
    2.11  	@rm -rf classes && mkdir classes
    2.12 -	scalac -deprecation -d classes -target jvm-1.5 $(SCALA_FILES)
    2.13 -	scaladoc -d classes $(SCALA_FILES)
    2.14 +	$(SCALA_HOME)/bin/scalac -deprecation -d classes -target jvm-1.5 $(SCALA_FILES)
    2.15 +	$(SCALA_HOME)/bin/scaladoc -d classes $(SCALA_FILES)
    2.16  	@cp $(SCALA_FILES) classes/isabelle
    2.17  	@mkdir -p `dirname $@`
    2.18 -	cd classes; jar cfe `jvmpath $@` isabelle.GUI_Setup isabelle
    2.19 -	cd classes; jar xf `jvmpath $(SCALA_HOME)/lib/scala-swing.jar`; \
    2.20 +	@cd classes; jar cfe `jvmpath $@` isabelle.GUI_Setup isabelle
    2.21 +	@cd classes; jar xf `jvmpath $(SCALA_HOME)/lib/scala-swing.jar`; \
    2.22            cp $(SCALA_HOME)/lib/scala-library.jar $(ISABELLE_SCALA); \
    2.23            jar ufe `jvmpath $(ISABELLE_SCALA)` isabelle.GUI_Setup isabelle scala
    2.24  	@rm -rf classes
    2.25  
    2.26 -clean-jar:
    2.27 +clean-jars:
    2.28  	@rm -f $(SCALA_TARGET) $(ISABELLE_SCALA)