Skip to content

Commit 4e7e057

Browse files
docs: Mention bear for indexing Make-based projects (#383)
1 parent 1ba1197 commit 4e7e057

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ scip-clang currently supports indexing using a
5656
[JSON compilation database][].
5757
CMake, Bazel and Meson support emitting this format
5858
for compatibility with clang-based tooling.
59+
Projects which use Make or other build systems may
60+
be able to use [Bear](https://github.com/rizsotto/Bear)
61+
to intercept compilation commands and generate a compilation database.
62+
5963
We're interested in exploring more
6064
[native Bazel support](https://github.com/sourcegraph/scip-clang/issues/182) in the future.
6165

@@ -121,6 +125,15 @@ See the [Usage](#usage) section for step-by-step instructions.
121125
- **Meson**: Use the Ninja backend,
122126
[which generates a compilation database](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/mesonbuild/meson%24+compile_commands.json&patternType=standard&sm=1&groupBy=path).
123127

128+
- **Make** or other build systems: Use [Bear](https://github.com/rizsotto/Bear)
129+
to wrap the build system invocation which build all the code. For example:
130+
131+
```bash
132+
bear -- make all
133+
```
134+
135+
In our testing, Bear works with Boost's B2 build system as well.
136+
124137
### Building code
125138

126139
Large projects typically use various forms of code generation.

0 commit comments

Comments
 (0)