mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-11 14:15:12 -05:00
Updated documentation of preprocessing scripts and deleted comments.
This commit is contained in:
parent
1b0869dac0
commit
9df86117b8
3 changed files with 19 additions and 35 deletions
|
|
@ -2,9 +2,12 @@
|
|||
ps -o comm= -p $$
|
||||
|
||||
# This script expects the following command line arguments:
|
||||
# $1 : Absolute path to the root dir of this repository
|
||||
# $2 : Absolute path to the root of the directory containing the VeriFast proofs
|
||||
# $3 : Absolute path to the VeriFast directory
|
||||
# $1 : Absolute path to the source file that should be prepared for VeriFast.
|
||||
# $2 : Absolute path to which the result shall be written.
|
||||
# $3 : Absolute path under which preprocessor error shall be logged.
|
||||
# $4 : Absolute path to the root dir of this repository
|
||||
# $5 : Absolute path to the root of the directory containing the VeriFast proofs
|
||||
# $6 : Absolute path to the VeriFast directory
|
||||
|
||||
SRC_FILE="$1"
|
||||
OUT_FILE="$2"
|
||||
|
|
@ -13,18 +16,6 @@ REPO_BASE_DIR="$4"
|
|||
VF_PROOF_BASE_DIR="$5"
|
||||
VF_DIR="$6"
|
||||
|
||||
echo SRC_FILE
|
||||
echo "$1"
|
||||
echo OUT_FILE
|
||||
echo "$2"
|
||||
echo FILE_PP_ERR_LOG
|
||||
echo "$3"
|
||||
echo REPO_BASE_DIR
|
||||
echo "$4"
|
||||
echo VF_PROOF_BASE_DIR
|
||||
echo "$5"
|
||||
echo VF_DIR
|
||||
echo "$6"
|
||||
|
||||
# Load functions used to compute paths.
|
||||
. "$VF_PROOF_BASE_DIR/paths.sh"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
# This script preprocesses an given source file annotated with VeriFast proof
|
||||
# This script preprocesses a given source file annotated with VeriFast proof
|
||||
# steps. Include paths are configured to fit 'tasks.c', but it might also be
|
||||
# useful for other source files. The preprocessor is configured to include the
|
||||
# proper proof files from VeriFast's standard library and to also include
|
||||
|
|
@ -23,18 +23,6 @@ REPO_BASE_DIR="$4"
|
|||
VF_PROOF_BASE_DIR="$5"
|
||||
VF_DIR="$6"
|
||||
|
||||
echo SRC_FILE
|
||||
echo "$1"
|
||||
echo OUT_FILE
|
||||
echo "$2"
|
||||
echo ERR_FILE
|
||||
echo "$3"
|
||||
echo REPO_BASE_DIR
|
||||
echo "$4"
|
||||
echo VF_PROOF_BASE_DIR
|
||||
echo "$5"
|
||||
echo VF_DIR
|
||||
echo "$6"
|
||||
|
||||
|
||||
# Load functions used to compute paths.
|
||||
|
|
|
|||
|
|
@ -33,12 +33,18 @@ echo "Commenting out line/file pragmas"
|
|||
rewrite "^#" "// &"
|
||||
|
||||
echo "Fixing order of 'long', 'unsigned'"
|
||||
echo "Reported issue 338:"
|
||||
echo "https://github.com/verifast/verifast/issues/338"
|
||||
rewrite "long unsigned int" "unsigned long int"
|
||||
|
||||
echo "Delete fixed-sized array typedefs"
|
||||
echo "Reported issue 339:"
|
||||
echo "https://github.com/verifast/verifast/issues/339"
|
||||
rewrite "typedef .*\[[0-9]*\];" ""
|
||||
|
||||
echo "Delete attributes"
|
||||
echo "Reported issue 340:"
|
||||
echo "https://github.com/verifast/verifast/issues/340"
|
||||
rewrite "__attribute__(([_a-z]*))" ""
|
||||
# Note: `\s` or `:space:` not work on MacOs.
|
||||
rewrite "__attribute__( ( [_a-z]* ) )" ""
|
||||
|
|
@ -57,4 +63,3 @@ rewrite "const [*]" "*"
|
|||
echo "Uncomment special includes to allow VeriFast proofs to refer to config macros"
|
||||
rewrite "//VF_include #include" "#include"
|
||||
rewrite "//VF_macro #" "#"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue