aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlmamane2007-07-18 15:52:43 +0000
committerlmamane2007-07-18 15:52:43 +0000
commitbbcc279f72c9d458643ed4a6c0c6b587a4f1fc16 (patch)
tree9fb5809a54a8e99db15d62380e512c6dab1b42cb
parent153efd716c138af1f1a86df63e54b25bedaeb06c (diff)
Cleanly refuse to operate in the presence of unsaved changes in emacs
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10025 85f007b7-540e-0410-9357-904b9bb8a0f7
-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)