Skip to content

Commit

Permalink
Adapt to coq/coq#19530
Browse files Browse the repository at this point in the history
  • Loading branch information
proux01 committed Sep 17, 2024
1 parent d650983 commit f507213
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
28 changes: 19 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
dune = dune $(1) $(DUNE_$(1)_FLAGS)

all:
elpi/dune: elpi/dune.in
@rm -f $@
@echo "; generated by configure.sh from configure.in, do not edit" > $@
@if $$(coqc --version | grep -q "8.19\|8.20") ; then \
sed -e 's/@@STDLIB_THEORY@@//' $< >> $@ ; \
else \
sed -e 's/@@STDLIB_THEORY@@/(theories Stdlib)/' $< >> $@ ; \
fi
@chmod a-w $@

all: elpi/dune
$(call dune,build)
.PHONY: all

build-core:
build-core: elpi/dune
$(call dune,build) theories
.PHONY: build-core

build-apps:
build-apps: elpi/dune
$(call dune,build) $$(find apps -type d -name theories)
.PHONY: build-apps

build:
build: elpi/dune
$(call dune,build) -p coq-elpi @install
.PHONY: build

test-core:
test-core: elpi/dune
$(call dune,runtest) tests
.PHONY: test-core

test-apps:
test-apps: elpi/dune
$(call dune,build) $$(find apps -type d -name tests)
.PHONY: test-apps

test:
test: elpi/dune
$(call dune,runtest)
$(call dune,build) $$(find apps -type d -name tests)
.PHONY: test

examples:
examples: elpi/dune
$(call dune,build) examples
.PHONY: examples

Expand All @@ -51,7 +61,7 @@ clean:
$(call dune,clean)
.PHONY: clean

install:
install: elpi/dune
$(call dune,install) coq-elpi
.PHONY: install

Expand Down
3 changes: 2 additions & 1 deletion elpi/dune → elpi/dune.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(coq.theory
(name elpi_elpi) ; FIXME
(package coq-elpi))
(package coq-elpi)
@@STDLIB_THEORY@@)

(rule
(target dummy.v)
Expand Down

0 comments on commit f507213

Please sign in to comment.