diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1af51d3 --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +CHECK = $(HOME)/.prefix:$(HOME):/usr/local:/usr:/ +NANO_SHARE = $(firstword $(wildcard $(addsuffix /share/nano,$(subst :, ,$(CHECK))))) + +ALSACTL=$(firstword $(shell which alsactl) echo) + +targets=.nanorc .folders .crontab.cookie .alsa.save +all: $(targets) +clean: + rm -f $(targets) + +.alsa.save: FORCE + $(ALSACTL) --file $(HOME)/.alsa.save store || touch '$@' + +.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} + +commit: + git commit -a + +pull: + git pull + $(MAKE) + +.PHONY: FORCE +FORCE: ; |