diff --git a/packages/framac_plugin/dune_ b/packages/framac_plugin/dune_ new file mode 100644 index 0000000..13a4e15 --- /dev/null +++ b/packages/framac_plugin/dune_ @@ -0,0 +1,15 @@ +; generated by drom from package skeleton 'framac_plugin' + +(plugin + (name !{program-name}) + (package !{name}) + (libraries !{program-name}.core) + (site (frama-c plugins)) + ) + +(library + (name !{program-name}_lib) + (public_name !{program-name}.core) + (flags -open Frama_c_kernel :standard) + (libraries frama-c.kernel !{dune-libraries}) +) \ No newline at end of file diff --git a/packages/framac_plugin/index.mld b/packages/framac_plugin/index.mld new file mode 100644 index 0000000..cf23593 --- /dev/null +++ b/packages/framac_plugin/index.mld @@ -0,0 +1,5 @@ +{1 Plugin !{name}} + +!{description} + +Version: !{version} \ No newline at end of file diff --git a/packages/framac_plugin/main.ml b/packages/framac_plugin/main.ml new file mode 100644 index 0000000..641120d --- /dev/null +++ b/packages/framac_plugin/main.ml @@ -0,0 +1,23 @@ +!{header-ml} + +(* If you delete or rename this file, you should add + 'src/!{name}/main.ml' to the 'skip' field in "drom.toml" *) + +let help_msg = "output a warm welcome message to the user" +module Self = Plugin.Register (struct + let name = "!{program-name}" + let shortname = "!{name}" + let help = help_msg + end) + +let run () = + try + let chan = open_out "hello.out" in + Printf.fprintf chan "Hello, world!\n"; + flush chan; + close_out chan + with Sys_error _ as exc -> + let msg = Printexc.to_string exc in + Printf.eprintf "There was an error: %s\n" msg + +let () = Boot.Main.extend run diff --git a/packages/framac_plugin/package.toml b/packages/framac_plugin/package.toml new file mode 100644 index 0000000..ea77120 --- /dev/null +++ b/packages/framac_plugin/package.toml @@ -0,0 +1,4 @@ +# Everything above is inherited from 'virtual' package skeleton + +skeleton := "framac_plugin" +kind := "program" diff --git a/packages/framac_plugin/skeleton.toml b/packages/framac_plugin/skeleton.toml new file mode 100644 index 0000000..163e248 --- /dev/null +++ b/packages/framac_plugin/skeleton.toml @@ -0,0 +1,9 @@ +[skeleton] +name = "framac_plugin" +inherits = "virtual" + +[file] +dune_ = { file = "dune", skips = "@dune" } +"main.ml" = {skips = "@code" } +"index.mld" = { skips = [ "@docs" ] } +