diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2015-09-25 11:25:59 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-10-04 15:04:50 -0400 |
commit | 1649d56246a2bbd65ca0ac970fee2f27f9ee6ecc (patch) | |
tree | d17a116783685d8bb9b0fd65d6f7a908ddf09dea /.config/Makefile | |
parent | 64423da6f1b192aeb1c96282afc049b69ff8b763 (diff) |
Have he Makefile be smarter about when it needs to do things
Diffstat (limited to '.config/Makefile')
-rw-r--r-- | .config/Makefile | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/.config/Makefile b/.config/Makefile index 9ee3115..002a933 100644 --- a/.config/Makefile +++ b/.config/Makefile @@ -10,9 +10,10 @@ GIT_DIR = ${HOME}/.git targets = \ ${GIT_DIR}/info/exclude \ - ${HOME}/.folders \ ${XDG_CACHE_HOME}/config-symlinks/cookie \ - ${XDG_CACHE_HOME}/cron/cookie + $(if $(shell crontab -l),${XDG_CACHE_HOME}/cron/cookie) \ + $(if $(wildcard ${HOME}/Maildir),${HOME}/.folders) \ + $(if $(wildcard ${XDG_CONFIG_HOME}/dconf/user),${XDG_CONFIG_HOME}/dconf/user.txt) all: $(targets) clean: @@ -24,6 +25,9 @@ ${HOME}/.folders: ${HOME}/Maildir $(MAKEFILE_LIST) ${GIT_DIR}/info/exclude: ${HOME}/.git.info.exclude.in $(shell echo .??*/) ( cat $<; find $^ -type f -name 'CACHEDIR.TAG' -printf '%h\n'|sed 's@^\./@/@' ) > $@ +${XDG_CONFIG_HOME}/dconf/user.txt: ${XDG_CONFIG_HOME}/dconf/user + dconf dump / > $@ + ${XDG_CACHE_HOME}/cron/cookie: ${XDG_CONFIG_HOME}/cron -(cat $^/*; echo) | crontab - 2>/dev/null mkdir -p '$(@D)' @@ -34,8 +38,6 @@ ${XDG_CACHE_HOME}/config-symlinks/cookie: ${XDG_CONFIG_HOME}/symlinks mkdir -p '$(@D)' date > '$@' -${HOME}/Maildir: - mkdir -p '$@'/{cur,new,tmp} ${HOME}/Maildir/%: | ${HOME}/Maildir mkdir -p '$@'/{cur,new,tmp} touch '$@'/maildirfolder |