[tor-commits] [tor/master] Add a script to run spatch with appropriate arguments

teor at torproject.org teor at torproject.org
Thu Oct 24 00:01:21 UTC 2019


commit 9a101c2c0f1e4598cd5bd2710e6021052e4ebdfa
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Sep 11 18:43:16 2019 -0400

    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.
---
 scripts/coccinelle/apply.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scripts/coccinelle/apply.sh b/scripts/coccinelle/apply.sh
new file mode 100755
index 000000000..82e773dc3
--- /dev/null
+++ b/scripts/coccinelle/apply.sh
@@ -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 "$@"





More information about the tor-commits mailing list