From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 24 Jan 2017 05:05:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,278,1477983600"; d="scan'208";a="34739484" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.38]) ([10.237.220.38]) by orsmga002.jf.intel.com with ESMTP; 24 Jan 2017 05:05:08 -0800 To: Olivier Matz , dev@dpdk.org References: <20170123181813.00567e47@platinum> <1485191953-2613-1-git-send-email-olivier.matz@6wind.com> Cc: thomas.monjalon@6wind.com From: Ferruh Yigit Message-ID: <8d40ce22-7be2-e8e4-6d9a-a8e43f0b1dd2@intel.com> Date: Tue, 24 Jan 2017 13:05:08 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1485191953-2613-1-git-send-email-olivier.matz@6wind.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] mk: optimize directory dependencies X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jan 2017 13:05:11 -0000 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