diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2015-09-25 11:25:59 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2015-09-25 11:25:59 -0400 |
commit | 899ce57d60523ee9679dfd4bd2e75f50901f32d1 (patch) | |
tree | 3bec54f42a0b82dde6452e68470267e0d09b8b4d /.config/Makefile | |
parent | 2de60d8a7af19aaec44cdff2e30bfa6820603a44 (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 |