clarified "purge": retain .aux files etc. before "isabelle document", to allow 'document_files' providing such generated files (see also c3ea910b3581, 38ce936acb99);
authorwenzelm
Tue Sep 19 14:26:25 2017 +0200 (19 months ago)
changeset 6668074a1b722507e
parent 66679 ed8d359d92e4
child 66681 0879f2045965
clarified "purge": retain .aux files etc. before "isabelle document", to allow 'document_files' providing such generated files (see also c3ea910b3581, 38ce936acb99);
src/Pure/Thy/present.ML
     1.1 --- a/src/Pure/Thy/present.ML	Tue Sep 19 14:22:51 2017 +0200
     1.2 +++ b/src/Pure/Thy/present.ML	Tue Sep 19 14:26:25 2017 +0200
     1.3 @@ -196,7 +196,7 @@
     1.4  
     1.5  fun isabelle_document {verbose, purge} format name tags dir =
     1.6    let
     1.7 -    val s = "isabelle document" ^ (if purge then " -c" else "") ^ " -o '" ^ format ^ "' \
     1.8 +    val s = "isabelle document -o '" ^ format ^ "' \
     1.9        \-n '" ^ name ^ "' -t '" ^ tags ^ "' " ^ File.bash_path dir ^ " 2>&1";
    1.10      val doc_path = Path.appends [dir, Path.parent, Path.basic name |> Path.ext format];
    1.11      val _ = if verbose then writeln s else ();
    1.12 @@ -206,6 +206,7 @@
    1.13          cat_error out ("Failed to build document " ^ quote (show_path doc_path))
    1.14        else if verbose then writeln out
    1.15        else ();
    1.16 +    val _ = if purge andalso rc = 0 then Isabelle_System.rm_tree dir else ();
    1.17    in doc_path end;
    1.18  
    1.19