Root/package/uboot-lantiq/patches/000-build-infos.patch

1Add output like in linux kernel for current compiled file
2Used normaly in combination with make option -s
3
4Like in following example:
5
6$ make -s V=1
7[CC] tools/img2srec.c
8[CC] tools/bmp_logo.c
9[CC] examples/hello_world.c
10
11--- a/config.mk
12+++ b/config.mk
13@@ -234,17 +234,47 @@ export TEXT_BASE PLATFORM_CPPFLAGS PLATF
14 
15 #########################################################################
16 
17+ifndef KBUILD_VERBOSE
18+ KBUILD_VERBOSE:=0
19+endif
20+ifeq ("$(origin V)", "command line")
21+ KBUILD_VERBOSE:=$(V)
22+endif
23+ifeq (,$(findstring s,$(MAKEFLAGS)))
24+ KBUILD_VERBOSE:=0
25+endif
26+
27+ifneq ($(KBUILD_VERBOSE),0)
28+ define MESSAGE
29+ @printf " %s %s/%s\n" $(1) $(2) $(3)
30+ endef
31+else
32+ define MESSAGE
33+ endef
34+endif
35+
36 # Allow boards to use custom optimize flags on a per dir/file basis
37 BCURDIR := $(notdir $(CURDIR))
38+
39 $(obj)%.s: %.S
40+ $(call MESSAGE, [CPP],$(subst $(SRCTREE)/,,$(CURDIR)),$<)
41+ #echo $(CPP) $(AFLAGS) $(AFLAGS_$(@F)) $(AFLAGS_$(BCURDIR)) -o $@ $<
42     $(CPP) $(AFLAGS) $(AFLAGS_$(@F)) $(AFLAGS_$(BCURDIR)) -o $@ $<
43 $(obj)%.o: %.S
44+ $(call MESSAGE, [AS], $(subst $(SRCTREE)/,,$(CURDIR)),$<)
45+ #echo $(CC) $(AFLAGS) $(AFLAGS_$(@F)) $(AFLAGS_$(BCURDIR)) -o $@ $< -c
46     $(CC) $(AFLAGS) $(AFLAGS_$(@F)) $(AFLAGS_$(BCURDIR)) -o $@ $< -c
47 $(obj)%.o: %.c
48+ $(call MESSAGE, [CC], $(subst $(SRCTREE)/,,$(CURDIR)),$<)
49+ #echo $(CC) $(CFLAGS) $(CFLAGS_$(@F)) $(CFLAGS_$(BCURDIR)) -o $@ $< -c
50     $(CC) $(CFLAGS) $(CFLAGS_$(@F)) $(CFLAGS_$(BCURDIR)) -o $@ $< -c
51 $(obj)%.i: %.c
52+ $(call MESSAGE, [CPP],$(subst $(SRCTREE)/,,$(CURDIR)),$<)
53+ #echo $(CPP) $(CFLAGS) $(CFLAGS_$(@F)) $(CFLAGS_$(BCURDIR)) -o $@ $< -c
54     $(CPP) $(CFLAGS) $(CFLAGS_$(@F)) $(CFLAGS_$(BCURDIR)) -o $@ $< -c
55 $(obj)%.s: %.c
56+ $(call MESSAGE, [CC], $(subst $(SRCTREE)/,,$(CURDIR)),$<)
57+ #echo $(CC) $(CFLAGS) $(CFLAGS_$(@F)) $(CFLAGS_$(BCURDIR)) -o $@ $< -c -S
58     $(CC) $(CFLAGS) $(CFLAGS_$(@F)) $(CFLAGS_$(BCURDIR)) -o $@ $< -c -S
59 
60 #########################################################################
61

Archive Download this file



interactive