From 978b30e663f735176d55370b7924370ae063fa56 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 15 Feb 2013 00:31:34 +0100 Subject: Customize output Don't show any output from make itself (almost), just show what we're actually doing, and use color. --- dotfiles.mk | 24 +++++++++++++++--------- 1 file 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 -- cgit v1.2.3-54-g00ecf