summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Hobi <daniel.hobi@schmid-telecom.ch>2010-01-18 18:13:39 +0100
committerWolfgang Denk <wd@denx.de>2010-01-18 22:25:16 +0100
commit2a9987935e3cdb61e7550c87cbc9f500a54f672d (patch)
treec9ab6537d94eb5a3eebca80c9435e9b558e55250 /Makefile
parent88ffb2665cd066b6b20cfaade13929d4e8428dde (diff)
downloadu-boot-imx-2a9987935e3cdb61e7550c87cbc9f500a54f672d.zip
u-boot-imx-2a9987935e3cdb61e7550c87cbc9f500a54f672d.tar.gz
u-boot-imx-2a9987935e3cdb61e7550c87cbc9f500a54f672d.tar.bz2
Makefile: fix parallel build
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. A typical error message is: .depend:39: *** multiple target patterns. Stop. This patch serializes the creation of .depend in cpu/$(CPU) and $(dir $(LDSCRIPT)) by adding these directories to the depend target in the top Makefile. Other directories in $(LIBS) are not affected since they contain only one Make target and thus only one sub-make is spawned per directory. Signed-off-by: Daniel Hobi <daniel.hobi@schmid-telecom.ch> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 793fcec..1ab197b 100644
--- a/Makefile
+++ b/Makefile
@@ -398,8 +398,11 @@ updater:
env:
$(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1
+# Explicitly make _depend in subdirs containing multiple targets to prevent
+# parallel sub-makes creating .depend files simultaneously.
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
TAG_SUBDIRS = $(SUBDIRS)
TAG_SUBDIRS += $(dir $(__LIBS))