summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-01-21 16:06:54 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-01-21 16:06:54 -0500
commitc09f8da8a98d035082b207ebdaf1e6fe3110c8b7 (patch)
tree4b93815001614aaccf5bec483675a9b98780e844 /Makefile.am
parent9b390a556e5030d67c235806b2c027513fb1679f (diff)
parent8500700aa45722595938ef59935e7efde2b1e9e3 (diff)
downloadtor-c09f8da8a98d035082b207ebdaf1e6fe3110c8b7.tar.gz
tor-c09f8da8a98d035082b207ebdaf1e6fe3110c8b7.zip
Merge branch 'maint-0.3.5' into maint-0.4.3
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 1041494da7..117c6a5a70 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -577,3 +577,17 @@ show-libs:
show-testing-libs:
@echo $(TOR_INTERNAL_TESTING_LIBS)
+
+# Note here that we hardcode this -j2 because if the user would pass too many
+# cores, bear actually chockes and dies :S. For this to work, a make clean
+# needs to be done else bear will miss some compile flags.
+lsp:
+ @if test -x "`which bear 2>&1;true`"; then \
+ echo "Generating LSP compile_commands.json. Might take few minutes..."; \
+ $(MAKE) clean 2>&1 >/dev/null; \
+ bear >/dev/null 2>&1 -- $(MAKE) -j2 2>&1 >/dev/null; \
+ echo "Generating .ccls file..."; \
+ ./scripts/maint/gen_ccls_file.sh \
+ else \
+ echo "No bear command found. On debian, apt install bear"; \
+ fi