Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
147008d3
Commit
147008d3
authored
4 years ago
by
François Bobot
Browse files
Options
Downloads
Patches
Plain Diff
Use load_script facilities of dune
- remove the last use of ocamlfind
parent
f39dd28d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
share/Makefile.common
+2
-2
2 additions, 2 deletions
share/Makefile.common
src/kernel_services/plugin_entry_points/dynamic.ml
+11
-30
11 additions, 30 deletions
src/kernel_services/plugin_entry_points/dynamic.ml
with
14 additions
and
33 deletions
Makefile
+
1
−
1
View file @
147008d3
...
@@ -87,7 +87,7 @@ MAJOR_VERSION=$(shell $(SED) -E 's/^([0-9]+)\..*/\1/' VERSION)
...
@@ -87,7 +87,7 @@ MAJOR_VERSION=$(shell $(SED) -E 's/^([0-9]+)\..*/\1/' VERSION)
MINOR_VERSION
=
$(
shell
$(
SED
)
-E
's/^[0-9]+\.([0-9]+
)
.*/\1/'
VERSION
)
MINOR_VERSION
=
$(
shell
$(
SED
)
-E
's/^[0-9]+\.([0-9]+
)
.*/\1/'
VERSION
)
VERSION_CODENAME
=
$(
shell
$(
CAT
)
VERSION_CODENAME
)
VERSION_CODENAME
=
$(
shell
$(
CAT
)
VERSION_CODENAME
)
config.sed
:
VERSION share/Makefile.config Makefile configure.in
config.sed
:
VERSION share/Makefile.config
share/Makefile.common
Makefile configure.in
@
echo
"# generated file"
>
$@
@
echo
"# generated file"
>
$@
@
echo
"s|@VERSION_CODENAME@|
$(
VERSION_CODENAME
)
|"
>>
$@
@
echo
"s|@VERSION_CODENAME@|
$(
VERSION_CODENAME
)
|"
>>
$@
@
echo
"s|@VERSION@|
$(
VERSION
)
|"
>>
$@
@
echo
"s|@VERSION@|
$(
VERSION
)
|"
>>
$@
...
...
This diff is collapsed.
Click to expand it.
share/Makefile.common
+
2
−
2
View file @
147008d3
...
@@ -87,7 +87,7 @@ ifeq ($(DEVELOPMENT),yes)
...
@@ -87,7 +87,7 @@ ifeq ($(DEVELOPMENT),yes)
# - 67 (unused module parameter in functor signature): naming all parameters
# - 67 (unused module parameter in functor signature): naming all parameters
# in functor signatures is a common practice that seems harmless. Warning 60
# in functor signatures is a common practice that seems harmless. Warning 60
# ensures that named functor parameters are indeed used in the implementation.
# ensures that named functor parameters are indeed used in the implementation.
WARNINGS
?=
-w
+a-4-6-9-40-41-42-44-45-48-50-67
WARNINGS
?=
+a-4-6-9-40-41-42-44-45-48-50-67
# - 3 (deprecated feature) cannot always be avoided for OCaml stdlib when
# - 3 (deprecated feature) cannot always be avoided for OCaml stdlib when
# supporting several OCaml versions
# supporting several OCaml versions
...
@@ -105,7 +105,7 @@ WARN_ERROR ?= -warn-error +a-3-4-32-33-34-35-36-37-38-39-58
...
@@ -105,7 +105,7 @@ WARN_ERROR ?= -warn-error +a-3-4-32-33-34-35-36-37-38-39-58
else
else
WARNINGS
?=
-w
-a
WARNINGS
?=
-a
endif
#DEVELOPMENT
endif
#DEVELOPMENT
...
...
This diff is collapsed.
Click to expand it.
src/kernel_services/plugin_entry_points/dynamic.ml
+
11
−
30
View file @
147008d3
...
@@ -131,36 +131,17 @@ let load_packages pkgs =
...
@@ -131,36 +131,17 @@ let load_packages pkgs =
let
load_script
base
=
let
load_script
base
=
Klog
.
feedback
~
dkey
"compiling script '%s.ml'"
base
;
Klog
.
feedback
~
dkey
"compiling script '%s.ml'"
base
;
let
cmd
=
Buffer
.
create
80
in
let
result
,
stdout
,
stderr
=
let
fmt
=
Format
.
formatter_of_buffer
cmd
in
Dune_site_plugins
.
V1
.
load_script
begin
~
open_
:
[
"Frama_c_kernel"
]
if
Dynlink
.
is_native
then
~
warnings
:
Fc_config
.
ocaml_wflags
Format
.
fprintf
fmt
"ocamlfind ocamlopt -shared -o %S.cmxs"
base
(
base
^
".ml"
)
else
in
Format
.
fprintf
fmt
"ocamlfind ocamlc -c"
;
List
.
iter
(
Format
.
printf
"%s"
)
stdout
;
Format
.
fprintf
fmt
" -package frama-c.kernel -open Frama_c_kernel -g %s -warn-error a"
Fc_config
.
ocaml_wflags
;
List
.
iter
(
Format
.
eprintf
"%s"
)
stderr
;
if
Fc_config
.
is_gui
then
Format
.
pp_print_string
fmt
" -package lablgtk2"
;
match
result
with
Format
.
fprintf
fmt
" %s.ml"
base
;
|
`Ok
->
()
Format
.
pp_print_flush
fmt
()
;
|
`Compilation_failed
->
Klog
.
error
"compilation of '%s.ml' failed"
base
let
cmd
=
Buffer
.
contents
cmd
in
Klog
.
feedback
~
dkey
"running '%s'"
cmd
;
begin
let
res
=
Sys
.
command
cmd
in
if
res
<>
0
then
Klog
.
error
"compilation of '%s.ml' failed"
base
else
let
pkg
=
Filename
.
basename
base
in
if
Dynlink
.
is_native
then
dynlib_module
pkg
(
base
^
".cmxs"
)
else
dynlib_module
pkg
(
base
^
".cmo"
)
;
end
;
let
erase
=
Printf
.
sprintf
"rm -f %s.cm* %s.o"
base
base
in
Klog
.
feedback
~
dkey
"running '%s'"
erase
;
let
st
=
Sys
.
command
erase
in
if
st
<>
0
then
Klog
.
warning
"Error when cleaning '%s.[o|cm*]' files"
base
;
end
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
(* --- Command-Line Entry Points --- *)
(* --- Command-Line Entry Points --- *)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment