more robust handling of directory layout variants;
authorwenzelm
Sat Aug 16 13:32:23 2008 +0200 (2008-08-16)
changeset 2791542581956d75b
parent 27914 9a7f17370ffb
child 27916 09b3010ffaf2
more robust handling of directory layout variants;
Admin/build
     1.1 --- a/Admin/build	Sat Aug 16 13:31:57 2008 +0200
     1.2 +++ b/Admin/build	Sat Aug 16 13:32:23 2008 +0200
     1.3 @@ -17,11 +17,15 @@
     1.4  ISABELLE_DIR="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)"
     1.5  
     1.6  if [ -d "$ISABELLE_DIR/Distribution" ]; then
     1.7 -  OLD_LAYOUT=true
     1.8    ISATOOL="$ISABELLE_DIR/Distribution/bin/isatool"
     1.9 +  ISABELLE_LIB="$ISABELLE_DIR/Distribution/lib"
    1.10 +  ISABELLE_SRC="$ISABELLE_DIR"
    1.11 +  ISABELLE_DOC_SRC="$ISABELLE_DIR/Doc"
    1.12  else
    1.13 -  OLD_LAYOUT=false
    1.14    ISATOOL="$ISABELLE_DIR/bin/isatool"
    1.15 +  ISABELLE_LIB="$ISABELLE_DIR/lib"
    1.16 +  ISABELLE_SRC="$ISABELLE_DIR/src"
    1.17 +  ISABELLE_DOC_SRC="$ISABELLE_DIR/doc-src"
    1.18  fi
    1.19  
    1.20  
    1.21 @@ -77,11 +81,7 @@
    1.22    echo "### Building graph browser ..."
    1.23    echo "###"
    1.24  
    1.25 -  if [ "$OLD_LAYOUT" = true ]; then
    1.26 -    cd "$ISABELLE_DIR/Distribution/lib/browser"
    1.27 -  else
    1.28 -    cd "$ISABELLE_DIR/lib/browser"
    1.29 -  fi
    1.30 +  cd "$ISABELLE_LIB/browser"
    1.31    make clean all || fail "Failed to build graph browser!"
    1.32  }
    1.33  
    1.34 @@ -92,12 +92,7 @@
    1.35    echo "### Building documentation ..."
    1.36    echo "###"
    1.37  
    1.38 -  if [ "$OLD_LAYOUT" = true ]; then
    1.39 -    cd "$ISABELLE_DIR/Doc"
    1.40 -  else
    1.41 -    cd "$ISABELLE_DIR/doc-src"
    1.42 -  fi
    1.43 -
    1.44 +  cd "$ISABELLE_DOC_SRC"
    1.45    for DOC in $(cat Dirs)
    1.46    do
    1.47      pushd "$DOC" >/dev/null
    1.48 @@ -114,24 +109,18 @@
    1.49    echo "### Building JVM components ..."
    1.50    echo "###"
    1.51  
    1.52 -  if [ "$OLD_LAYOUT" = true ]; then
    1.53 -    cd "$ISABELLE_DIR/Distribution"
    1.54 -  else
    1.55 -    cd "$ISABELLE_DIR"
    1.56 -  fi
    1.57 -
    1.58 -  pushd src/Pure >/dev/null
    1.59 +  pushd "$ISABELLE_SRC/Pure" >/dev/null
    1.60    "$ISATOOL" make jar || fail "Failed to build Pure.jar!"
    1.61    popd >/dev/null
    1.62  
    1.63 -  pushd lib/classes >/dev/null
    1.64 +  pushd "$ISABELLE_LIB/classes" >/dev/null
    1.65    ./mk
    1.66    [ -f isabelle.jar ] || fail "Failed to build Isabelle process wrapper!"
    1.67    popd >/dev/null
    1.68  
    1.69    if [ -d "$HOME/lib/jedit/current" ]; then
    1.70      type -p scalac >/dev/null || fail "Scala compiler unavailable"
    1.71 -    pushd lib/jedit/plugin >/dev/null
    1.72 +    pushd "$ISABELLE_LIB/jedit/plugin" >/dev/null
    1.73      ./mk
    1.74      [ -f ../isabelle.jar ] || fail "Failed to build jEdit plugin!"
    1.75      popd >/dev/null