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
bd93fc27
Commit
bd93fc27
authored
2 years ago
by
Allan Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
[ivette] rework make and check API
parent
9e4ed8ca
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ivette/Makefile
+5
-8
5 additions, 8 deletions
ivette/Makefile
ivette/api.sh
+79
-0
79 additions, 0 deletions
ivette/api.sh
with
84 additions
and
8 deletions
ivette/Makefile
+
5
−
8
View file @
bd93fc27
...
@@ -106,14 +106,11 @@ update-distrib-files:
...
@@ -106,14 +106,11 @@ update-distrib-files:
api
:
api
:
@
echo
"[Ivette] Generating TypeScript API"
@
echo
"[Ivette] Generating TypeScript API"
@
find src/frama-c
-path
"*/api/*"
-name
"*.ts"
-exec
rm
-f
{}
\;
./api.sh build src
../bin/frama-c
\
-server-tsc
check-api
:
@
find src/frama-c
-path
"*/api/*"
-name
"*.ts"
\
@
echo
"[Ivette] Checking TypeScript API"
-exec
headache
\
./api.sh check src
-h
../headers/open-source/CEA_LGPL
\
-c
../headers/headache_config.txt
{}
\;\
-exec
chmod
a-w
{}
\;
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
# --- Ivette Documentation
# --- Ivette Documentation
...
...
This diff is collapsed.
Click to expand it.
ivette/api.sh
0 → 100755
+
79
−
0
View file @
bd93fc27
#!/bin/bash
##########################################################################
# #
# This file is part of Frama-C. #
# #
# Copyright (C) 2007-2022 #
# CEA (Commissariat à l'énergie atomique et aux énergies #
# alternatives) #
# #
# you can redistribute it and/or modify it under the terms of the GNU #
# Lesser General Public License as published by the Free Software #
# Foundation, version 2.1. #
# #
# It is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU Lesser General Public License for more details. #
# #
# See the GNU Lesser General Public License version 2.1 #
# for more details (enclosed in the file licenses/LGPLv2.1). #
# #
##########################################################################
if
[[
$#
!=
2
]]
;
then
cat
<<
EOF
usage:
$0
[check|build] path
EOF
exit
2
fi
case
"
$1
"
in
"build"
)
;;
"check"
)
;;
*
)
echo
"Bad first parameter:
$1
"
echo
"Exiting without doing anything."
;
exit
31
esac
action
=
"
$1
"
if
[[
!
-d
$2
]]
;
then
echo
"
$2
directory doesn't exist"
fi
path
=
$2
build
()
{
build_path
=
$1
find
$build_path
/frama-c
-path
"*/api/*"
-name
"*.ts"
-exec
rm
-f
{}
\;
../bin/frama-c
-server-tsc
-server-tsc-out
$build_path
find
$build_path
/frama-c
-path
"*/api/*"
-name
"*.ts"
\
-exec
headache
\
-h
../headers/open-source/CEA_LGPL
\
-c
../headers/headache_config.txt
{}
\;\
-exec
chmod
a-w
{}
\;
}
tmp
=
cleanup
()
{
if
[[
-n
$tmp
]]
;
then
rm
-rf
$tmp
fi
}
check
()
{
check_path
=
$1
tmp
=
"
$(
mktemp
-d
)
"
trap
cleanup EXIT
cp
-r
$check_path
/frama-c
$tmp
/frama-c
build
$tmp
diff
-r
$check_path
/frama-c
$tmp
/frama-c
}
case
"
$action
"
in
"build"
)
build
$path
;;
"check"
)
check
$path
;;
esac
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