lib/Tools/build
changeset 48340 6f4fc030882a
parent 48276 4bd480886813
child 48425 0d95980e9aae
     1.1 --- a/lib/Tools/build	Wed Jul 18 17:27:28 2012 +0200
     1.2 +++ b/lib/Tools/build	Wed Jul 18 19:47:10 2012 +0200
     1.3 @@ -17,6 +17,7 @@
     1.4    echo "  Options are:"
     1.5    echo "    -a           all sessions"
     1.6    echo "    -b           build target images"
     1.7 +  echo "    -d DIR       additional session directory with ROOT file"
     1.8    echo "    -l           list sessions only"
     1.9    echo "    -o OPTION    override session configuration OPTION (via NAME=VAL or NAME)"
    1.10    echo
    1.11 @@ -44,9 +45,10 @@
    1.12  BUILD_IMAGES=false
    1.13  LIST_ONLY=false
    1.14  
    1.15 +declare -a MORE_DIRS=()
    1.16  eval "declare -a BUILD_OPTIONS=($ISABELLE_BUILD_OPTIONS)"
    1.17  
    1.18 -while getopts "ablo:" OPT
    1.19 +while getopts "abd:lo:" OPT
    1.20  do
    1.21    case "$OPT" in
    1.22      a)
    1.23 @@ -55,6 +57,9 @@
    1.24      b)
    1.25        BUILD_IMAGES="true"
    1.26        ;;
    1.27 +    d)
    1.28 +      MORE_DIRS["${#MORE_DIRS[@]}"]="$OPTARG"
    1.29 +      ;;
    1.30      l)
    1.31        LIST_ONLY="true"
    1.32        ;;
    1.33 @@ -75,4 +80,5 @@
    1.34  [ -e "$ISABELLE_HOME/Admin/build" ] && { "$ISABELLE_HOME/Admin/build" jars || exit $?; }
    1.35  
    1.36  exec "$ISABELLE_TOOL" java isabelle.Build \
    1.37 -  "$ALL_SESSIONS" "$BUILD_IMAGES" "$LIST_ONLY" "${BUILD_OPTIONS[@]}" $'\n' "$@"
    1.38 +  "$ALL_SESSIONS" "$BUILD_IMAGES" "$LIST_ONLY" \
    1.39 +  "${MORE_DIRS[@]}" $'\n' "${BUILD_OPTIONS[@]}" $'\n' "$@"