Makefile
changeset 379 271ed5d61644
parent 318 6a430707c23e
child 386 3efe37437745
equal deleted inserted replaced
378:b0f57ea29b28 379:271ed5d61644
     2 #
     2 #
     3 # You can do anything with this file without any warranty.
     3 # You can do anything with this file without any warranty.
     4 
     4 
     5 ifeq '' '$(HOME)'
     5 ifeq '' '$(HOME)'
     6   $(error Home env var not set!)
     6   $(error Home env var not set!)
       
     7 endif
       
     8 
       
     9 host_os = unix
       
    10 ifneq '' '$(COMSPEC)'
       
    11   host_os = windows
       
    12 endif
       
    13 
       
    14 # Special case for Windows if emacs-nox from Cygwin installed along with native Emacs.
       
    15 # So we run native Emacs to compile sources.
       
    16 EMACS = emacs
       
    17 ifeq 'windows' '$(host_os)'
       
    18   EMACS = runemacs
     7 endif
    19 endif
     8 
    20 
     9 FILES_MODE_EL := $(wildcard *-mode.el)
    21 FILES_MODE_EL := $(wildcard *-mode.el)
    10 
    22 
    11 .PHONY: all
    23 .PHONY: all
    26 	rm -f -r $(HOME)/.emacs.d/my-lisp
    38 	rm -f -r $(HOME)/.emacs.d/my-lisp
    27 	mkdir -p $(HOME)/.emacs.d/my-lisp
    39 	mkdir -p $(HOME)/.emacs.d/my-lisp
    28 	for file in $(FILES_MODE_EL); do \
    40 	for file in $(FILES_MODE_EL); do \
    29 		cp -f $$file $(HOME)/.emacs.d/my-lisp; \
    41 		cp -f $$file $(HOME)/.emacs.d/my-lisp; \
    30 	done
    42 	done
    31 	emacs --batch \
    43 	$(EMACS) --batch \
    32 		--eval='(let ( (generated-autoload-file "~/.emacs.d/my-lisp/autoload-my.el") ) (update-directory-autoloads "~/.emacs.d/my-lisp") )'
    44 		--eval='(let ( (generated-autoload-file "~/.emacs.d/my-lisp/autoload-my.el") ) (update-directory-autoloads "~/.emacs.d/my-lisp") )'
    33 
    45 
    34 .PHONY: uninstall
    46 .PHONY: uninstall
    35 uninstall:
    47 uninstall:
    36 	@echo !!! Nothing done !!!
    48 	@echo !!! Nothing done !!!