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
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
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
Charles Southerland
frama-c
Commits
06539502
Commit
06539502
authored
4 years ago
by
Andre Maroneze
Browse files
Options
Downloads
Patches
Plain Diff
[Dev] rename and improve check for reference configuration
parent
eec3cb36
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
INSTALL.md
+2
-2
2 additions, 2 deletions
INSTALL.md
bin/check-reference-configuration.sh
+12
-12
12 additions, 12 deletions
bin/check-reference-configuration.sh
reference-configuration.md
+0
-0
0 additions, 0 deletions
reference-configuration.md
with
14 additions
and
14 deletions
INSTALL.md
+
2
−
2
View file @
06539502
...
...
@@ -89,9 +89,9 @@ Why3 must be configured to make them available for Frama-C/WP:
why3 config --detect
```
###
Known working
configuration
###
Reference
configuration
See file
[
known_working_
configuration.md
](
known_working_
configuration.md
)
See file
[
reference-
configuration.md
](
reference-
configuration.md
)
for a set of packages that is known to work with Frama-C 21 (Scandium).
### Installing Custom Versions of Frama-C
...
...
This diff is collapsed.
Click to expand it.
bin/check-
working
-configuration.sh
→
bin/check-
reference
-configuration.sh
+
12
−
12
View file @
06539502
#!/bin/bash -eu
# Displays the current working configuration of OCaml dependencies of Frama-C,
# comparing them with the one in `
known_working_
configuration.md`.
# comparing them with the one in `
reference-
configuration.md`.
if
!
type
"opam"
>
/dev/null
;
then
opam
=
"
<none>
"
opam
=
"
NOT
"
else
opam
=
"
$(
opam
--version
)
"
fi
if
!
type
"ocaml"
>
/dev/null
;
then
ocaml
=
"
<none>
"
ocaml
=
"
NOT
"
else
ocaml
=
$(
ocaml
-vnum
)
fi
version_via_opam
()
{
v
=
$(
opam info
-f
version
"
$1
"
2>/dev/null
)
if
[
"
$v
"
=
""
]
;
then
echo
"
<none>
"
v
=
$(
opam info
-f
installed-
version
"
$1
"
2>/dev/null
)
if
[
"
$v
"
=
""
-o
"
$v
"
=
"--"
]
;
then
echo
"
NOT
"
else
echo
$v
fi
...
...
@@ -27,23 +27,23 @@ version_via_opam() {
version_via_ocamlfind
()
{
v
=
$(
ocamlfind query
-format
"
$1
"
2>/dev/null
)
if
[
"
$v
"
=
""
]
;
then
echo
"
<none>
"
echo
"
NOT
"
else
echo
$v
fi
}
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
>
/dev/null 2>&1
&&
pwd
)
"
kwc
=
"
$SCRIPT_DIR
/../
known_working_
configuration.md"
refconf
=
"
$SCRIPT_DIR
/../
reference-
configuration.md"
packages
=
$(
grep
'^- [^ ]*\.'
"
$
kwc
"
|
sed
's/^- //'
|
sed
's/ .*//'
)
packages
=
$(
grep
'^- [^ ]*\.'
"
$
refconf
"
|
sed
's/^- //'
|
sed
's/ .*//'
)
bold
=
$(
tput bold
)
normal
=
$(
tput sgr0
)
has_any_diffs
=
0
# Check OCaml version separately (not same syntax as the packages)
working_ocaml
=
$(
grep
"
\-
OCaml "
"
$
kwc
"
|
sed
's/.*OCaml //'
)
working_ocaml
=
$(
grep
"
\-
OCaml "
"
$
refconf
"
|
sed
's/.*OCaml //'
)
if
[
"
$working_ocaml
"
!=
"
$ocaml
"
]
;
then
echo
-n
"warning: OCaml
${
bold
}${
ocaml
}${
normal
}
installed, "
echo
"expected
${
bold
}${
working_ocaml
}${
normal
}
"
...
...
@@ -55,9 +55,9 @@ for package in $packages; do
name
=
${
package
%%.*
}
all_packages+
=
"
$package
"
working_version
=
$(
echo
$package
|
sed
's/^[^.]*\.//'
)
if
[
"
$opam
"
!=
"
<none>
"
]
;
then
if
[
"
$opam
"
!=
"
NOT
"
]
;
then
actual_version
=
$(
version_via_opam
$name
)
elif
[
"
$ocamlfind
"
!=
"
<none>
"
]
;
then
elif
[
"
$ocamlfind
"
!=
"
NOT
"
]
;
then
actual_version
=
$(
version_via_ocamlfind
$name
)
else
echo
"error: neither opam nor ocamlfind found."
...
...
This diff is collapsed.
Click to expand it.
known_working_
configuration.md
→
reference-
configuration.md
+
0
−
0
View file @
06539502
File moved
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