summaryrefslogtreecommitdiffstats
path: root/dotfiles.mk
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles.mk')
-rw-r--r--dotfiles.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/dotfiles.mk b/dotfiles.mk
index 53546bd..82d1c31 100644
--- a/dotfiles.mk
+++ b/dotfiles.mk
@@ -2,6 +2,7 @@ LOAD_PATH=. /usr/share/emacs/site-lisp $(HOME)/.emacs.d/site-lisp
EMACS=emacs $(addprefix -L ,$(LOAD_PATH))
MODE=644
+FG_BLU=\033[0;34m
FG_YEL=\033[0;33m
FG_GRE=\033[0;32m
FG_RED=\033[0;31m
@@ -11,6 +12,9 @@ compile = $(EMACS) -Q -batch -eval "(byte-compile-file \"$(1)\")"
define newer =
$(shell if [ "$(1)" -nt "$(DESTDIR)/$(1)" ]; then echo "newer"; fi)
endef
+define older =
+$(shell if [ "$(1)" -ot "$(DESTDIR)/$(1)" ]; then echo "older"; fi)
+endef
install-objects=$(addprefix install-,$(objects))
uninstall-objects=$(addprefix uninstall-,$(objects))
@@ -49,7 +53,8 @@ $(uninstall-modules): uninstall-%:
$(check-objects): check-%:
@$(if $(call newer,$*), \
echo -e "$(FG_YEL)$* $(FG_GRE)newer$(CLR_RE)!", \
- echo -e "$(FG_YEL)$* $(FG_RED)not newer$(CLR_RE).")
+ $(if $(call older,$*), \
+ echo -e "$(FG_YEL)$* $(FG_RED)older$(CLR_RE)."))
$(check-modules): check-%:
@$(MAKE) -C $* check