aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Bertot2018-05-01 21:30:53 +0200
committerYves Bertot2018-05-01 21:30:53 +0200
commitb5c0be9687aad69913e24354a041f188ee25efaf (patch)
tree210789d582f5d0220ab95713c2769fd4b4c550c3
a first project on how to organize files and define a simple query
-rw-r--r--tuto0/Makefile14
-rw-r--r--tuto0/_CoqProject5
-rw-r--r--tuto0/src/g_tuto0.ml45
-rw-r--r--tuto0/src/tuto0_plugin.mlpack1
4 files changed, 25 insertions, 0 deletions
diff --git a/tuto0/Makefile b/tuto0/Makefile
new file mode 100644
index 0000000000..e0e197650d
--- /dev/null
+++ b/tuto0/Makefile
@@ -0,0 +1,14 @@
+ifeq "$(COQBIN)" ""
+ COQBIN=$(dir $(shell which coqtop))/
+endif
+
+%: Makefile.coq
+
+Makefile.coq: _CoqProject
+ $(COQBIN)coq_makefile -f _CoqProject -o Makefile.coq
+
+tests: all
+ @$(MAKE) -C tests -s clean
+ @$(MAKE) -C tests -s all
+
+-include Makefile.coq
diff --git a/tuto0/_CoqProject b/tuto0/_CoqProject
new file mode 100644
index 0000000000..2871fcd549
--- /dev/null
+++ b/tuto0/_CoqProject
@@ -0,0 +1,5 @@
+-R theories/ Tuto0
+-I src
+
+src/g_tuto0.ml4
+src/tuto0_plugin.mlpack \ No newline at end of file
diff --git a/tuto0/src/g_tuto0.ml4 b/tuto0/src/g_tuto0.ml4
new file mode 100644
index 0000000000..5e0fa36e51
--- /dev/null
+++ b/tuto0/src/g_tuto0.ml4
@@ -0,0 +1,5 @@
+open Pp
+
+VERNAC COMMAND EXTEND HelloWorld CLASSIFIED AS QUERY
+| [ "HelloWorld" ] -> [ Feedback.msg_notice (strbrk "Hello World!") ]
+END \ No newline at end of file
diff --git a/tuto0/src/tuto0_plugin.mlpack b/tuto0/src/tuto0_plugin.mlpack
new file mode 100644
index 0000000000..9360e6036e
--- /dev/null
+++ b/tuto0/src/tuto0_plugin.mlpack
@@ -0,0 +1 @@
+G_tuto0 \ No newline at end of file