--- a/Admin/lib/Tools/build_doc Sun Apr 03 23:03:30 2016 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-#
-# Author: Makarius
-#
-# DESCRIPTION: build Isabelle documentation
-
-isabelle_admin_build jars || exit $?
-
-
-case "$ISABELLE_JAVA_PLATFORM" in
- x86-*)
- ISABELLE_BUILD_JAVA_OPTIONS="$ISABELLE_BUILD_JAVA_OPTIONS32"
- ;;
- x86_64-*)
- ISABELLE_BUILD_JAVA_OPTIONS="$ISABELLE_BUILD_JAVA_OPTIONS64"
- ;;
-esac
-
-declare -a JAVA_ARGS; eval "JAVA_ARGS=($ISABELLE_BUILD_JAVA_OPTIONS)"
-
-isabelle java "${JAVA_ARGS[@]}" isabelle.Build_Doc "$@"
--- a/src/Pure/System/isabelle_tool.scala Sun Apr 03 23:03:30 2016 +0200
+++ b/src/Pure/System/isabelle_tool.scala Sun Apr 03 23:16:13 2016 +0200
@@ -69,6 +69,7 @@
}
register(Build.isabelle_tool)
+ register(Build_Doc.isabelle_tool)
register(Check_Sources.isabelle_tool)
register(Doc.isabelle_tool)
register(ML_Process.isabelle_tool)
--- a/src/Pure/Tools/build_doc.scala Sun Apr 03 23:03:30 2016 +0200
+++ b/src/Pure/Tools/build_doc.scala Sun Apr 03 23:16:13 2016 +0200
@@ -67,17 +67,16 @@
}
- /* command line entry point */
+ /* Isabelle tool wrapper */
- def main(args: Array[String])
+ val isabelle_tool = Isabelle_Tool("build_doc", "build Isabelle documentation", args =>
{
- Command_Line.tool {
- var all_docs = false
- var max_jobs = 1
- var system_mode = false
+ var all_docs = false
+ var max_jobs = 1
+ var system_mode = false
- val getopts =
- Getopts("""
+ val getopts =
+ Getopts("""
Usage: isabelle build_doc [OPTIONS] [DOCS ...]"
Options are:
@@ -88,19 +87,20 @@
Build Isabelle documentation from documentation sessions with
suitable document_variants entry.
""",
- "a" -> (_ => all_docs = true),
- "j:" -> (arg => max_jobs = Properties.Value.Int.parse(arg)),
- "s" -> (_ => system_mode = true))
+ "a" -> (_ => all_docs = true),
+ "j:" -> (arg => max_jobs = Properties.Value.Int.parse(arg)),
+ "s" -> (_ => system_mode = true))
+
+ val docs = getopts(args)
- val docs = getopts(args)
+ if (!all_docs && docs.isEmpty) getopts.usage()
- if (!all_docs && docs.isEmpty) getopts.usage()
-
- val options = Options.init()
- val progress = new Console_Progress()
+ val options = Options.init()
+ val progress = new Console_Progress()
+ val rc =
progress.interrupt_handler {
build_doc(options, progress, all_docs, max_jobs, system_mode, docs)
}
- }
- }
+ sys.exit(rc)
+ })
}