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
30610b6e
Commit
30610b6e
authored
3 years ago
by
Andre Maroneze
Browse files
Options
Downloads
Patches
Plain Diff
[analysis-scripts] add .wp target and rules to analysis makefile
parent
9bcc34d7
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
share/analysis-scripts/analysis.mk
+32
-2
32 additions, 2 deletions
share/analysis-scripts/analysis.mk
share/analysis-scripts/template.mk
+3
-0
3 additions, 0 deletions
share/analysis-scripts/template.mk
tests/fc_script/oracle/GNUmakefile
+3
-0
3 additions, 0 deletions
tests/fc_script/oracle/GNUmakefile
with
38 additions
and
2 deletions
share/analysis-scripts/analysis.mk
+
32
−
2
View file @
30610b6e
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
# EVAFLAGS flags to use with the Eva plugin
# EVAFLAGS flags to use with the Eva plugin
# EVABUILTINS Eva builtins to be set (via -eva-builtin)
# EVABUILTINS Eva builtins to be set (via -eva-builtin)
# EVAUSESPECS Eva functions to be overridden by specs (-eva-use-spec)
# EVAUSESPECS Eva functions to be overridden by specs (-eva-use-spec)
# WPFLAGS flags to use with the WP plugin
#
#
# FLAMEGRAPH If set (to any value), running an analysis will produce an
# FLAMEGRAPH If set (to any value), running an analysis will produce an
# SVG + HTML flamegraph at the end.
# SVG + HTML flamegraph at the end.
...
@@ -127,6 +128,7 @@ EVAFLAGS ?= \
...
@@ -127,6 +128,7 @@ EVAFLAGS ?= \
-calldeps
-from-verbose
0
\
-calldeps
-from-verbose
0
\
$(
if
$(
EVABUILTINS
)
,
-eva-builtin
=
$(
call fc_list,
$(
EVABUILTINS
))
,
)
\
$(
if
$(
EVABUILTINS
)
,
-eva-builtin
=
$(
call fc_list,
$(
EVABUILTINS
))
,
)
\
$(
if
$(
EVAUSESPECS
)
,
-eva-use-spec
$(
call fc_list,
$(
EVAUSESPECS
))
,
)
$(
if
$(
EVAUSESPECS
)
,
-eva-use-spec
$(
call fc_list,
$(
EVAUSESPECS
))
,
)
WPFLAGS
?=
FCFLAGS
?=
FCFLAGS
?=
FCGUIFLAGS
?=
FCGUIFLAGS
?=
...
@@ -157,7 +159,7 @@ SHELL := $(shell which bash)
...
@@ -157,7 +159,7 @@ SHELL := $(shell which bash)
.FORCE
:
.FORCE
:
.SUFFIXES
:
#
Disable make builtins
.SUFFIXES
:
#
Disable make builtins
%.parse/command %.eva/command
:
%.parse/command %.eva/command
%.wp/command
:
@
#
@
#
%.parse
:
SOURCES = $(filter-out %/command
,
$^)
%.parse
:
SOURCES = $(filter-out %/command
,
$^)
...
@@ -184,7 +186,7 @@ SHELL := $(shell which bash)
...
@@ -184,7 +186,7 @@ SHELL := $(shell which bash)
printf
'cmd_args=%q\n'
"
$(
subst "
,
\"
,
$(
wordlist 2,999,
$(
PARSE
)))
"
printf
'cmd_args=%q\n'
"
$(
subst "
,
\"
,
$(
wordlist 2,999,
$(
PARSE
)))
"
} >>
$@
/stats.txt
} >>
$@
/stats.txt
mv
$@
/{running,command}
mv
$@
/{running,command}
touch
$@
# Update timestamp and prevent
s
remake if nothing changes
touch
$@
# Update timestamp and prevent remake if nothing changes
%.eva
:
EVA = $(FRAMAC) $(FCFLAGS) -eva $(EVAFLAGS)
%.eva
:
EVA = $(FRAMAC) $(FCFLAGS) -eva $(EVAFLAGS)
%.eva
:
PARSE_RESULT = $(word 1
,
$(subst .
,
,
$*)).parse
%.eva
:
PARSE_RESULT = $(word 1
,
$(subst .
,
,
$*)).parse
...
@@ -226,6 +228,34 @@ SHELL := $(shell which bash)
...
@@ -226,6 +228,34 @@ SHELL := $(shell which bash)
mv
$@
/{running,command}
mv
$@
/{running,command}
touch
$@
# Update timestamp and prevents remake if nothing changes
touch
$@
# Update timestamp and prevents remake if nothing changes
%.wp
:
WP = $(FRAMAC) $(FCFLAGS) -wp $(WPFLAGS)
%.wp
:
PARSE_RESULT = $(word 1
,
$(subst .
,
,
$*)).parse
%.wp
:
$$(PARSE_RESULT) $$(shell $(DIR)cmd-dep.sh $$@/command $$(WP)) $(if $(BENCHMARK)
,
.FORCE
,
)
@$(
call display_command,
$(
WP
))
mkdir
-p
$@
mv
-f
$@
/
{
command
,running
}
{
$(
call time_with_output,
$@
/stats.txt
)
\
$(
WP
)
\
-load
$(
PARSE_RESULT
)
/framac.sav
-save
$@
/framac.sav
\
-kernel-log
w:
$@
/warnings.log
\
-wp-log
w:
$@
/warnings.log
\
-then
\
-report-csv
$@
/alarms.csv
-report-no-proven
\
-report-log
w:
$@
/warnings.log
\
||
(
$(
RM
)
$@
/stats.txt
&&
false
)
# Prevents having error code reporting in stats.txt
}
2>&1 |
tee
$@
/wp.log
{
printf
'timestamp=%q\n'
"
$(
HR_TIMESTAMP
)
"
;
printf
'warnings=%s\n'
"
`
cat
$@
/warnings.log |
grep
':\[\(wp\|kernel\)\]'
|
wc
-l
`
"
;
printf
'alarms=%s\n'
"
`
expr
$$(
cat
$@
/alarms.csv |
wc
-l
)
- 1
`
"
;
printf
'cmd_args=%q\n'
"
$(
subst "
,
\"
,
$(
wordlist 2,999,
$(
WP
)))
";
printf 'benchmark_tag=%s' "
$(
BENCHMARK
)
"
} >>
$@
/stats.txt
mv
$@
/{running,command}
touch
$@
# Update timestamp and prevent remake if nothing changes
%.gui
:
%
%.gui
:
%
$(
FRAMAC_GUI
)
$(
FCGUIFLAGS
)
-load
$^
/framac.sav &
$(
FRAMAC_GUI
)
$(
FCGUIFLAGS
)
-load
$^
/framac.sav &
...
...
This diff is collapsed.
Click to expand it.
share/analysis-scripts/template.mk
+
3
−
0
View file @
30610b6e
...
@@ -27,6 +27,9 @@ FCFLAGS += \
...
@@ -27,6 +27,9 @@ FCFLAGS += \
EVAFLAGS
+=
\
EVAFLAGS
+=
\
-eva-warn-key
builtins:missing-spec
=
abort
\
-eva-warn-key
builtins:missing-spec
=
abort
\
## WP-specific flags
WPFLAGS
+=
\
## GUI-only flags
## GUI-only flags
FCGUIFLAGS
+=
\
FCGUIFLAGS
+=
\
...
...
This diff is collapsed.
Click to expand it.
tests/fc_script/oracle/GNUmakefile
+
3
−
0
View file @
30610b6e
...
@@ -29,6 +29,9 @@ FCFLAGS += \
...
@@ -29,6 +29,9 @@ FCFLAGS += \
EVAFLAGS
+=
\
EVAFLAGS
+=
\
-eva-warn-key
builtins:missing-spec
=
abort
\
-eva-warn-key
builtins:missing-spec
=
abort
\
## WP-specific flags
WPFLAGS
+=
\
## GUI-only flags
## GUI-only flags
FCGUIFLAGS
+=
\
FCGUIFLAGS
+=
\
...
...
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