Makefile
changeset 1408 8ea516ab3865
parent 1406 0fddf6d2ccf2
child 1519 7b320068aa6b
equal deleted inserted replaced
1407:9ea890c729d8 1408:8ea516ab3865
   109 
   109 
   110 .PHONY: check-install-comapt
   110 .PHONY: check-install-comapt
   111 check-install-comapt:
   111 check-install-comapt:
   112 	\
   112 	\
   113 if [ -f ~/.emacs ]; then \
   113 if [ -f ~/.emacs ]; then \
   114   echo Old style install detected, run '"make upgrade"' first; \
   114   echo Old style install detected, run '"$(MAKE) upgrade"' first; \
   115   false; \
   115   false; \
   116 fi
   116 fi
   117 	\
   117 	\
   118 if [ -f $(emacsdir)/init.el ]; then \
   118 if [ -f $(emacsdir)/init.el ]; then \
   119   if [ ! -f $(COMPAT_FILE) ]; then \
   119   if [ ! -f $(COMPAT_FILE) ]; then \
   120     echo $(COMPAT_FILE) missing, run '"make upgrade"' first; \
   120     echo $(COMPAT_FILE) missing, run '"$(MAKE) upgrade"' first; \
   121     exit 1; \
   121     exit 1; \
   122   fi; \
   122   fi; \
   123 fi
   123 fi
   124 	read ver <$(COMPAT_FILE); if [ "$$ver" -ne $(COMPAT_VER) ]; then echo "*** "Run '"make upgrade"' first" ***"; exit 1; fi
   124 	read ver <$(COMPAT_FILE); if [ "$$ver" -ne $(COMPAT_VER) ]; then echo "*** "Run '"$(MAKE) upgrade"' first" ***"; exit 1; fi
   125 
   125 
   126 .PHONY: upgrade
   126 .PHONY: upgrade
   127 upgrade:
   127 upgrade:
   128 	\
   128 	\
   129 if [ -f $(COMPAT_FILE) ]; then \
   129 if [ -f $(COMPAT_FILE) ]; then \
   136   ver=0; \
   136   ver=0; \
   137 fi; \
   137 fi; \
   138 for ((i=ver+1; i <= $(COMPAT_VER); i++)); do \
   138 for ((i=ver+1; i <= $(COMPAT_VER); i++)); do \
   139   $(SHELL) upgrade/$$i.bash $(emacsdir); \
   139   $(SHELL) upgrade/$$i.bash $(emacsdir); \
   140 done
   140 done
   141 	make install
   141 	$(MAKE) install
   142 
   142 
   143 .PHONY: install-all
   143 .PHONY: install-all
   144 install-all: install
   144 install-all: install
   145 	cp .emacs-pre $(emacsdir)/.emacs-pre
   145 	cp .emacs-pre $(emacsdir)/.emacs-pre
   146 	cp .emacs-post $(emacsdir)/.emacs-post
   146 	cp .emacs-post $(emacsdir)/.emacs-post