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
e2c97414
Commit
e2c97414
authored
7 months ago
by
Andre Maroneze
Browse files
Options
Downloads
Patches
Plain Diff
[dune] avoid 'cat' in configurator for better Windows compatibility
parent
fc8a5141
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
configurator.ml
+14
-14
14 additions, 14 deletions
configurator.ml
with
14 additions
and
14 deletions
configurator.ml
+
14
−
14
View file @
e2c97414
...
@@ -198,12 +198,17 @@ module Fc_version = struct
...
@@ -198,12 +198,17 @@ module Fc_version = struct
;
name
:
string
;
name
:
string
}
}
let
get
configurator
=
let
head1
file
=
(* output first line from file, without '\n' *)
let
out_VERSION
=
try
let
out
=
C
.
Process
.
run
configurator
"cat"
[
"VERSION"
]
in
let
ic
=
open_in
file
in
if
out
.
exit_code
<>
0
then
C
.
die
"Can't read VERSION."
;
let
s
=
input_line
ic
in
out
.
stdout
close_in
ic
;
in
s
with
_exc
->
C
.
die
"Can't read "
^
file
^
"."
let
get
()
=
let
out_VERSION
=
head1
"VERSION"
in
let
re_version
=
let
re_version
=
Str
.
regexp
{
|
\
([
1
-
9
][
0
-
9
]
\
)
\
.
\
([
0
-
9
]
\
)
\
(
.*
\
)
|
}
Str
.
regexp
{
|
\
([
1
-
9
][
0
-
9
]
\
)
\
.
\
([
0
-
9
]
\
)
\
(
.*
\
)
|
}
in
in
...
@@ -213,14 +218,9 @@ module Fc_version = struct
...
@@ -213,14 +218,9 @@ module Fc_version = struct
Str
.
matched_group
2
out_VERSION
,
Str
.
matched_group
2
out_VERSION
,
try
Str
.
matched_group
3
out_VERSION
with
Not_found
->
""
try
Str
.
matched_group
3
out_VERSION
with
Not_found
->
""
else
else
C
.
die
"Can't read VERSION."
C
.
die
"Invalid VERSION contents."
in
let
name
=
let
out
=
C
.
Process
.
run
configurator
"cat"
[
"VERSION_CODENAME"
]
in
if
out
.
exit_code
<>
0
then
C
.
die
"Can't read VERSION_CODENAME."
;
String
.
sub
out
.
stdout
0
(
String
.
length
out
.
stdout
-
1
)
in
in
let
name
=
head1
"VERSION_CODENAME"
in
{
major
;
minor
;
ext
;
name
}
{
major
;
minor
;
ext
;
name
}
let
pp_sed
fmt
version
=
let
pp_sed
fmt
version
=
...
@@ -275,7 +275,7 @@ let python_available configurator =
...
@@ -275,7 +275,7 @@ let python_available configurator =
with
Not_found
|
Failure
_
->
false
with
Not_found
|
Failure
_
->
false
let
configure
configurator
=
let
configure
configurator
=
let
version
=
Fc_version
.
get
configurator
in
let
version
=
Fc_version
.
get
()
in
let
cpp
=
Cpp
.
get
configurator
in
let
cpp
=
Cpp
.
get
configurator
in
let
os
=
OS
.
get
configurator
in
let
os
=
OS
.
get
configurator
in
let
config_sed
=
open_out
"config.sed"
in
let
config_sed
=
open_out
"config.sed"
in
...
...
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