Skip to content

Commit 64828a7

Browse files
committed
Added building of compile_commands.json
1 parent 05ef516 commit 64828a7

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
.PHONY: all clean doc
22

33
all:
4-
dune build @install
4+
@dune build @install
5+
@make -C lib compile_commands.json
56

67
clean:
7-
dune clean
8+
@dune clean
89

910
doc:
10-
dune build @doc
11+
@dune build @doc

lib/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ TARGETS = postgresql.cma libpostgresql_stubs.a
22

33
.PHONY: all clean
44

5-
all:
5+
all: compile_commands.json
66
@dune build $(TARGETS)
77

88
clean:
99
@dune clean
10+
@rm -f compile_commands.json
11+
12+
compile_commands.json: config/dune config/discover.ml postgresql_stubs.c
13+
@dune rules | dune-compiledb

0 commit comments

Comments
 (0)