3 ##############################################################################
4 # THIS MUST BE CALLED FROM THE ROOT DIRECTORY. IT IS USED BY THE MAKEFILE SO #
5 # IN THEORY, YOU SHOULD NEVER CALL THIS. #
6 ##############################################################################
12 # Get all #define *_PRIVATE from our source. We need to list them in our .ccls
13 # file and enable them otherwise ccls will not find their definition thinking
14 # that they are dead code.
15 PRIVATE_DEFS
=$
(grep -r --include \
*.h
"_PRIVATE" |
grep "#ifdef" | cut
-d' ' -f2 |
sort |
uniq)
17 echo "clang" > "$CCLS_FILE"
19 # Add these include so the ccls server can properly check new files that are
20 # not in the compile_commands.json yet
25 echo "-I./src/ext/trunnel"
28 # Add all defines (-D).
29 for p
in $PRIVATE_DEFS; do
30 echo "-D$p" >> "$CCLS_FILE"