aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 4e8ff62f15..f97a2b98e1 100644
--- a/Makefile
+++ b/Makefile
@@ -57,6 +57,15 @@ define stage-template
endef
endif
+UNSAVED_FILES:=$(shell find . -name '.\#*')
+ifdef UNSAVED_FILES
+$(error You have unsaved changes in your editor (emacs?); cancel them or save before proceeding. \
+Or your editor crashed. Then, you may want to consider whether you want to restore the autosaves)
+#If you try to simply remove this explicit test, the compilation may
+#fail later. In particular, if a .#*.v file exists, coqdep fails to
+#run.
+endif
+
%.o: always
$(call stage-template,1)