X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/67b1a15a996af4649724d67acb7465ba6703bcbc..be0b4ef66576d66fb41c34552192e627b9dd3b86:/Makefile?ds=sidebyside diff --git a/Makefile b/Makefile index 52a730c..8c0aa48 100644 --- a/Makefile +++ b/Makefile @@ -66,23 +66,30 @@ _force: EMACSLIB = $(HOME)/lib/emacs -ELISP += dot-emacs.el -ELISP += make-regexp.el ew-hols.el -ELISP += mdw-gnus-patch.el -ELISP += mdw-multiple-cursors.el -ELISP += git.el git-blame.el vc-git.el stgit.el quilt.el -ELISP += bracketed-paste.el +ELISP += make-regexp ew-hols +ELISP += mdw-gnus-patch +ELISP += mdw-multiple-cursors +ELISP += git git-blame vc-git stgit quilt +ELISP += bracketed-paste + +ELISP += dot-emacs +dot-emacs_DEPS = make-regexp SCRIPTLINKS += emacsclient-hack movemail-hack sendmail-hack SCRIPTLINKS += aspell-hack emerge-hack -%.elc: %.el - $(call v_tag,EMACS)$(EMACS) -L el/ -L $(EMACSLIB) \ +%.elc: %.el $$(foreach e, $$($$*_DEPS), $$(DEP_$$e)) + $(call v_tag,EMACS)if ! $(EMACS) >$*.build-log 2>&1 \ + -L el/ -L $(EMACSLIB) \ --batch --no-site-file \ - --eval '(byte-compile-file "$<")' - -LOCAL_ELISP = $(filter $(notdir $(wildcard el/*.el)), $(ELISP)) -$(foreach e, $(LOCAL_ELISP), $(eval DEP_$e = $(EMACSLIB)/$(e:.el=.elc))) + --eval '(byte-compile-file "$<")'; then \ + cat $*.build-log; exit 2; \ + fi + +LOCAL_ELISP = $(filter $(notdir $(wildcard el/*.el)), \ + $(addsuffix .el, $(ELISP))) +$(foreach e, $(LOCAL_ELISP), \ + $(eval DEP_$(basename $e) = $(EMACSLIB)/$(e:.el=.elc))) $(addprefix $(EMACSLIB)/, $(LOCAL_ELISP)): $(EMACSLIB)/%: el/% $(call v_tag,SYMINK)mkdir -p $(EMACSLIB) && \ rm -f $@.new && \ @@ -90,9 +97,9 @@ $(addprefix $(EMACSLIB)/, $(LOCAL_ELISP)): $(EMACSLIB)/%: el/% mv $@.new $@ REMOTE_ELISP = $(filter-out $(notdir $(wildcard el/*.el)), \ - $(ELISP)) + $(addsuffix .el, $(ELISP))) $(foreach e, $(REMOTE_ELISP), \ - $(eval DEP_$e = $(if $(shell \ + $(eval DEP_$(basename $e) = $(if $(shell \ if $(EMACS) >/dev/null 2>&1 --no-site-file -q --batch \ --eval ' \ (progn \ @@ -109,7 +116,7 @@ $(addprefix $(EMACSLIB)/, $(REMOTE_ELISP)): $(EMACSLIB)/%: DOTLINKS += .emacs .emacs-calc .vm .gnus.el .ercrc.el all:: $(foreach e, $(ELISP), $(DEP_$e)) -$(foreach e, $(ELISP), $(eval _emacs.$(e:.el=): $(EMACSLIB)/$(e:.el=.elc))) +$(foreach e, $(ELISP), $(eval _emacs.$e: $(EMACSLIB)/$e.elc)) ###-------------------------------------------------------------------------- ### Other simpler things. @@ -255,7 +262,7 @@ endif dotfile-source = $(HERE)/dot/$(or $($1_SRC), $(1:.%=%)$2) -## Easist: just make symlinks. +## Easiest: just make symlinks. dotlink-ok-p = \ $(call symlink-ok-p,$(HOME)/$1,$(call dotfile-source,$1)) all:: $(addprefix $(HOME)/, $(DOTLINKS))