[dpdk-dev] mk: remove module compilation noise

Message ID 1473337981-27378-1-git-send-email-ferruh.yigit@intel.com (mailing list archive)
State Rejected, archived
Delegated to: Thomas Monjalon
Headers

Commit Message

Ferruh Yigit Sept. 8, 2016, 12:33 p.m. UTC
  Following log generated by Linux kernel Makefiles:
(cat /dev/null;   echo
kernel/.../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

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 mk/rte.module.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon Sept. 22, 2016, 11:35 p.m. UTC | #1
2016-09-08 13:33, Ferruh Yigit:
> Following log generated by Linux kernel Makefiles:
> (cat /dev/null;   echo
> kernel/.../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

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.
  
Ferruh Yigit Sept. 23, 2016, 9:04 a.m. UTC | #2
On 9/23/2016 12:35 AM, Thomas Monjalon wrote:
> 2016-09-08 13:33, Ferruh Yigit:
>> Following log generated by Linux kernel Makefiles:
>> (cat /dev/null;   echo
>> kernel/.../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
> 
> Yes good analysis.
> Another consequence is that V=0 is equivalent to V=1 (verbose mode).

Yes.

> I think it is better to fix the latter issue. I'll send a patch.

OK.
  

Patch

diff --git a/mk/rte.module.mk b/mk/rte.module.mk
index 53ed4fe..10cb667 100644
--- a/mk/rte.module.mk
+++ b/mk/rte.module.mk
@@ -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