blob: 8c0ffa967e073bdb600292ea894a2df0f5974a4e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
CHECK = $(HOME)/.prefix:$(HOME):/usr/local:/usr:/
NANO_SHARE = $(firstword $(wildcard $(addsuffix /share/nano,$(subst :, ,$(CHECK)))))
ALSACTL=$(firstword $(shell . $(HOME)/.profile &>/dev/null; which alsactl) echo)
targets=.nanorc .folders .crontab.cookie .current.asound
all: $(targets)
clean:
rm -f $(targets)
%.asound: FORCE
$(ALSACTL) store --file '$@'
.nanorc: .nanorc.in $(NANO_SHARE)
cat '$<' > '$@'
for file in $(NANO_SHARE)/*.nanorc; do echo "include \"$$file\""; done >> '$@'
.folders: Maildir
( echo '..'; find ~/Maildir -maxdepth 2 -type f -name "maildirfolder" -printf '%h\n'|sed -r 's@.*/(.*\.)(.*)@.\1\2@' )|sort>'$@'
.crontab.cookie: .crontab .crontab.local
(cat $^; echo) | crontab -
date > '$@'
# don't do anything, just create these if they doesn't exist
.crontab.local:
touch '$@'
Maildir:
mkdir -p '$@'/{cur,new,tmp}
Maildir/%: | Maildir
mkdir -p '$@'/{cur,new,tmp}
touch '$@'/maildirfolder
commit:
git commit -a
pull:
git pull
$(MAKE)
.PHONY: FORCE
FORCE: ;
|