Adapted more Makefiles to the more efficient info printing.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11390 a1c6a512-1295-4272-9138-f99709370657
diff --git a/apps/codecs/libwavpack/Makefile b/apps/codecs/libwavpack/Makefile
index 077e4aa..7afc9e1 100644
--- a/apps/codecs/libwavpack/Makefile
+++ b/apps/codecs/libwavpack/Makefile
@@ -30,15 +30,13 @@
 all: $(OUTPUT)
 
 $(OUTPUT): $(OBJS)
-	@echo "AR+RANLIB $(notdir $@)"
-	@$(AR) ruv $@ $+ >/dev/null 2>&1
-	@$(RANLIB) $@
+	$(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1
+	$(SILENT)$(RANLIB) $@
 
 include $(TOOLSDIR)/make.inc
 
 clean:
-	@echo "cleaning libwavpack"
-	@rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
+	$(call PRINTS,cleaning libwavpack)rm -f $(OBJS) $(OUTPUT) $(DEPFILE)
 
 ifneq ($(MAKECMDGOALS),clean)
 -include $(DEPFILE)
diff --git a/bootloader/Makefile b/bootloader/Makefile
index 46a056c..134187d 100644
--- a/bootloader/Makefile
+++ b/bootloader/Makefile
@@ -50,35 +50,30 @@
 dep: $(DEPFILE)
 
 $(LINKFILE): $(LDS)
-	@echo "Build LDS file"
-	@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
+	$(call PRINTS,Build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
 
 $(MAXOUTFILE):
-	@echo '#include "config.h"' > $(MAXINFILE)
-	@echo "ROM_START" >> $(MAXINFILE)
-	@cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE)
-	@rm $(MAXINFILE)
+	$(SILENT)echo '#include "config.h"' > $(MAXINFILE)
+	$(SILENT)echo "ROM_START" >> $(MAXINFILE)
+	$(SILENT)cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE)
+	$(SILENT)rm $(MAXINFILE)
 
 $(OBJDIR)/bootloader.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX)
-	@echo "LD bootloader.elf"
-	$(SILENT)$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootloader.map
+	$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootloader.map
 
 $(OBJDIR)/bootloader.bin : $(OBJDIR)/bootloader.elf
-	@echo "OBJCOPY $<"
-	$(SILENT)$(OC) -O binary $< $@
+	$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
 
 $(OBJDIR)/bootloader.asm: $(OBJDIR)/bootloader.bin
 	$(TOOLSDIR)/sh2d -sh1 $< > $@
 
 $(BUILDDIR)/$(BINARY) : $(OBJDIR)/bootloader.bin
-	@echo "Build bootloader file"
-	$(SILENT)$(MKFIRMWARE) $< $@
+	$(call PRINTS,Build bootloader file)$(MKFIRMWARE) $< $@
 
 include $(TOOLSDIR)/make.inc
 
 clean:
-	@echo "cleaning bootloader"
-	@-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/bootloader.asm \
+	$(call PRINTS,cleaning bootloader)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/bootloader.asm \
 	$(OBJDIR)/bootloader.bin $(OBJDIR)/bootloader.elf $(OBJDIR)/*.map \
 	$(LINKFILE) $(MAXOUTFILE) $(DEPFILE)
 
diff --git a/flash/bootbox/Makefile b/flash/bootbox/Makefile
index 7a58749..7391f3c 100644
--- a/flash/bootbox/Makefile
+++ b/flash/bootbox/Makefile
@@ -42,39 +42,33 @@
 dep: $(DEPFILE)
 
 $(LINKFILE): $(LDS)
-	@echo "Build LDS file"
-	@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
+	$(call PRINTS,Build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
 
 $(MAXOUTFILE):
-	@echo '#include "config.h"' > $(MAXINFILE)
-	@echo "ROM_START" >> $(MAXINFILE)
-	@cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE)
-	@rm $(MAXINFILE)
+	$(SILENT)echo '#include "config.h"' > $(MAXINFILE)
+	$(SILENT)echo "ROM_START" >> $(MAXINFILE)
+	$(SILENT)cat $(MAXINFILE) | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - > $(MAXOUTFILE)
+	$(SILENT)rm $(MAXINFILE)
 
 $(OBJDIR)/bootbox.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX)
-	@echo "LD bootbox.elf"
-	$(CC) $(GCCOPTS) -Wl,--gc-sections -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootbox.map
+	$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Wl,--gc-sections -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/bootbox.map
 
 $(OBJDIR)/bootbox.bin : $(OBJDIR)/bootbox.elf
-	@echo "OBJCOPY $<"
-	@$(OC) -O binary $< $@
+	$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
 
 $(OBJDIR)/bootbox.asm: $(OBJDIR)/bootbox.bin
 	$(TOOLSDIR)/sh2d -sh1 $< > $@
 
 $(BUILDDIR)/$(BINARY) : $(OBJDIR)/bootbox.bin
-	@echo "Build bootbox file"
-	@$(MKFIRMWARE) $< $@
+	$(call PRINTS,Build bootbox file)$(MKFIRMWARE) $< $@
 
 $(FLASHFILE): $(OBJDIR)/bootbox.bin
-	$(SILENT)(echo "UCLPACK bootbox" ; \
-	$(TOOLSDIR)/uclpack --best --2e $< $@ >/dev/null 2>&1;)
+	$(call PRINTS,UCLPACK bootbox)$(TOOLSDIR)/uclpack --best --2e $< $@ >/dev/null 2>&1;
 
 include $(TOOLSDIR)/make.inc
 
 clean:
-	@echo "cleaning bootbox"
-	@-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/bootbox.asm $(OBJDIR)/rockbox.ucl \
+	$(call PRINTS,cleaning bootbox)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) $(OBJDIR)/bootbox.asm $(OBJDIR)/rockbox.ucl \
 	$(OBJDIR)/bootbox.bin $(OBJDIR)/bootbox.elf $(OBJDIR)/*.map \
 	$(LINKFILE) $(MAXOUTFILE) $(DEPFILE) $(FLASHFILE)
 
diff --git a/gdb/Makefile b/gdb/Makefile
index fa94eac..0850767 100644
--- a/gdb/Makefile
+++ b/gdb/Makefile
@@ -41,26 +41,21 @@
 dep: $(DEPFILE)
 
 $(LINKFILE): $(LDS)
-	@echo "Build LDS file"
-	@cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
+	$(call PRINTS,Build $(@F))cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
 
 $(OBJDIR)/stub.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX)
-	@echo "LD stub.elf"
-	@$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/stub.map
+	$(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR) -L$(BUILDDIR)/firmware -lrockbox -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/stub.map
 
 $(OBJDIR)/stub.bin : $(OBJDIR)/stub.elf
-	@echo "OBJCOPY $<"
-	@$(OC) -O binary $< $@
+	$(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@
 
 $(BUILDDIR)/$(BINARY) : $(OBJDIR)/stub.bin
-	@echo "Build stub file"
-	$(MKFIRMWARE) $< $@
+	$(call PRINTS,Build stub file)$(MKFIRMWARE) $< $@
 
 include $(TOOLSDIR)/make.inc
 
 clean:
-	@echo "cleaning stub"
-	@-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) \
+	$(call PRINTS,cleaning stub)-rm -f $(OBJS) $(BUILDDIR)/$(BINARY) \
 	$(OBJDIR)/stub.bin $(OBJDIR)/stub.elf $(OBJDIR)/*.map \
 	$(LINKFILE) $(DEPFILE)