aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/odd_order
diff options
context:
space:
mode:
Diffstat (limited to 'mathcomp/odd_order')
-rw-r--r--mathcomp/odd_order/Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/mathcomp/odd_order/Makefile b/mathcomp/odd_order/Makefile
new file mode 100644
index 0000000..ead5950
--- /dev/null
+++ b/mathcomp/odd_order/Makefile
@@ -0,0 +1,30 @@
+H=@
+
+ifeq "$(COQBIN)" ""
+COQBIN=$(dir $(shell which coqtop))/
+endif
+
+
+VERSION_Coq = $(shell $(COQBIN)/coqtop -v | head -1 | sed 's/.*version \([0-9]\.[0-9]\)[^ ]* .*/v\1/')
+
+ifeq "$(VERSION_Coq)" ""
+$(error no version number found for coq)
+endif
+
+OLD_MAKEFLAGS:=$(MAKEFLAGS)
+MAKEFLAGS+=-B
+
+.DEFAULT_GOAL := all
+
+%:
+ sed -i -e "s/^(\*$(VERSION_Coq) *\(.*\) *\*)/\1/" *.v
+ $(H)[ -e Makefile.coq ] || $(COQBIN)/coq_makefile -f Make -o Makefile.coq
+ $(H)MAKEFLAGS=$(OLD_MAKEFLAGS) $(MAKE) --no-print-directory \
+ -f Makefile.coq $*
+
+.PHONY: clean
+clean:
+ $(H)MAKEFLAGS=$(OLD_MAKEFLAGS) $(MAKE) --no-print-directory \
+ -f Makefile.coq clean
+ $(H)rm -f Makefile.coq
+