From bbcc279f72c9d458643ed4a6c0c6b587a4f1fc16 Mon Sep 17 00:00:00 2001 From: lmamane Date: Wed, 18 Jul 2007 15:52:43 +0000 Subject: 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 --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) 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) -- cgit v1.2.3