aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/ssreflect/Makefile
diff options
context:
space:
mode:
authorEnrico Tassi2015-03-09 13:35:08 +0100
committerEnrico Tassi2015-03-09 16:21:23 +0100
commit155e671f7b83293ae327ddbd252d1d1ac961ab9a (patch)
tree7bb826abaa20f3fe5ac57e0348be14e8641b5b75 /mathcomp/ssreflect/Makefile
parentfc84c27eac260dffd8f2fb1cb56d599f1e3486d9 (diff)
some work on ssreflect and discrete
Diffstat (limited to 'mathcomp/ssreflect/Makefile')
-rw-r--r--mathcomp/ssreflect/Makefile33
1 files changed, 21 insertions, 12 deletions
diff --git a/mathcomp/ssreflect/Makefile b/mathcomp/ssreflect/Makefile
index 46a2d69..12c71fc 100644
--- a/mathcomp/ssreflect/Makefile
+++ b/mathcomp/ssreflect/Makefile
@@ -1,3 +1,5 @@
+H=@
+
ifeq "$(COQBIN)" ""
COQBIN=$(dir $(shell which coqtop))/
endif
@@ -13,21 +15,28 @@ endif
OLD_MAKEFLAGS:=$(MAKEFLAGS)
MAKEFLAGS+=-B
+.DEFAULT_GOAL := all
+
%:
- @[ -e Makefile.coq ] || $(call coqmakefile)
- @[ Make -ot Makefile.coq ] || $(call coqmakefile)
- @MAKEFLAGS=$(OLD_MAKEFLAGS) $(MAKE) --no-print-directory \
- -f Makefile.coq $*
+ $(H)[ -e Makefile.coq ] || $(call coqmakefile)
+# Override COQLIBS to find the "right" copy .ml files, otherwise
+# coq_makefile uses only the -R in COQLIBS and ignores the -I in
+# OCAMLLIBS to look for .ml files in order to generate .d files
+# via coqdep
+ $(H)MAKEFLAGS=$(OLD_MAKEFLAGS) $(MAKE) --no-print-directory \
+ -f Makefile.coq $* \
+ COQLIBS='-I . -R . mathcomp.ssreflect'
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)
+ ln -sf plugin/$(V)/ssreflect.mllib .;\
+ ln -sf plugin/$(V)/ssrmatching.mli .;\
+ ln -sf plugin/$(V)/ssrmatching.ml4 .;\
+ ln -sf plugin/$(V)/ssreflect.ml4 .;\
+ $(COQBIN)/coq_makefile -f Make -o Makefile.coq)
endef
-
+clean:
+ $(H)MAKEFLAGS=$(OLD_MAKEFLAGS) $(MAKE) --no-print-directory \
+ -f Makefile.coq clean
+ $(H)rm -f Makefile.coq