Skip to content

Commit ed651fc

Browse files
committed
Enable compilation with rocq makefile
Can be useful for instance to get timing informations.
1 parent e78d2fc commit ed651fc

File tree

7 files changed

+39
-62
lines changed

7 files changed

+39
-62
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ ide/coqide/index_urls.txt
134134
.lia.cache
135135
.nia.cache
136136
.nra.cache
137+
theories/Makefile.coq
138+
theories/Makefile.coq.conf
137139

138140
# emacs save files
139141
*~

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
DUNE=dev/with-rocq-wrap.sh dune
22

3-
all:
3+
all install:
4+
+$(MAKE) -C theories $@
5+
6+
dune:
47
$(DUNE) build -p rocq-stdlib @install
58

6-
install:
9+
dune-install:
710
$(DUNE) install --root . rocq-stdlib
811

912
build-% install-%:
1013
+$(MAKE) -C theories $@
1114

1215
# Make of individual .vo
1316
theories/%.vo:
14-
$(DUNE) build $@
17+
+$(MAKE) -C theories $*.vo
1518

1619
refman-html:
1720
$(DUNE) build --root . --no-buffer @refman-html

coq-stdlib.opam

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,10 @@ license: "LGPL-2.1-only"
99
homepage: "https://coq.inria.fr/"
1010
doc: "https://coq.github.io/doc/"
1111
bug-reports: "https://github.com/coq/stdlib/issues"
12+
dev-repo: "git+https://github.com/coq/stdlib.git"
1213
depends: [
13-
"dune" {>= "3.8"}
1414
"coq-core"
1515
"rocq-stdlib" {= version}
16-
"odoc" {with-doc}
1716
]
18-
dev-repo: "git+https://github.com/coq/stdlib.git"
1917
build: [
20-
["dune" "subst"] {dev}
21-
[
22-
"dev/with-rocq-wrap.sh"
23-
"dune"
24-
"build"
25-
"-p"
26-
name
27-
"-j"
28-
jobs
29-
"@install"
30-
"@runtest" {with-test}
31-
"@doc" {with-doc}
32-
]
3318
]

coq-stdlib.opam.template

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1+
depends: [
2+
"coq-core"
3+
"rocq-stdlib" {= version}
4+
]
15
build: [
2-
["dune" "subst"] {dev}
3-
[
4-
"dev/with-rocq-wrap.sh"
5-
"dune"
6-
"build"
7-
"-p"
8-
name
9-
"-j"
10-
jobs
11-
"@install"
12-
"@runtest" {with-test}
13-
"@doc" {with-doc}
14-
]
156
]

rocq-stdlib.opam

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,14 @@ license: "LGPL-2.1-only"
2222
homepage: "https://coq.inria.fr/"
2323
doc: "https://coq.github.io/doc/"
2424
bug-reports: "https://github.com/coq/stdlib/issues"
25+
dev-repo: "git+https://github.com/coq/stdlib.git"
2526
depends: [
26-
"dune" {>= "3.8"}
2727
"rocq-runtime"
28-
"rocq-core" {= version}
29-
"odoc" {with-doc}
28+
"rocq-core" {>= "9.0"}
3029
]
31-
dev-repo: "git+https://github.com/coq/stdlib.git"
3230
build: [
33-
["dune" "subst"] {dev}
34-
[
35-
"dev/with-rocq-wrap.sh"
36-
"dune"
37-
"build"
38-
"-p"
39-
name
40-
"-j"
41-
jobs
42-
"@install"
43-
"@runtest" {with-test}
44-
"@doc" {with-doc}
45-
]
31+
[make "-j" jobs]
32+
]
33+
install: [
34+
[make "install"]
4635
]

rocq-stdlib.opam.template

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1+
depends: [
2+
"rocq-runtime"
3+
"rocq-core" {>= "9.0"}
4+
]
15
build: [
2-
["dune" "subst"] {dev}
3-
[
4-
"dev/with-rocq-wrap.sh"
5-
"dune"
6-
"build"
7-
"-p"
8-
name
9-
"-j"
10-
jobs
11-
"@install"
12-
"@runtest" {with-test}
13-
"@doc" {with-doc}
14-
]
6+
[make "-j" jobs]
7+
]
8+
install: [
9+
[make "install"]
1510
]

theories/Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ ROCQMAKEFILE?=$(ROCQBIN)rocq makefile
33
ROCQMAKEOPTIONS?=
44
ROCQMAKEFILEOPTIONS?=
55

6+
all: Makefile.coq
7+
+$(MAKE) -f $< $(ROCQMAKEOPTIONS)
8+
9+
install: Makefile.coq
10+
+$(MAKE) -f $< $(ROCQMAKEOPTIONS) install
11+
12+
Makefile.coq: _CoqProject
13+
$(ROCQMAKEFILE) $(ROCQMAKEFILEOPTIONS) -f $< $(shell find . -name "*.v") -o $@
14+
615
build-%: Makefile-%.coq
716
+$(MAKE) -f $< $(ROCQMAKEOPTIONS)
817

@@ -18,3 +27,6 @@ Makefile-%.coq: Make.%
1827

1928
install-%: Makefile-%.coq
2029
+$(MAKE) -f $< $(ROCQMAKEOPTIONS) install
30+
31+
%.vo: Makefile.coq %.v
32+
+$(MAKE) -f $< $(ROCQMAKEOPTIONS) $@

0 commit comments

Comments
 (0)