From 6ce5c97981c8df8d1fcc5fa48053bbe3bb459f7f Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 31 Jan 2007 11:06:36 +0000 Subject: [PATCH] Made most of the build much quieter --- src/Makefile | 12 ++++++------ src/Makefile.housekeeping | 24 +++++++++++++++++++----- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/Makefile b/src/Makefile index aeedf4f2..1a9389f6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -115,15 +115,15 @@ $(BIN)/%.flags : # Rules for specific object types. # COMPILE_c = $(CC) $(CFLAGS) $(CFLAGS_c) $(OBJ_CFLAGS) -RULE_c = $(COMPILE_c) -c $< -o $@ -RULE_c_to_dbg%.o = $(COMPILE_c) -Ddebug_$(OBJECT)=$* -c $< -o $@ -RULE_c_to_c = $(COMPILE_c) -E -c $< > $@ -RULE_c_to_s = $(COMPILE_c) -S -g0 -c $< -o $@ +RULE_c = $(Q)$(COMPILE_c) -c $< -o $@ +RULE_c_to_dbg%.o = $(Q)$(COMPILE_c) -Ddebug_$(OBJECT)=$* -c $< -o $@ +RULE_c_to_c = $(Q)$(COMPILE_c) -E -c $< > $@ +RULE_c_to_s = $(Q)$(COMPILE_c) -S -g0 -c $< -o $@ PREPROCESS_S = $(CPP) $(CFLAGS) $(CFLAGS_S) $(OBJ_CFLAGS) ASSEMBLE_S = $(AS) $(ASFLAGS) -RULE_S = $(PREPROCESS_S) $< | $(ASSEMBLE_S) -o $@ -RULE_S_to_s = $(PREPROCESS_S) $< > $@ +RULE_S = $(Q)$(PREPROCESS_S) $< | $(ASSEMBLE_S) -o $@ +RULE_S_to_s = $(Q)$(PREPROCESS_S) $< > $@ DEBUG_TARGETS += dbg%.o c s diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index 497e69e7..a4258830 100644 --- a/src/Makefile.housekeeping +++ b/src/Makefile.housekeeping @@ -39,6 +39,16 @@ version : @$(TOUCH) $@ VERYCLEANUP += .toolcheck +# Build verbosity +# +ifeq ($(V),1) +Q = +QM = @\# +else +Q = @ +QM = @ +endif + # Check for an old version of gas (binutils 2.9.1) # OLDGAS := $(shell $(AS) --version | grep -q '2\.9\.1' && echo -DGAS291) @@ -111,11 +121,13 @@ define obj_template @$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) \ -M $(1) -MT "$(4)_DEPS" -MG | tr : = >> $(2) @echo -e '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \ + '\n\t$$(QM)echo " [BUILD] $$@"\n' \ '\n\t$$(RULE_$(3))\n' \ '\nBOBJS += $$(BIN)/$(4).o\n' \ $(foreach TGT,$(DEBUG_TARGETS), \ $(if $(RULE_$(3)_to_$(TGT)), \ '\n$$(BIN)/$(4).$(TGT) : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \ + '\n\t$$(QM)echo " [BUILD] $$@"\n' \ '\n\t$$(RULE_$(3)_to_$(TGT))\n' \ '\n$(TGT)_OBJS += $$(BIN)/$(4).$(TGT)\n' ) ) \ '\n$(2) : $$($(4)_DEPS)\n' \ @@ -274,18 +286,20 @@ VERYCLEANUP += $(BLIB_LIST) # BLIB = $(BIN)/blib.a $(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS) - $(RM) $(BLIB) - $(AR) r $@ $(BLIB_OBJS) - $(RANLIB) $@ + $(Q)$(RM) $(BLIB) + $(QM)echo " [AR] $@" + $(Q)$(AR) r $@ $(BLIB_OBJS) + $(Q)$(RANLIB) $@ blib : $(BLIB) # Build an intermediate object file from the objects required for the # specified target. # $(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT) - $(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \ + $(QM)echo " [LD] $@" + $(Q)$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \ -Map $(BIN)/$*.tmp.map - $(OBJDUMP) -ht $@ | $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map + $(Q)$(OBJDUMP) -ht $@ | $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map # Show a linker map for the specified target #