aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@debian.org>2013-03-11 21:08:18 -0400
committerRyan Kavanagh <rak@debian.org>2013-03-11 21:08:18 -0400
commit74bc3ad0b2f4679ba0007cd372f3ab29df208388 (patch)
tree3fd16553dd339942592c43da7eb350fb3d310e67 /Makefile
parentMove to the next message after reading it in vm (diff)
Generate aliases to msmtp -a * for broken emacs
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 539356e..221e5d3 100755
--- a/Makefile
+++ b/Makefile
@@ -113,7 +113,7 @@ all: clean build
# build/LOCAL_FILES targets overwrite what was copied in GLOBAL_FILES.
BUILD = $(patsubst %,build/%,$(GLOBAL_FILES) $(LOCAL_FILES) $(GPG_FILES))
-build: $(BUILD) emacsen
+build: $(BUILD) emacsen build/bin/msmtp/msmtp-default
# We must force these with a phony target, otherwise, make will see that they're
# already there (for example, from installing the rest of .mutt or .zsh) and
@@ -135,6 +135,11 @@ emacsen:
[ "$(EMACS_DISABLED)" = "True" ] || $(MAKE) -C $@
[ "$(EMACS_DISABLED)" = "True" ] || $(MAKE) -C $@ install
+build/bin/msmtp/msmtp-default: build/.msmtprc
+ -mkdir -p $(dir $@)
+ awk '/account/ { print "#!/bin/sh" > "$(dir $@)/msmtp-"$$2 ; print "$(call get-val,MSMTP_PATH) -a " $$2 " \"$$@\"" >> "$(dir $@)/msmtp-"$$2 }' $<
+ chmod 755 build/bin/msmtp/*
+
build/%: % $(SUBSTS_FILE)
[ -d $(dir $@) ] || mkdir -p $(dir $@)
( [ -d $< ] && rsync -a $</* $@/ ) || rsync -a $< $@