Add a script to run spatch with appropriate arguments

It's a bit tricky to remember the right incantation to get the
proper include paths and incantations for coccinelle, but without
it, coccinelle is less effective at parsing our C.
This commit is contained in:
Nick Mathewson 2019-09-11 18:43:16 -04:00
parent 41261c3b5c
commit 9a101c2c0f

9
scripts/coccinelle/apply.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
# apply.sh:
# run spatch with appropriate includes and builtins for the Tor source code
top="$(dirname "$0")/../.."
spatch -macro_file_builtins "$top"/scripts/coccinelle/tor-coccinelle.h \
-I "$top" -I "$top"/src -I "$top"/ext "$@"