From 21327e39ef6c6e04569bf8f138d242819139964d Mon Sep 17 00:00:00 2001 From: Pierre Letouzey Date: Tue, 4 Jul 2017 23:15:38 +0200 Subject: Extraction TestCompile foo : a new command for extraction + ocamlc Extraction TestCompile foo is equivalent to: Extraction "/tmp/testextraction1234.ml" foo ocamlfind ocamlc -I /tmp -c /tmp/testextraction1234.mli /tmp/testextraction1234.ml This command isn't meant for the end user, but rather as an helper for test-suite scripts. It only works with extraction to OCaml, and the generated code should be standalone. --- plugins/extraction/g_extraction.ml4 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/extraction/g_extraction.ml4') diff --git a/plugins/extraction/g_extraction.ml4 b/plugins/extraction/g_extraction.ml4 index 2fa453e53..f4b110253 100644 --- a/plugins/extraction/g_extraction.ml4 +++ b/plugins/extraction/g_extraction.ml4 @@ -66,6 +66,10 @@ VERNAC COMMAND EXTEND Extraction CLASSIFIED AS QUERY (* Monolithic extraction to a file *) | [ "Extraction" string(f) ne_global_list(l) ] -> [ full_extraction (Some f) l ] + +(* Extraction to a temporary file and OCaml compilation *) +| [ "Extraction" "TestCompile" ne_global_list(l) ] + -> [ extract_and_compile l ] END VERNAC COMMAND EXTEND SeparateExtraction CLASSIFIED AS QUERY -- cgit v1.2.3