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