mk: remove module compilation noise
PATCH 1/1 mk: remove module compilation noise
Following log generated by Linux kernel Makefiles:
(cat /dev/null; echokernel/.../build/lib/librte_eal/linuxapp/igb_uio/igb_uio.ko;) > .../build/lib/librte_eal/linuxapp/igb_uio/modules.order
This happens because $(Q) used for both Linux and DPDK makefiles and DPDK unsets this variable when V=0, which makes Linux verbose.
More details:
rte.modules calls kernel makefile with V=0 argument
kernel makefile includes igb_uio/Makefile, which includes rte.vars.mk rte.vars.mk unsets Q when V=0
--- mk/rte.module.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mk/rte.module.mk +1 -1
@@ -78,7 +78,7 @@ build: _postbuild $(MODULE).ko: $(SRCS_LINKS) @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ - CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0) + CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,) # install module in $(RTE_OUTPUT)/kmod $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko
Signature · 1 line
2.7.4
2016-09-08 13:33, Ferruh Yigit:
Quoted 5 lines
Following log generated by Linux kernel Makefiles:
(cat/dev/null; echokernel/.../build/lib/librte_eal/linuxapp/igb_uio/igb_uio.ko;) > .../build/lib/librte_eal/linuxapp/igb_uio/modules.order
Quoted 7 lines
This happens because $(Q) used for both Linux and DPDK makefiles and DPDK unsets this variable when V=0, which makes Linux verbose.
More details:
rte.modules calls kernel makefile with V=0 argument
kernel makefile includes igb_uio/Makefile, which includes rte.vars.mk rte.vars.mk unsets Q when V=0
Yes good analysis.
Another consequence is that V=0 is equivalent to V=1 (verbose mode). I think it is better to fix the latter issue. I'll send a patch.
PATCH 1/1 mk: fix verbosity zero
Verbosity is considered enabled when $V is not empty. So V=0 and V=1 are equivalent.
It is fixed by unsetting V when it is 0.
A side effect is to fix kernel module compilation verbosity which is set to 0 when V is empty.
--- mk/rte.sdkroot.mk | 3 +++ mk/rte.vars.mk | 3 +++ 2 files changed, 6 insertions(+)
mk/rte.sdkroot.mk +3 -0
@@ -34,6 +34,9 @@ MAKEFLAGS += --no-print-directory # define Q to '@' or not. $(Q) is used to prefix all shell commands to # be executed silently. Q=@ +ifeq '$V' '0' +override V= +endif ifdef V ifeq ("$(origin V)", "command line") Q=
mk/rte.vars.mk +3 -0
@@ -46,6 +46,9 @@ endif # define Q to '@' or not. $(Q) is used to prefix all shell commands to # be executed silently. Q=@ +ifeq '$V' '0' +override V= +endif ifdef V ifeq ("$(origin V)", "command line") Q=
Signature · 1 line
2.7.0
Re: [PATCH] mk: fix verbosity zero
Quoted 19 lines · Thomas Monjalon
Verbosity is considered enabled when $V is not empty. So V=0 and V=1 are equivalent.
It is fixed by unsetting V when it is 0.A side effect is to fix kernel module compilation verbosity which is set to 0 when V is empty.
Reported-by Ferruh Yigit <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>--- mk/rte.sdkroot.mk | 3 +++ mk/rte.vars.mk | 3 +++ 2 files changed, 6 insertions(+)mk/rte.sdkroot.mk +0
-0
mk/rte.sdkroot.mk MAKEFLAGS += --no-print-directory · line 40
Quoted 7 lines
mk/rte.sdkroot.mk +3
-0@@ -34,6 +34,9 @@ MAKEFLAGS += --no-print-directory # define Q to '@' or not. $(Q) is used to prefix all shell commands to # be executed silently. Q=@ +ifeq '$V' '0' +override V= +endif ifdef V
Why not simply:
-ifdef V
+ifeq ($(V),1)
Quoted 17 lines
mk/rte.sdkroot.mk +0
-0ifeq ("$(origin V)", "command line") Q=mk/rte.vars.mk +3
-0@@ -46,6 +46,9 @@ endif # define Q to '@' or not. $(Q) is used to prefix all shell commands to # be executed silently. Q=@ +ifeq '$V' '0' +override V= +endif ifdef V ifeq ("$(origin V)", "command line") Q=
Re: [PATCH] mk: fix verbosity zero
2016-09-23 10:06, Ferruh Yigit:
Quoted 10 lines · Thomas Monjalon
Quoted 9 lines
Verbosity is considered enabled when $V is not empty. So V=0 and V=1 are equivalent.
It is fixed by unsetting V when it is 0.A side effect is to fix kernel module compilation verbosity which is set to 0 when V is empty.
Reported-by Ferruh Yigit <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>
[...]
Quoted 12 lines
mk/rte.sdkroot.mk MAKEFLAGS += --no-print-directory · line 40
Quoted 10 lines
mk/rte.sdkroot.mk +3
-0@@ -34,6 +34,9 @@ MAKEFLAGS += --no-print-directory # define Q to '@' or not. $(Q) is used to prefix all shell commands to # be executed silently. Q=@ +ifeq '$V' '0' +override V= +endif ifdef VWhy not simply:
Review
Quoted 2 lines
(quoted diff) +1
-1-ifdef V +ifeq ($(V),1)
Because:
- V could have a higher value
- $(if $V) construct is used in several places in the makefiles
See git grep '$(if $(*V'
Re: [PATCH] mk: fix verbosity zero
In reply to Thomas MonjalonQuoted 9 lines · Thomas Monjalon
Verbosity is considered enabled when $V is not empty. So V=0 and V=1 are equivalent.
It is fixed by unsetting V when it is 0.A side effect is to fix kernel module compilation verbosity which is set to 0 when V is empty.
Reported-by Ferruh Yigit <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>
Re: [PATCH] mk: fix verbosity zero
2016-09-23 10:33, Ferruh Yigit:
Quoted 5 lines · Thomas Monjalon
Quoted 4 lines
Verbosity is considered enabled when $V is not empty. So V=0 and V=1 are equivalent.
It is fixed by unsetting V when it is 0.
Quoted 7 lines
Quoted 5 lines
A side effect is to fix kernel module compilation verbosity which is set to 0 when V is empty.
Reported-by Ferruh Yigit <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>Acked-by Ferruh Yigit <[email protected]>
Applied with additional comment:
"It is a well spread shortcut in makefiles, see git grep '$(if $(*V'"
Quoted 9 lines · Thomas Monjalon
2016-09-08 13:33, Ferruh Yigit:
Quoted 8 lines
Following log generated by Linux kernel Makefiles:
(cat/dev/null; echokernel/.../build/lib/librte_eal/linuxapp/igb_uio/igb_uio.ko;) > .../build/lib/librte_eal/linuxapp/igb_uio/modules.orderThis happens because $(Q) used for both Linux and DPDK makefiles and DPDK unsets this variable when V=0, which makes Linux verbose.
Quoted 7 lines
Quoted 4 lines
More details:
rte.modules calls kernel makefile with V=0 argument
kernel makefile includes igb_uio/Makefile, which includes rte.vars.mk rte.vars.mk unsets Q when V=0Yes good analysis.
Another consequence is that V=0 is equivalent to V=1 (verbose mode).
Yes.
Quoted 1 line
I think it is better to fix the latter issue. I'll send a patch.
OK.