From 1649d56246a2bbd65ca0ac970fee2f27f9ee6ecc Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 25 Sep 2015 11:25:59 -0400 Subject: Have he Makefile be smarter about when it needs to do things --- .config/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to '.config/Makefile') 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 -- cgit v1.2.3