Fix: broken checks prevent installation on fresh host.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 27 Oct 2015 19:47:19 +0200
changeset 1301 4ef2dccbddbd
parent 1300 361aa3be7455
child 1302 82d6e8bd0861
Fix: broken checks prevent installation on fresh host.
Makefile
--- a/Makefile	Tue Oct 27 19:50:40 2015 +0200
+++ b/Makefile	Tue Oct 27 19:47:19 2015 +0200
@@ -86,7 +86,18 @@
 
 .PHONY: check-install-comapt
 check-install-comapt:
-	[ -f $(COMPAT_FILE) ] || { echo $(COMPAT_FILE) missing, run '"make upgrade"' first; false; }
+	\
+if [ -f ~/.emacs ]; then \
+  echo Old style install detected, run '"make upgrade"' first; \
+  false; \
+fi
+	\
+if [ -f $(emacsdir)/init.el ]; then \
+  if [ ! -f $(COMPAT_FILE) ]; then \
+    echo $(COMPAT_FILE) missing, run '"make upgrade"' first; \
+    exit 1; \
+  fi; \
+fi
 	read ver <$(COMPAT_FILE); if [ "$$ver" -ne $(COMPAT_VER) ]; then echo "*** "Run '"make upgrade"' first" ***"; exit 1; fi
 
 .PHONY: check-upgrade-comapt