src/Pure/Tools/build.scala
changeset 66737 2edc0c42c883
parent 66736 148891036469
child 66744 fec1504e5f03
     1.1 --- a/src/Pure/Tools/build.scala	Sun Oct 01 12:28:52 2017 +0200
     1.2 +++ b/src/Pure/Tools/build.scala	Sun Oct 01 13:07:31 2017 +0200
     1.3 @@ -357,6 +357,7 @@
     1.4      pide: Boolean = false,
     1.5      requirements: Boolean = false,
     1.6      all_sessions: Boolean = false,
     1.7 +    base_sessions: List[String] = Nil,
     1.8      exclude_session_groups: List[String] = Nil,
     1.9      exclude_sessions: List[String] = Nil,
    1.10      session_groups: List[String] = Nil,
    1.11 @@ -371,7 +372,7 @@
    1.12  
    1.13      val (selected, selected_sessions) =
    1.14        full_sessions.selection(
    1.15 -          Sessions.Selection(requirements, all_sessions, exclude_session_groups,
    1.16 +          Sessions.Selection(requirements, all_sessions, base_sessions, exclude_session_groups,
    1.17              exclude_sessions, session_groups, sessions) ++ selection)
    1.18  
    1.19      val deps =
    1.20 @@ -627,6 +628,7 @@
    1.21    {
    1.22      val build_options = Word.explode(Isabelle_System.getenv("ISABELLE_BUILD_OPTIONS"))
    1.23  
    1.24 +    var base_sessions: List[String] = Nil
    1.25      var select_dirs: List[Path] = Nil
    1.26      var numa_shuffling = false
    1.27      var pide = false
    1.28 @@ -650,6 +652,7 @@
    1.29  Usage: isabelle build [OPTIONS] [SESSIONS ...]
    1.30  
    1.31    Options are:
    1.32 +    -B NAME      include session NAME and all descendants
    1.33      -D DIR       include session directory and select its sessions
    1.34      -N           cyclic shuffling of NUMA CPU nodes (performance tuning)
    1.35      -P           build via PIDE protocol
    1.36 @@ -672,6 +675,7 @@
    1.37    Build and manage Isabelle sessions, depending on implicit settings:
    1.38  
    1.39  """ + Library.prefix_lines("  ", Build_Log.Settings.show()) + "\n",
    1.40 +      "B:" -> (arg => base_sessions = base_sessions ::: List(arg)),
    1.41        "D:" -> (arg => select_dirs = select_dirs ::: List(Path.explode(arg))),
    1.42        "N" -> (_ => numa_shuffling = true),
    1.43        "P" -> (_ => pide = true),
    1.44 @@ -722,6 +726,7 @@
    1.45            pide = pide,
    1.46            requirements = requirements,
    1.47            all_sessions = all_sessions,
    1.48 +          base_sessions = base_sessions,
    1.49            exclude_session_groups = exclude_session_groups,
    1.50            exclude_sessions = exclude_sessions,
    1.51            session_groups = session_groups,