aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDan Rostovtsev <dan@rostovtsev.org>2026-03-29 15:32:40 -0400
committerDan Rostovtsev <dan@rostovtsev.org>2026-03-29 15:32:40 -0400
commitfb9d9ed9995c6e411f1223d5b53f7b8b6880573e (patch)
tree3ae3d28a9f1b575495fee2b65baa619e8929027f /Makefile
Simple build and README.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..520ce64
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,29 @@
+# Makefile taken from Rocq Reference Manual 9.0.0
+
+# KNOWNTARGETS will not be passed along to CoqMakefile
+
+KNOWNTARGETS := CoqMakefile extra-stuff extra-stuff2
+
+# KNOWNFILES will not get implicit targets from the final rule, and so
+# depending on them won't invoke the submake
+# Warning: These files get declared as PHONY, so any targets depending
+# on them always get rebuilt
+
+KNOWNFILES := Makefile _CoqProject
+.DEFAULT_GOAL := invoke-coqmakefile
+
+CoqMakefile: Makefile _CoqProject
+ $(COQBIN)coq_makefile -f _CoqProject -o CoqMakefile
+
+invoke-coqmakefile: CoqMakefile
+ $(MAKE) --no-print-directory -f CoqMakefile \
+ $(filter-out $(KNOWNTARGETS), $(MAKECMDGOALS))
+.PHONY: invoke-coqmakefile $(KNOWNFILES)
+
+####################################################################
+## Your targets here ##
+####################################################################
+
+# This should be the last rule, to handle any targets not declared above
+%: invoke-coqmakefile
+ @true