From: Wolfgang Denk Date: Thu, 17 Dec 2009 23:41:51 +0100 Subject: [U-Boot] [PATCH v2] Makefile: fix parallel build In-Reply-To: <1260885106-3494-1-git-send-email-daniel.hobi@schmid-telecom.ch> References: <200912150425.49725.vapier@gentoo.org> <1260885106-3494-1-git-send-email-daniel.hobi@schmid-telecom.ch> Message-ID: <20091217224151.ABB66D43F21@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Daniel Hobi, In message <1260885106-3494-1-git-send-email-daniel.hobi@schmid-telecom.ch> you wrote: > During parallel build, the top Makefile spawns multiple sub-makes for > targets in cpu/$(CPU) and $(dir $(LDSCRIPT)). If the .depend files are > not present in these directories, the sub-makes may end up generating > these files simultaneously which leads to corrupted content. ... > diff --git a/Makefile b/Makefile > index 19b5ac0..e9be7a5 100644 > --- a/Makefile > +++ b/Makefile > @@ -400,7 +400,8 @@ env: > $(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1 > > depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk > - for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir _depend ; done > + for dir in $(SUBDIRS) cpu/$(CPU) $(dir $(LDSCRIPT)) ; do \ > + $(MAKE) -C $$dir _depend ; done I ageree with Mike: please add a comment here. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The important thing about being a leader is not being right or wrong, but being *certain*. - Terry Pratchett, _Truckers_