From fc84c27eac260dffd8f2fb1cb56d599f1e3486d9 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Mon, 9 Mar 2015 11:07:53 +0100 Subject: Initial commit --- mathcomp/ssreflect/Makefile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 mathcomp/ssreflect/Makefile (limited to 'mathcomp/ssreflect/Makefile') diff --git a/mathcomp/ssreflect/Makefile b/mathcomp/ssreflect/Makefile new file mode 100644 index 0000000..46a2d69 --- /dev/null +++ b/mathcomp/ssreflect/Makefile @@ -0,0 +1,33 @@ +ifeq "$(COQBIN)" "" +COQBIN=$(dir $(shell which coqtop))/ +endif + + +ifeq "$(shell $(COQBIN)/coqtop -v | head -1 | grep trunk | wc -l)" "1" +V=trunk +else +V=$(shell $(COQBIN)/coqtop -v | head -1 | \ + sed 's/.*version \([0-9]\.[0-9]\)[^ ]* .*/v\1/') +endif + +OLD_MAKEFLAGS:=$(MAKEFLAGS) +MAKEFLAGS+=-B + +%: + @[ -e Makefile.coq ] || $(call coqmakefile) + @[ Make -ot Makefile.coq ] || $(call coqmakefile) + @MAKEFLAGS=$(OLD_MAKEFLAGS) $(MAKE) --no-print-directory \ + -f Makefile.coq $* + +define coqmakefile + (echo "Generating Makefile.coq for Coq $(V) with COQBIN=$(COQBIN)";\ + cp Make Make.coq;\ + echo -I plugin/$(V)/src >> Make.coq;\ + echo plugin/$(V)/src/ssreflect.mllib >> Make.coq;\ + echo plugin/$(V)/src/ssrmatching.mli >> Make.coq;\ + echo plugin/$(V)/src/ssrmatching.ml4 >> Make.coq;\ + echo plugin/$(V)/src/ssreflect.ml4 >> Make.coq;\ + $(COQBIN)/coq_makefile -f Make.coq -o Makefile.coq) +endef + + -- cgit v1.2.3