From cc465218dc80d4e7325622e9186c88e6a6ecdb12 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Wed, 29 Apr 2020 15:40:13 +0200 Subject: Install "compcert.config" file along the Coq development The file contains various parameters about the target processor and ABI, useful for VST and possibly other users of CompCert as a Coq library. It is in "var=val" syntax so that it can be included directly from a Makefile or a shell script. --- Makefile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index aed0da28..df5fb03f 100644 --- a/Makefile +++ b/Makefile @@ -147,6 +147,9 @@ endif ifeq ($(CLIGHTGEN),true) $(MAKE) clightgen endif +ifeq ($(INSTALL_COQDEV),true) + $(MAKE) compcert.config +endif proof: $(FILES:.v=.vo) @@ -224,6 +227,19 @@ compcert.ini: Makefile.config echo "response_file_style=$(RESPONSEFILE)";) \ > compcert.ini +compcert.config: Makefile.config + (echo "# CompCert configuration parameters"; \ + echo "COMPCERT_ARCH=$(ARCH)"; \ + echo "COMPCERT_MODEL=$(MODEL)"; \ + echo "COMPCERT_ABI=$(ABI)"; \ + echo "COMPCERT_ENDIANNESS=$(ENDIANNESS)"; \ + echo "COMPCERT_BITSIZE=$(BITSIZE)"; \ + echo "COMPCERT_SYSTEM=$(SYSTEM)"; \ + echo "COMPCERT_VERSION=$(BUILDVERSION)"; \ + echo "COMPCERT_BUILDNR=$(BUILDNR)"; \ + echo "COMPCERT_TAG=$(TAG)" \ + ) > compcert.config + driver/Version.ml: VERSION (echo 'let version = "$(BUILDVERSION)"'; \ echo 'let buildnr = "$(BUILDNR)"'; \ @@ -258,6 +274,7 @@ ifeq ($(INSTALL_COQDEV),true) install -m 0644 $$d/*.vo $(DESTDIR)$(COQDEVDIR)/$$d/; \ done install -m 0644 ./VERSION $(DESTDIR)$(COQDEVDIR) + install -m 0644 ./compcert.config $(DESTDIR)$(COQDEVDIR) @(echo "To use, pass the following to coq_makefile or add the following to _CoqProject:"; echo "-R $(COQDEVDIR) compcert") > $(DESTDIR)$(COQDEVDIR)/README endif @@ -267,7 +284,7 @@ clean: rm -f $(patsubst %, %/.*.aux, $(DIRS)) rm -rf doc/html doc/*.glob rm -f driver/Version.ml - rm -f compcert.ini + rm -f compcert.ini compcert.config rm -f extraction/STAMP extraction/*.ml extraction/*.mli .depend.extr rm -f tools/ndfun tools/modorder tools/*.cm? tools/*.o rm -f $(GENERATED) .depend -- cgit