Commit 04a34c96b19dab48bfcc22b554227c8d9dca0238

Authored by Masahiro Yamada
Committed by Tom Rini
1 parent ad0fed46b9

kbuild: use shorten logs for misc targets

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Showing 5 changed files with 47 additions and 37 deletions Side-by-side Diff

... ... @@ -1048,9 +1048,12 @@
1048 1048 @echo '*** Warning: make $@ is unnecessary now.'
1049 1049  
1050 1050 # ---------------------------------------------------------------------------
  1051 +quiet_cmd_cpp_lds = LDS $@
  1052 +cmd_cpp_lds = $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ \
  1053 + -x assembler-with-cpp -P -o $@ $<
1051 1054  
1052   -u-boot.lds: $(LDSCRIPT) prepare
1053   - $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$< >$@
  1055 +u-boot.lds: $(LDSCRIPT) prepare FORCE
  1056 + $(call if_changed,cpp_lds)
1054 1057  
1055 1058 PHONY += nand_spl
1056 1059 nand_spl: prepare
arch/blackfin/cpu/Makefile
... ... @@ -37,6 +37,10 @@
37 37 endif
38 38  
39 39 CPPFLAGS_init.lds := -ansi
  40 +
  41 +quiet_cmd_link_init = LD $@
  42 + cmd_link_init = $(LD) $(LDFLAGS) -T $^ -o $@
40 43 $(obj)/init.elf: $(obj)/init.lds $(obj)/init.o $(obj)/initcode.o
41   - $(LD) $(LDFLAGS) -T $^ -o $@
  44 + $(call if_changed,link_init)
  45 +targets += init.lds init.o
examples/api/Makefile
... ... @@ -15,42 +15,44 @@
15 15 extra-y = demo
16 16  
17 17 # Source files located in the examples/api directory
18   -SOBJ_FILES-y += crt0.o
19   -COBJ_FILES-y += demo.o
20   -COBJ_FILES-y += glue.o
21   -COBJ_FILES-y += libgenwrap.o
  18 +OBJ-y += crt0.o
  19 +OBJ-y += demo.o
  20 +OBJ-y += glue.o
  21 +OBJ-y += libgenwrap.o
22 22  
23 23 # Source files which exist outside the examples/api directory
24   -EXT_COBJ_FILES-y += lib/crc32.o
25   -EXT_COBJ_FILES-y += lib/ctype.o
26   -EXT_COBJ_FILES-y += lib/div64.o
27   -EXT_COBJ_FILES-y += lib/string.o
28   -EXT_COBJ_FILES-y += lib/time.o
29   -EXT_COBJ_FILES-y += lib/vsprintf.o
30   -EXT_SOBJ_FILES-$(CONFIG_PPC) += arch/powerpc/lib/ppcstring.o
  24 +EXT_COBJ-y += lib/crc32.o
  25 +EXT_COBJ-y += lib/ctype.o
  26 +EXT_COBJ-y += lib/div64.o
  27 +EXT_COBJ-y += lib/string.o
  28 +EXT_COBJ-y += lib/time.o
  29 +EXT_COBJ-y += lib/vsprintf.o
  30 +EXT_SOBJ-$(CONFIG_PPC) += arch/powerpc/lib/ppcstring.o
31 31  
32 32 # Create a list of object files to be compiled
33   -OBJS += $(addprefix $(obj)/,$(SOBJ_FILES-y))
34   -OBJS += $(addprefix $(obj)/,$(COBJ_FILES-y))
35   -OBJS += $(addprefix $(obj)/,$(notdir $(EXT_COBJ_FILES-y)))
36   -OBJS += $(addprefix $(obj)/,$(notdir $(EXT_SOBJ_FILES-y)))
  33 +OBJS := $(OBJ-y) $(notdir $(EXT_COBJ-y) $(EXT_SOBJ-y))
  34 +targets += $(OBJS)
  35 +OBJS := $(addprefix $(obj)/,$(OBJS))
37 36  
38 37 #########################################################################
39 38  
40   -$(obj)/demo: $(OBJS)
41   - $(LD) --gc-sections -Ttext $(LOAD_ADDR) -o $@ $^ $(PLATFORM_LIBS)
  39 +quiet_cmd_link_demo = LD $@
  40 +cmd_link_demo = $(LD) --gc-sections -Ttext $(LOAD_ADDR) -o $@ $(filter-out $(PHONY), $^) $(PLATFORM_LIBS)
42 41  
  42 +$(obj)/demo: $(OBJS) FORCE
  43 + $(call if_changed,link_demo)
  44 +
43 45 # demo.bin is never genrated. Is this necessary?
44 46 OBJCOPYFLAGS_demo.bin := -O binary
45 47 $(obj)/demo.bin: $(obj)/demo FORCE
46 48 $(call if_changed,objcopy)
47 49  
48 50 # Rule to build generic library C files
49   -$(addprefix $(obj)/,$(notdir $(EXT_COBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/lib/%.c FORCE
  51 +$(addprefix $(obj)/,$(notdir $(EXT_COBJ-y))): $(obj)/%.o: lib/%.c FORCE
50 52 $(call cmd,force_checksrc)
51 53 $(call if_changed_rule,cc_o_c)
52 54  
53 55 # Rule to build architecture-specific library assembly files
54   -$(addprefix $(obj)/,$(notdir $(EXT_SOBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/arch/$(ARCH)/lib/%.S
  56 +$(addprefix $(obj)/,$(notdir $(EXT_SOBJ-y))): $(obj)/%.o: arch/powerpc/lib/%.S FORCE
55 57 $(call if_changed_dep,as_o_S)
examples/standalone/Makefile
... ... @@ -24,22 +24,18 @@
24 24 extra-y += $(addsuffix .srec,$(extra-y)) $(addsuffix .bin,$(extra-y))
25 25 clean-files := $(extra-) $(addsuffix .srec,$(extra-)) $(addsuffix .bin,$(extra-))
26 26  
27   -
28 27 COBJS := $(ELF:=.o)
29 28  
30 29 LIB = $(obj)/libstubs.o
31 30  
32   -LIBAOBJS-$(CONFIG_PPC) += ppc_longjmp.o ppc_setjmp.o
33   -LIBAOBJS-$(CONFIG_8xx) += test_burst_lib.o
34   -LIBAOBJS := $(LIBAOBJS-y)
  31 +LIBOBJS-$(CONFIG_PPC) += ppc_longjmp.o ppc_setjmp.o
  32 +LIBOBJS-$(CONFIG_8xx) += test_burst_lib.o
  33 +LIBOBJS-y += stubs.o
35 34  
36   -LIBCOBJS = stubs.o
37   -
38 35 .SECONDARY: $(call objectify,$(COBJS))
39   -targets += $(patsubst $(obj)/%,%,$(LIB)) $(COBJS) $(LIBAOBJS) $(LIBCOBJS)
  36 +targets += $(patsubst $(obj)/%,%,$(LIB)) $(COBJS) $(LIBOBJS-y)
40 37  
41   -LIBOBJS = $(addprefix $(obj)/,$(LIBAOBJS) $(LIBCOBJS))
42   -
  38 +LIBOBJS := $(addprefix $(obj)/,$(LIBOBJS-y))
43 39 ELF := $(addprefix $(obj)/,$(ELF))
44 40  
45 41 gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
... ... @@ -66,11 +62,12 @@
66 62 $(LIB): $(LIBOBJS) FORCE
67 63 $(call if_changed,link_lib)
68 64  
69   -$(ELF):
70   -$(obj)/%: $(obj)/%.o $(LIB)
71   - $(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \
72   - -o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \
73   - -L$(gcclibdir) -lgcc
  65 +quiet_cmd_link_elf = LD $@
  66 + cmd_link_elf = $(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \
  67 + -o $@ -e $(SYM_PREFIX)$(@F) $< $(LIB) -L$(gcclibdir) -lgcc
  68 +
  69 +$(ELF): $(obj)/%: $(obj)/%.o $(LIB) FORCE
  70 + $(call if_changed,link_elf)
74 71  
75 72 $(obj)/%.srec: OBJCOPYFLAGS := -O srec
76 73 $(obj)/%.srec: $(obj)/% FORCE
... ... @@ -234,8 +234,12 @@
234 234 # FIX ME
235 235 cpp_flags := $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(UBOOTINCLUDE) $(NOSTDINC_FLAGS)
236 236  
  237 +quiet_cmd_cpp_lds = LDS $@
  238 +cmd_cpp_lds = $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ \
  239 + -x assembler-with-cpp -P -o $@ $<
  240 +
237 241 $(obj)/u-boot-spl.lds: $(LDSCRIPT) FORCE
238   - $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@
  242 + $(call if_changed,cpp_lds)
239 243  
240 244 # read all saved command lines
241 245