Commit cbe8dea4 authored by POTTIER Francois's avatar POTTIER Francois

GNUmakefile and coq-menhirlib.opam: remove dependency on Menhir. Use a...

GNUmakefile and coq-menhirlib.opam: remove dependency on Menhir. Use a conflicts: field to require the correct version of Menhir, if installed. Add date: and logpath: tags.
parent 2b431bf1
Pipeline #82580 failed with stage
...@@ -45,6 +45,7 @@ clean: ...@@ -45,6 +45,7 @@ clean:
# The version number is automatically set to the current date, # The version number is automatically set to the current date,
# unless DATE is defined on the command line. # unless DATE is defined on the command line.
DATE := $(shell /bin/date +%Y%m%d) DATE := $(shell /bin/date +%Y%m%d)
DATEDASH := $(shell /bin/date +%Y-%m-%d)
PACKAGE := menhir-$(DATE) PACKAGE := menhir-$(DATE)
CURRENT := $(shell pwd) CURRENT := $(shell pwd)
...@@ -282,10 +283,13 @@ COQ_MENHIRLIB_PUBLISH_OPTIONS := \ ...@@ -282,10 +283,13 @@ COQ_MENHIRLIB_PUBLISH_OPTIONS := \
opam: opam:
# Publish an opam description for menhir. # Publish an opam description for menhir.
@ opam publish -v $(DATE) $(THIS).opam $(ARCHIVE) @ opam publish -v $(DATE) $(THIS).opam $(ARCHIVE)
# Patch coq-menhirlib.opam to add a strong dependency on Menhir # Patch coq-menhirlib.opam.
# with the exact same version number. # We replace the string DATEDASH with $(DATEDASH).
# We replace the string DATE with $(DATE).
@ cat $(THAT).opam \ @ cat $(THAT).opam \
| sed -e 's/"menhir" { = "dev" }/"menhir" { = "$(DATE)" }/g' > $(THAT).patched.opam | sed -e 's/DATEDASH/$(DATEDASH)/g' \
| sed -e 's/DATE/$(DATE)/g' \
> $(THAT).patched.opam
# Publish an opam description for coq-menhirlib. # Publish an opam description for coq-menhirlib.
@ opam publish -v $(DATE) $(COQ_MENHIRLIB_PUBLISH_OPTIONS) $(THAT).patched.opam $(ARCHIVE) @ opam publish -v $(DATE) $(COQ_MENHIRLIB_PUBLISH_OPTIONS) $(THAT).patched.opam $(ARCHIVE)
@ rm $(THAT).patched.opam @ rm $(THAT).patched.opam
......
...@@ -16,5 +16,11 @@ install: [ ...@@ -16,5 +16,11 @@ install: [
] ]
depends: [ depends: [
"coq" { >= "8.6" } "coq" { >= "8.6" }
"menhir" { = "dev" } ]
conflicts: [
"menhir" { != "DATE" }
]
tags: [
"date:DATEDASH"
"logpath:MenhirLib"
] ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment