From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnout Vandecappelle Date: Tue, 14 Apr 2015 13:22:09 +0200 Subject: [Buildroot] [PATCHv2 08/21] Makefile: use the package infra based external-deps In-Reply-To: <20150414095202.7850ba00@free-electrons.com> References: <1428856685-4403-1-git-send-email-thomas.petazzoni@free-electrons.com> <1428856685-4403-9-git-send-email-thomas.petazzoni@free-electrons.com> <552C5ADB.6020509@mind.be> <20150414095202.7850ba00@free-electrons.com> Message-ID: <552CF861.50004@mind.be> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net On 14/04/15 09:52, Thomas Petazzoni wrote: > Dear Arnout Vandecappelle, > > On Tue, 14 Apr 2015 02:10:03 +0200, Arnout Vandecappelle wrote: > >>> +_external-deps: $(foreach p,$(PACKAGES),$(p)-all-external-deps) >>> external-deps: >>> - @$(MAKE1) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source | sort -u >>> + @$(MAKE1) -Bs $(EXTRAMAKEARGS) _external-deps | sort -u >> >> If we also remove the sort -u (which removes duplicates, but there should be no >> duplicates to begin with), then there's no need for a recursive make and we >> avoid the GEN /home/ymorin/dev/buildroot/O/./Makefile that Yann ran into >> (which BTW was not caused by this patch but already existed before). > > Unless I missed something there will definitely be duplicates, if two > packages depend on the same dependency, this dependency will be listed > twice. I just did a "make randpackageconfig", followed by "make > _external-deps | sort", and here is what I get: > > am335x-pru-package-506e074859891a2b350eb4f5fcb451c4961410ea.tar.gz > am335x-pru-package-506e074859891a2b350eb4f5fcb451c4961410ea.tar.gz [snip] Ah yes, silly me. I just _assumed_ that external deps would have been implemented like: $(1)-external-deps: $$(foreach p,$$($(2)_FINAL_DEPENDENCIES),$$(p)-external-deps) instead of passing through -all-external-deps. I just tested that the above gives exactly the same result as the -all-external-deps version. The other reason why there are duplicates is because host packages and target packages (usually) have the same sources, so they will be listed twice. That's more difficult to get around. Regards, Arnout -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F