Customize output

Don't show any output from make itself (almost), just show what we're
actually doing, and use color.
This commit is contained in:
Tom Willemsen 2013-02-15 00:31:34 +01:00
parent f6598f5469
commit 978b30e663

View file

@ -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