summaryrefslogtreecommitdiffhomepage
path: root/Rules.mak
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-02 01:41:53 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-02 01:41:53 +0000
commitb38673fb9fee63303cc6b7d4923ea0dd7cf7310a (patch)
treed6b2fba68832d7f0e061614dda4372119f58156f /Rules.mak
parent1f04c9d29c8a79cc71a7dd01e18e14c0fe8a8726 (diff)
make the build system puuuuuuuuuuurty
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak65
1 files changed, 55 insertions, 10 deletions
diff --git a/Rules.mak b/Rules.mak
index 4ad4dc451..ab6e311c6 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -121,16 +121,6 @@ check_ld=$(shell \
$(LD) --help | grep -q "\$(1)" && echo "-Wl,$(1)" ; \
fi)
-
-# Setup some shortcuts so that silent mode is silent like it should be
-ifeq ($(subst s,,$(MAKEFLAGS)),$(MAKEFLAGS))
-export MAKE_IS_SILENT=n
-SECHO=@echo
-else
-export MAKE_IS_SILENT=y
-SECHO=-@false
-endif
-
CFLAGS+=$(call check_gcc,-funsigned-char,)
CFLAGS+=$(call check_gcc,-mmax-stack-frame=256,)
@@ -262,4 +252,59 @@ ifeq ($(strip $(CONFIG_INSTALL_APPLET_DONT)),y)
INSTALL_OPTS=
endif
+#------------------------------------------------------------
+# Make the output nice and tight
+MAKEFLAGS += --no-print-directory
+export MAKE_IS_SILENT=n
+ifneq ($(findstring s,$(MAKEFLAGS)),)
+export MAKE_IS_SILENT=y
+SECHO := @-false
+DISP := sil
+Q := @
+else
+ifneq ($(V)$(VERBOSE),)
+SECHO := @-false
+DISP := ver
+Q :=
+else
+SECHO := @echo
+DISP := pur
+Q := @
+endif
+endif
+
+show_objs = $(subst $(top_builddir)/,,$(subst ../,,$@))
+pur_disp_compile.c = echo " "CC $(show_objs)
+pur_disp_compile.h = echo " "HOSTCC $(show_objs)
+pur_disp_strip = echo " "STRIP $(show_objs)
+pur_disp_link = echo " "LINK $(show_objs)
+pur_disp_ar = echo " "AR $(ARFLAGS) $(show_objs)
+sil_disp_compile.c = true
+sil_disp_compile.h = true
+sil_disp_strip = true
+sil_disp_link = true
+sil_disp_ar = true
+ver_disp_compile.c = echo $(cmd_compile.c)
+ver_disp_compile.h = echo $(cmd_compile.h)
+ver_disp_strip = echo $(cmd_strip)
+ver_disp_link = echo $(cmd_link)
+ver_disp_ar = echo $(cmd_ar)
+disp_compile.c = $($(DISP)_disp_compile.c)
+disp_compile.h = $($(DISP)_disp_compile.h)
+disp_strip = $($(DISP)_disp_strip)
+disp_link = $($(DISP)_disp_link)
+disp_ar = $($(DISP)_disp_ar)
+disp_gen = $(SECHO) " "GEN $@ ; true
+disp_doc = $(SECHO) " "DOC $(subst docs/,,$@) ; true
+cmd_compile.c = $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
+cmd_compile.h = $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
+cmd_strip = $(STRIPCMD) $@
+cmd_link = $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS)
+cmd_ar = $(AR) $(ARFLAGS) $@ $^
+compile.c = @$(disp_compile.c) ; $(cmd_compile.c)
+compile.h = @$(disp_compile.h) ; $(cmd_compile.h)
+do_strip = @$(disp_strip) ; $(cmd_strip)
+do_link = @$(disp_link) ; $(cmd_link)
+do_ar = @$(disp_ar) ; $(cmd_ar)
+
.PHONY: dummy