summaryrefslogtreecommitdiff
path: root/Makefile
blob: 6d2921b32f6d1f58a41e2398ee515e5acf6c4f77 (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
CHECK = $(HOME)/.prefix:$(HOME):/usr/local:/usr:/
NANO_SHARE = $(firstword $(wildcard $(addsuffix /share/nano,$(subst :, ,$(CHECK)))))

targets=.nanorc .folders .crontab.cookie
all: $(targets)
clean:
	rm -f $(targets)

.nanorc: .nanorc.in $(NANO_SHARE)
	cat '$<' > '$@'
	for file in $(NANO_SHARE)/*.nanorc; do echo "include \"$$file\""; done >> '$@'

.folders: Maildir
	find ~/Maildir -maxdepth 2 -type f -name "maildirfolder" -printf '%h\n'|sed -r 's@.*/(.*\.)(.*)@.\1\2@'>'$@'

.crontab.cookie: .crontab .crontab.local
	cat $^ | crontab
	date > '$@'

commit:
	git commit -a

pull:
	git pull
	$(MAKE)