[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 9a101c2c0f1e4598cd5bd2710e6021052e4ebdfa
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
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 "$@"



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits