build: simplify logic for default library dependencies

Message ID 20180719143702.49511-1-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series build: simplify logic for default library dependencies |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Bruce Richardson July 19, 2018, 2:37 p.m. UTC
  EAL is a standard dependency of all libraries, except for those built
before it. We can therefore simplify the logic by just checking if EAL
has been processed, and make it a standard dependency if so.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/meson.build | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
  

Comments

Thomas Monjalon July 26, 2018, 1:55 p.m. UTC | #1
19/07/2018 16:37, Bruce Richardson:
> EAL is a standard dependency of all libraries, except for those built
> before it. We can therefore simplify the logic by just checking if EAL
> has been processed, and make it a standard dependency if so.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

I guess there is no specific benefit for 18.08.
It is deferred to 18.11 to avoid any risk.
  
Bruce Richardson Aug. 8, 2018, 3:58 p.m. UTC | #2
On Thu, Jul 26, 2018 at 03:55:56PM +0200, Thomas Monjalon wrote:
> 19/07/2018 16:37, Bruce Richardson:
> > EAL is a standard dependency of all libraries, except for those built
> > before it. We can therefore simplify the logic by just checking if EAL
> > has been processed, and make it a standard dependency if so.
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> I guess there is no specific benefit for 18.08.
> It is deferred to 18.11 to avoid any risk.
> 
Sure, no problem.
  
Thomas Monjalon Sept. 17, 2018, 11:53 a.m. UTC | #3
08/08/2018 17:58, Bruce Richardson:
> On Thu, Jul 26, 2018 at 03:55:56PM +0200, Thomas Monjalon wrote:
> > 19/07/2018 16:37, Bruce Richardson:
> > > EAL is a standard dependency of all libraries, except for those built
> > > before it. We can therefore simplify the logic by just checking if EAL
> > > has been processed, and make it a standard dependency if so.
> > > 
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > 
> > I guess there is no specific benefit for 18.08.
> > It is deferred to 18.11 to avoid any risk.
> > 
> Sure, no problem.

Applied, thanks
  

Patch

diff --git a/lib/meson.build b/lib/meson.build
index 1cc7e111f..4384813f8 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -45,12 +45,10 @@  foreach l:libraries
 	# use "deps" for internal DPDK dependencies, and "ext_deps" for
 	# external package/library requirements
 	ext_deps = []
-	deps = ['eal']   # eal is standard dependency except for itself
-	if l == 'kvargs'
-		deps = []
-	endif
-	if l == 'eal'
-		deps = ['kvargs']
+	deps = []
+	# eal is standard dependency once built
+	if dpdk_conf.has('RTE_LIBRTE_EAL')
+		deps += ['eal']
 	endif
 
 	dir_name = 'librte_' + l