lib/Tools/build
changeset 48737 f3bbb9ca57d6
parent 48601 655b08c2cd89
child 48780 49a965020394
     1.1 --- a/lib/Tools/build	Wed Aug 08 14:45:40 2012 +0200
     1.2 +++ b/lib/Tools/build	Wed Aug 08 15:58:40 2012 +0200
     1.3 @@ -26,10 +26,11 @@
     1.4    echo "Usage: isabelle $PRG [OPTIONS] [SESSIONS ...]"
     1.5    echo
     1.6    echo "  Options are:"
     1.7 +  echo "    -D DIR       include session directory and select its sessions"
     1.8    echo "    -a           select all sessions"
     1.9    echo "    -b           build heap images"
    1.10    echo "    -c           clean build"
    1.11 -  echo "    -d DIR       include session directory with ROOT file"
    1.12 +  echo "    -d DIR       include session directory"
    1.13    echo "    -g NAME      select session group NAME"
    1.14    echo "    -j INT       maximum number of parallel jobs (default 1)"
    1.15    echo "    -n           no build -- test dependencies only"
    1.16 @@ -57,10 +58,11 @@
    1.17  
    1.18  ## process command line
    1.19  
    1.20 +declare -a SELECT_DIRS=()
    1.21  ALL_SESSIONS=false
    1.22  BUILD_HEAP=false
    1.23  CLEAN_BUILD=false
    1.24 -declare -a MORE_DIRS=()
    1.25 +declare -a INCLUDE_DIRS=()
    1.26  declare -a SESSION_GROUPS=()
    1.27  MAX_JOBS=1
    1.28  NO_BUILD=false
    1.29 @@ -68,9 +70,12 @@
    1.30  SYSTEM_MODE=false
    1.31  VERBOSE=false
    1.32  
    1.33 -while getopts "abcd:g:j:no:sv" OPT
    1.34 +while getopts "D:abcd:g:j:no:sv" OPT
    1.35  do
    1.36    case "$OPT" in
    1.37 +    D)
    1.38 +      SELECT_DIRS["${#SELECT_DIRS[@]}"]="$OPTARG"
    1.39 +      ;;
    1.40      a)
    1.41        ALL_SESSIONS="true"
    1.42        ;;
    1.43 @@ -81,7 +86,7 @@
    1.44        CLEAN_BUILD="true"
    1.45        ;;
    1.46      d)
    1.47 -      MORE_DIRS["${#MORE_DIRS[@]}"]="$OPTARG"
    1.48 +      INCLUDE_DIRS["${#INCLUDE_DIRS[@]}"]="$OPTARG"
    1.49        ;;
    1.50      g)
    1.51        SESSION_GROUPS["${#SESSION_GROUPS[@]}"]="$OPTARG"
    1.52 @@ -126,7 +131,8 @@
    1.53  "$ISABELLE_TOOL" java isabelle.Build \
    1.54    "$ALL_SESSIONS" "$BUILD_HEAP" "$CLEAN_BUILD" "$MAX_JOBS" \
    1.55    "$NO_BUILD" "$SYSTEM_MODE" "$VERBOSE" \
    1.56 -  "${MORE_DIRS[@]}" $'\n' "${SESSION_GROUPS[@]}" $'\n' "${BUILD_OPTIONS[@]}" $'\n' "$@"
    1.57 +  "${SELECT_DIRS[@]}" $'\n' "${INCLUDE_DIRS[@]}" $'\n' \
    1.58 +  "${SESSION_GROUPS[@]}" $'\n' "${BUILD_OPTIONS[@]}" $'\n' "$@"
    1.59  RC="$?"
    1.60  
    1.61  if [ "$NO_BUILD" = false -a "$VERBOSE" = true ]; then