summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2013-02-15 00:31:34 +0100
committerGravatar Tom Willemsen2013-02-15 00:31:34 +0100
commit978b30e663f735176d55370b7924370ae063fa56 (patch)
tree5333b82418b4973e6ef8a61306e6e725441f529b
parentf6598f546995b025349702b0572d0308e45e78a4 (diff)
downloaddotfiles-978b30e663f735176d55370b7924370ae063fa56.tar.gz
dotfiles-978b30e663f735176d55370b7924370ae063fa56.zip
Customize output
Don't show any output from make itself (almost), just show what we're actually doing, and use color.
-rw-r--r--dotfiles.mk24
1 files changed, 15 insertions, 9 deletions
diff --git a/dotfiles.mk b/dotfiles.mk
index 6018dd2..aaabad3 100644
--- a/dotfiles.mk
+++ b/dotfiles.mk
@@ -35,11 +35,11 @@ install: $(install-modules) $(install-objects)
uninstall: $(uninstall-modules) $(uninstall-objects)
else
check:
- $(MAKE) -s -C ../ check
+ @$(MAKE) -s -C ../ check
install:
- $(MAKE) -C ../ install
+ @$(MAKE) -s -C ../ install
uninstall:
- $(MAKE) -C ../ uninstall
+ @$(MAKE) -C ../ uninstall
endif
$(modules): %:
@@ -47,23 +47,29 @@ $(modules): %:
@$(MAKE) -C $*
$(install-objects): install-%: %
- $(if $(call newer,$*), \
- install -pDm $(MODE) "$*" "$(DESTDIR)/$*")
+ @$(if $(call newer,$*), \
+ echo -e "$(FG_GRE)installing $(FG_YEL)$* $(CLR_RE)to $(DESTDIR) as $(MODE)"; \
+ install -pDm $(MODE) "$*" "$(DESTDIR)/$*", \
+ echo -e "$(FG_RED)not installing $(FG_YEL)$*$(CLR_RE)")
$(install-modules): install-%:
- @$(MAKE) -C $* install
+ @$(MAKE) -s -C $* install
$(uninstall-objects): uninstall-%:
- $(if $(call newer,$*),rm -f "$(DESTDIR)/$*")
+ @$(if $(call older,$*), \
+ echo -e "$(FG_RED)not uninstalling $(FG_YEL)$*$(CLR_RE)", \
+ echo -e "$(FG_GRE)uninstalling $(FG_YEL)$*$(CLR_RE)"; \
+ rm -f "$(DESTDIR)/$*")
$(uninstall-modules): uninstall-%:
@$(MAKE) -C $* uninstall
$(check-objects): check-%:
@$(if $(call newer,$*), \
- echo -e "$(FG_YEL)$* $(FG_GRE)newer$(CLR_RE)!", \
+ echo -e "$(FG_YEL)$* $(FG_GRE)newer$(CLR_RE) than $(DESTDIR)$*!", \
$(if $(call older,$*), \
- echo -e "$(FG_YEL)$* $(FG_RED)older$(CLR_RE)."))
+ echo -e "$(FG_YEL)$* $(FG_RED)older$(CLR_RE) than $(DESTDIR)$*.", \
+ echo -e "$(FG_YEL)$* $(FG_BLU)up to date$(CLR_RE) with $(DESTDIR)$*."))
$(check-modules): check-%:
@$(MAKE) -s -C $* check