Explorar el Código

Made most of the build much quieter

tags/v0.9.3
Michael Brown hace 18 años
padre
commit
6ce5c97981
Se han modificado 2 ficheros con 25 adiciones y 11 borrados
  1. 6
    6
      src/Makefile
  2. 19
    5
      src/Makefile.housekeeping

+ 6
- 6
src/Makefile Ver fichero

@@ -115,15 +115,15 @@ $(BIN)/%.flags :
115 115
 # Rules for specific object types.
116 116
 #
117 117
 COMPILE_c	= $(CC) $(CFLAGS) $(CFLAGS_c) $(OBJ_CFLAGS)
118
-RULE_c		= $(COMPILE_c) -c $< -o $@
119
-RULE_c_to_dbg%.o = $(COMPILE_c) -Ddebug_$(OBJECT)=$* -c $< -o $@
120
-RULE_c_to_c	= $(COMPILE_c) -E -c $< > $@
121
-RULE_c_to_s	= $(COMPILE_c) -S -g0 -c $< -o $@ 
118
+RULE_c		= $(Q)$(COMPILE_c) -c $< -o $@
119
+RULE_c_to_dbg%.o = $(Q)$(COMPILE_c) -Ddebug_$(OBJECT)=$* -c $< -o $@
120
+RULE_c_to_c	= $(Q)$(COMPILE_c) -E -c $< > $@
121
+RULE_c_to_s	= $(Q)$(COMPILE_c) -S -g0 -c $< -o $@ 
122 122
 
123 123
 PREPROCESS_S	= $(CPP) $(CFLAGS) $(CFLAGS_S) $(OBJ_CFLAGS)
124 124
 ASSEMBLE_S	= $(AS) $(ASFLAGS)
125
-RULE_S		= $(PREPROCESS_S) $< | $(ASSEMBLE_S) -o $@
126
-RULE_S_to_s	= $(PREPROCESS_S) $< > $@
125
+RULE_S		= $(Q)$(PREPROCESS_S) $< | $(ASSEMBLE_S) -o $@
126
+RULE_S_to_s	= $(Q)$(PREPROCESS_S) $< > $@
127 127
 
128 128
 DEBUG_TARGETS	+= dbg%.o c s
129 129
 

+ 19
- 5
src/Makefile.housekeeping Ver fichero

@@ -39,6 +39,16 @@ version :
39 39
 	@$(TOUCH) $@
40 40
 VERYCLEANUP	+= .toolcheck
41 41
 
42
+# Build verbosity
43
+#
44
+ifeq ($(V),1)
45
+Q = 
46
+QM = @\#
47
+else
48
+Q = @
49
+QM = @
50
+endif
51
+
42 52
 # Check for an old version of gas (binutils 2.9.1)
43 53
 #
44 54
 OLDGAS	:= $(shell $(AS) --version | grep -q '2\.9\.1' && echo -DGAS291)
@@ -111,11 +121,13 @@ define obj_template
111 121
 	@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) \
112 122
 		-M $(1) -MT "$(4)_DEPS" -MG | tr : = >> $(2)
113 123
 	@echo -e '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
124
+		 '\n\t$$(QM)echo "  [BUILD] $$@"\n' \
114 125
 		 '\n\t$$(RULE_$(3))\n' \
115 126
 		 '\nBOBJS += $$(BIN)/$(4).o\n' \
116 127
 		 $(foreach TGT,$(DEBUG_TARGETS), \
117 128
 		    $(if $(RULE_$(3)_to_$(TGT)), \
118 129
 		    '\n$$(BIN)/$(4).$(TGT) : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
130
+		    '\n\t$$(QM)echo "  [BUILD] $$@"\n' \
119 131
 		    '\n\t$$(RULE_$(3)_to_$(TGT))\n' \
120 132
 		    '\n$(TGT)_OBJS += $$(BIN)/$(4).$(TGT)\n' ) ) \
121 133
 		 '\n$(2) : $$($(4)_DEPS)\n' \
@@ -274,18 +286,20 @@ VERYCLEANUP	+= $(BLIB_LIST)
274 286
 #
275 287
 BLIB		= $(BIN)/blib.a
276 288
 $(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS)
277
-	$(RM) $(BLIB)
278
-	$(AR) r $@ $(BLIB_OBJS)
279
-	$(RANLIB) $@
289
+	$(Q)$(RM) $(BLIB)
290
+	$(QM)echo "  [AR] $@"
291
+	$(Q)$(AR) r $@ $(BLIB_OBJS)
292
+	$(Q)$(RANLIB) $@
280 293
 blib : $(BLIB)
281 294
 
282 295
 # Build an intermediate object file from the objects required for the
283 296
 # specified target.
284 297
 #
285 298
 $(BIN)/%.tmp : $(BLIB) $(MAKEDEPS) $(LDSCRIPT) 
286
-	$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \
299
+	$(QM)echo "  [LD] $@"
300
+	$(Q)$(LD) $(LDFLAGS) -T $(LDSCRIPT) $(TGT_LD_FLAGS) $(BLIB) -o $@ \
287 301
 		-Map $(BIN)/$*.tmp.map
288
-	$(OBJDUMP) -ht $@ | $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map
302
+	$(Q)$(OBJDUMP) -ht $@ | $(SORTOBJDUMP) >> $(BIN)/$*.tmp.map
289 303
 
290 304
 # Show a linker map for the specified target
291 305
 #

Loading…
Cancelar
Guardar