Makefile
changeset 1241 4f22d9fe2e5b
parent 1236 f5be1005cdba
child 1253 504c216e8d21
equal deleted inserted replaced
1240:b086f9c8a4db 1241:4f22d9fe2e5b
    22 
    22 
    23 ################################################################
    23 ################################################################
    24 # Helper definition.
    24 # Helper definition.
    25 
    25 
    26 which = $(firstword $(foreach item,$(subst :, ,$(PATH)),$(wildcard $(item)/$1)))
    26 which = $(firstword $(foreach item,$(subst :, ,$(PATH)),$(wildcard $(item)/$1)))
       
    27 curdir := $(realpath .)
    27 
    28 
    28 ################################################################
    29 ################################################################
    29 # Platform/environment definition.
    30 # Platform/environment definition.
    30 
    31 
    31 ifeq '' '$(HOME)'
    32 ifeq '' '$(HOME)'
   111 	find $(mylispdir) -type f -name '*.el' -delete
   112 	find $(mylispdir) -type f -name '*.el' -delete
   112 	for file in .emacs-pre .emacs-post; do \
   113 	for file in .emacs-pre .emacs-post; do \
   113 		[ -f $(emacsdir)/$$file ] || cp $$file $(emacsdir)/$$file; \
   114 		[ -f $(emacsdir)/$$file ] || cp $$file $(emacsdir)/$$file; \
   114 	done
   115 	done
   115 	cp .emacs $(emacsdir)/init.el
   116 	cp .emacs $(emacsdir)/init.el
   116 	cp .emacs-my $(emacsdir)/.emacs-my
   117 	cp .emacs-defs .emacs-my $(emacsdir)
   117 	mkdir -p $(emacsdir)/server $(HOME)/.gnus/scores
   118 	mkdir -p $(emacsdir)/server $(HOME)/.gnus/scores
   118 	cp all.SCORE $(HOME)/.gnus/scores
   119 	cp all.SCORE $(HOME)/.gnus/scores
   119 	cp -f $(EL_FILES) $(mylispdir); \
   120 	cp -f $(EL_FILES) $(mylispdir); \
       
   121 	./.emacs-autogen.sh $(emacsdir)/.emacs-autogen; \
   120 	$(EMACS) -Q --batch --eval='(let ((generated-autoload-file "$(mylispdir)/loaddefs.el")) (update-directory-autoloads "$(mylispdir)"))'
   122 	$(EMACS) -Q --batch --eval='(let ((generated-autoload-file "$(mylispdir)/loaddefs.el")) (update-directory-autoloads "$(mylispdir)"))'
   121 	./.emacs-autogen.sh $(emacsdir)/.emacs-autogen
   123 	\
       
   124 $(EMACS) -Q --batch --eval='(load "$(curdir)/.emacs-defs")' --eval='(my-load.add-my-loadpaths)' --eval='(load "$(emacsdir)/.emacs-pre")' \
       
   125   --eval='(byte-compile-file "$(emacsdir)/.emacs-my")' --eval='(byte-force-recompile "$(mylispdir)")'
   122 	cp -r srecode/ $(HOME)/.emacs.d/
   126 	cp -r srecode/ $(HOME)/.emacs.d/
   123 
   127 
   124 .PHONY: uninstall
   128 .PHONY: uninstall
   125 uninstall:
   129 uninstall:
   126 	rm -f $(HOME)/.emacs $(mylispdir)/.emacs-my $(mylispdir)/.emacs-autogen
   130 	rm -f $(HOME)/.emacs $(mylispdir)/.emacs-my $(mylispdir)/.emacs-autogen