From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH] mk: optimize directory dependencies Date: Tue, 24 Jan 2017 13:05:08 +0000 Message-ID: <8d40ce22-7be2-e8e4-6d9a-a8e43f0b1dd2@intel.com> References: <20170123181813.00567e47@platinum> <1485191953-2613-1-git-send-email-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: thomas.monjalon@6wind.com To: Olivier Matz , dev@dpdk.org Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 08CF41023 for ; Tue, 24 Jan 2017 14:05:10 +0100 (CET) In-Reply-To: <1485191953-2613-1-git-send-email-olivier.matz@6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 1/23/2017 5:19 PM, Olivier Matz wrote: > Before this patch, the management of dependencies between directories > had several issues: > > - the generation of .depdirs, done at configuration is slow: it can take > more than one minute on some slow targets (usually ~10s on a standard > PC). > > - for instance, it is possible to expressed a dependency like: > - app/foo depends on lib/librte_foo > - and lib/librte_foo depends on app/bar > But this won't work because the directories are traversed with a > depth-first algorithm, so we have to choose between doing 'app' before > or after 'lib'. > > - the script depdirs-rule.sh is too complex. > > - we cannot use "make -d" for debug, because the output of make is used for > the generation of .depdirs. > > This patch moves the DEPDIRS-* variables in the upper Makefile, making > the dependencies much easier to calculate. A DEPDIRS variable is still > used to process library dependencies in LDLIBS. > > After this commit, "make config" is almost immediate. > > Signed-off-by: Olivier Matz Hi Olivier, It seems both have pros and cons, Your patch pros, - faster - and simpler implementation. cons, - Need to update another Makefile in another level to update dependencies of a library/driver. - Root level dependencies hardcoded to a mk level makefile. - removes depgraph target too, not sure how commonly used Original implementation pros: - self contained, it manages dependencies of library in same Makefile - no hardcoded dependencies, all resolved dynamically cons, - relatively slower, but not too bad with -j make option. - complex implementation I would prefer my version, surprisingly J, but it is good to have alternatives, and I don't have strong opinion against your patch. Thanks, ferruh