chiark / gitweb /
dot/emacs: Inhibit autoresponses from Exchange.
[profile] / Makefile
index 600defa6cc1a5edc600d93bbda2b0ce6428f0ed0..21352b8ac46325163a176cd5dd3202b4f1caedad 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -64,21 +64,39 @@ _force:
 ###--------------------------------------------------------------------------
 ### Emacs.
 
+ifneq ($(EMACS),nil)
+
 EMACSLIB                = $(HOME)/lib/emacs
 
+EMACS_VERSION          := $(shell $(EMACS) 2>&1 -Q --batch --eval \
+       '(message "%s %s" emacs-major-version emacs-minor-version)')
+emacs-version-p                 = $(shell set -- $(EMACS_VERSION); \
+       if [ $$1 -gt $1 ] || ([ $$1 -eq $1 ] && [ $$2 -ge $2 ]); then \
+         echo t; \
+       fi)
+
 ELISP                  += make-regexp ew-hols
 ELISP                  += mdw-gnus-patch
 ELISP                  += mdw-multiple-cursors
 ELISP                  += git git-blame vc-git stgit quilt
+
+ifeq ($(call emacs-version-p,24,3),t)
 ELISP                  += bracketed-paste
+endif
+
+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 "$<")'
+               --eval '(byte-compile-file "$<")'; then \
+         cat $*.build-log; exit 2; \
+       fi
 
 LOCAL_ELISP             = $(filter $(notdir $(wildcard el/*.el)), \
                                $(addsuffix .el, $(ELISP)))
@@ -112,6 +130,8 @@ DOTLINKS            += .emacs .emacs-calc .vm .gnus.el .ercrc.el
 all:: $(foreach e, $(ELISP), $(DEP_$e))
 $(foreach e, $(ELISP), $(eval _emacs.$e: $(EMACSLIB)/$e.elc))
 
+endif
+
 ###--------------------------------------------------------------------------
 ### Other simpler things.
 
@@ -131,13 +151,17 @@ SCRIPTLINKS               += update-buildable-branch
 ## Shells.
 DOTLINKS               += .profile .shell-rc .shell-logout
 DOTLINKS               += .shrc .rcrc
-DOTLINKS               += .zprofile .zshrc .zshenv
-DOTLINKS               += .bash_profile .bash_completion .bashrc .inputrc
+DOTLINKS               += .zprofile .zshrc .zlogout .zshenv
+DOTLINKS               += .bash_profile .bash_completion .bash_logout
+DOTLINKS               += .bashrc .inputrc
 .bash_profile_SRC       = bash-profile
 .bash_completion_SRC    = bash-completion
+.bash_logout_SRC        = shell-logout
+.zlogout_SRC            = shell-logout
 
 ## Git.
 DOTSUBST               += .gitconfig
+SCRIPTLINKS            += git-copyright-dates
 DOTLINKS               += .cgrc .tigrc
 .gitconfig_SUBSTS       = \
        $(call substvar,releasekey,$(call mdw-conf,release-key,481334C2))
@@ -187,6 +211,8 @@ DOTLINKS            += .lesskey .infokey .sqliterc
 DOTLINKS               += .gdbinit .toprc .aspell.conf
 DOTLINKS               += .dircolors .colordiffrc .screenrc .tmux.conf
 DOTLINKS               += .cvsrc .indent.pro .ditz-config
+DOTLINKS               += .lftp/rc
+.lftp/rc_SRC            = lftp-rc
 DOTSUBST               += .mykermrc
 SCRIPTLINKS            += lesspipe.sh
 
@@ -244,6 +270,7 @@ DOTLINKS            += .config/gtk-3.0/settings.ini
 SCRIPTLINKS            += xinitcmd lock-screen xshutdown
 SCRIPTLINKS            += un-backslashify-selection
 SCRIPTLINKS            += xpra-start-xdummy
+SCRIPTLINKS            += play-rawk
 
 DOTCPP                 += .Xdefaults
 Xdefaults_DEFS          = -DEMACSWD=$(call mdw-conf,emacs-width,77)
@@ -256,7 +283,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))
@@ -282,7 +309,7 @@ SUBSTS                      += $(call substvar,home,$(HOME))
 SUBSTS                 += $(call substvar,profile,$(HERE))
 all:: $(addprefix $(HOME)/, $(DOTSUBST))
 $(addprefix $(HOME)/, $(subst %,\%,$(DOTSUBST))): $(HOME)/%: \
-               $$(call dotsubst-source,$$*,.in) Makefile
+               $$(call dotfile-source,$$*,.in) Makefile
        $(call v_tag,SUBST)mkdir -p $(dir $@) && \
                rm -f $@.new && \
                sed -e "1i\