Skip to content

Commit 7cbf30d

Browse files
committed
Compile without coq compat shim on Rocq 9
1 parent 9d635b5 commit 7cbf30d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
# #
1414
# Additionally, the following variables may be customized: #
1515
SUBDIRS?=
16-
COQBIN?=$(dir $(shell which coqtop))
17-
COQMAKEFILE?=$(COQBIN)coq_makefile
16+
COQBIN?=$(dir $(shell command -v coqtop || command -v rocq))
17+
COQTOP=$(shell command -v coqtop || echo "$(COQBIN)rocq repl")
18+
COQMAKEFILE?=$(shell command -v coq_makefile || echo "$(COQBIN)rocq makefile")
1819
COQDEP?=$(COQBIN)coqdep
1920
COQPROJECT?=_CoqProject
2021
COQMAKEOPTIONS?=
@@ -32,14 +33,14 @@ H:= $(if $(VERBOSE),,@) # not used yet
3233
TOP = $(dir $(lastword $(MAKEFILE_LIST)))
3334
COQMAKE = $(MAKE) -f Makefile.coq $(COQMAKEOPTIONS)
3435
COQMAKE_TESTSUITE = $(MAKE) -f Makefile.test-suite.coq $(COQMAKEOPTIONS)
35-
BRANCH_coq:= $(shell $(COQBIN)coqtop -v | head -1 | grep -E '(trunk|master)' \
36+
BRANCH_coq:= $(shell $(COQTOP) -v | head -1 | grep -E '(trunk|master)' \
3637
| wc -l | sed 's/ *//g')
3738

3839
# coq version:
3940
ifneq "$(BRANCH_coq)" "0"
4041
COQVVV:= dev
4142
else
42-
COQVVV:=$(shell $(COQBIN)coqtop --print-version | cut -d" " -f1)
43+
COQVVV:=$(shell $(COQTOP) --print-version | cut -d" " -f1)
4344
endif
4445

4546
COQV:= $(shell echo $(COQVVV) | cut -d"." -f1)
@@ -48,7 +49,7 @@ COQVV:= $(shell echo $(COQVVV) | cut -d"." -f1-2)
4849
ifneq "$(DESTDIR)" ""
4950
HB_INSTALLDIR := $(DESTDIR)/bin
5051
else
51-
HB_INSTALLDIR := $(dir $(shell which $(COQBIN)coqc))
52+
HB_INSTALLDIR := $(dir $(shell command -v coqtop || command -v rocq))
5253
endif
5354

5455
# export to sub- targets

0 commit comments

Comments
 (0)