Skip to content
Snippets Groups Projects
Commit 6c48f892 authored by Patrick Baudin's avatar Patrick Baudin Committed by François Bobot
Browse files

[Scripts] bin/frama-c-build-scripts.sh alllows generation of the opam file

parent be848d6b
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,15 @@ SCRIPT_LIBS="" ...@@ -59,7 +59,15 @@ SCRIPT_LIBS=""
DuneProject () { DuneProject () {
echo "(lang dune 3.0)" echo "(lang dune 3.0)"
echo "(package (name ${PACKAGE}))" echo "(generate_opam_files true)"
echo "(name ${PACKAGE})"
echo "(maintainers \"anonymous\")"
echo "(package (name ${PACKAGE})"
echo " (depends"
echo " (\"frama-c\" (>= 26.0))"
echo " )"
echo " (tags (\"Frama-C scripts\"))"
echo ")"
} }
Dune () { Dune () {
...@@ -120,6 +128,12 @@ fi ...@@ -120,6 +128,12 @@ fi
echo "To compile the all scripts defined inside this 'dune project' \"${PACKAGE}\", runs the following command:" echo "To compile the all scripts defined inside this 'dune project' \"${PACKAGE}\", runs the following command:"
EchoDuneCmd "dune build @install" EchoDuneCmd "dune build @install"
echo "So, the script libraries, are installed into the local '_build' directory." echo "So, the script libraries, are installed into the local '_build' directory."
echo "That also generate the 'opam' file \"${PACKAGE}.opam\" allowing a global installation of all script libraries."
echo "" echo ""
echo "To load this script library from Frama-C, runs the following command:" echo "To load this script library from Frama-C, runs the following command:"
EchoDuneCmd "dune exec -- frama-c -load-library ${PACKAGE}.${SCRIPT_NAME} ..." EchoDuneCmd "dune exec -- frama-c -load-library ${PACKAGE}.${SCRIPT_NAME} ..."
echo ""
echo "All libraries of this 'dune project' \"${PACKAGE}\" can also be installed via 'dune' using from the generated 'opam' file: \"${PACKAGE}.opam\""
EchoDuneCmd "dune install"
echo "Then, this script library can directly be loaded by Frama-C from the following command:"
echo " > frama-c -load-library ${PACKAGE}.${SCRIPT_NAME} ..."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment