Special case for Windows if emacs-nox from Cygwin installed along with native Emacs.
authoruser@localhost
Sat, 03 Apr 2010 21:05:24 +0400
changeset 379 271ed5d61644
parent 378 b0f57ea29b28
child 380 2f34c2357bef
Special case for Windows if emacs-nox from Cygwin installed along with native Emacs.
Makefile
--- a/Makefile	Tue Mar 30 23:38:28 2010 +0300
+++ b/Makefile	Sat Apr 03 21:05:24 2010 +0400
@@ -6,6 +6,18 @@
   $(error Home env var not set!)
 endif
 
+host_os = unix
+ifneq '' '$(COMSPEC)'
+  host_os = windows
+endif
+
+# Special case for Windows if emacs-nox from Cygwin installed along with native Emacs.
+# So we run native Emacs to compile sources.
+EMACS = emacs
+ifeq 'windows' '$(host_os)'
+  EMACS = runemacs
+endif
+
 FILES_MODE_EL := $(wildcard *-mode.el)
 
 .PHONY: all
@@ -28,7 +40,7 @@
 	for file in $(FILES_MODE_EL); do \
 		cp -f $$file $(HOME)/.emacs.d/my-lisp; \
 	done
-	emacs --batch \
+	$(EMACS) --batch \
 		--eval='(let ( (generated-autoload-file "~/.emacs.d/my-lisp/autoload-my.el") ) (update-directory-autoloads "~/.emacs.d/my-lisp") )'
 
 .PHONY: uninstall