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
76096307
Commit
76096307
authored
3 years ago
by
Andre Maroneze
Browse files
Options
Downloads
Patches
Plain Diff
[analysis-scripts] allow GNU make to be mapped to other gmake besides make
parent
2c88a55a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
share/analysis-scripts/make_wrapper.py
+12
-2
12 additions, 2 deletions
share/analysis-scripts/make_wrapper.py
with
12 additions
and
2 deletions
share/analysis-scripts/make_wrapper.py
+
12
−
2
View file @
76096307
...
...
@@ -22,7 +22,7 @@
# #
##########################################################################
# This script serves as wrapper to
'
make
'
(when using the analysis-scripts
# This script serves as wrapper to
GNU
make (when using the analysis-scripts
# GNUmakefile template): it parses the output and suggests useful commands
# whenever it can, by calling frama-c-script itself.
...
...
@@ -38,6 +38,16 @@ MIN_PYTHON = (3, 6) # for automatic Path conversions
if
sys
.
version_info
<
MIN_PYTHON
:
sys
.
exit
(
"
Python %s.%s or later is required.
\n
"
%
MIN_PYTHON
)
# Check if GNU make is available and has the minimal required version
# (4.0). Otherwise, this script will fail.
# We first test with 'gmake', then 'make', then fail.
make_cmd
=
"
gmake
"
get_make_major_version_args
=
r
"
--version | grep
'
GNU Make\s\+\([0-9]\+\)\..*$
'
| sed -E
'
s|GNU Make +([0-9]+)\..*|\1|
'"
if
os
.
system
(
f
"
test $(
{
make_cmd
}
{
get_make_major_version_args
}
) -ge 4
"
)
!=
0
:
make_cmd
=
"
make
"
if
os
.
system
(
f
"
test $(
{
make_cmd
}
{
get_make_major_version_args
}
) -ge 4
"
)
!=
0
:
sys
.
exit
(
"
error: could not find GNU make >= 4.0 (tried
'
gmake
'
and
'
make
'
)
"
)
parser
=
argparse
.
ArgumentParser
(
description
=
"""
Builds the specified target, parsing the output to identify and recommend
actions in case of failure.
"""
)
...
...
@@ -54,7 +64,7 @@ if not framac_bin:
framac_script
=
f
"
{
framac_bin
}
/frama-c-script
"
output_lines
=
[]
cmd_list
=
[
'
make
'
,
"
-C
"
,
make_dir
]
+
args
cmd_list
=
[
make
_cmd
,
"
-C
"
,
make_dir
]
+
args
with
subprocess
.
Popen
(
cmd_list
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
as
proc
:
...
...
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