]> err.no Git - linux-2.6/commitdiff
sh: fix race in parallel out-of-tree build
authorErik Johansson <erik.johansson@motorola.com>
Thu, 12 Jul 2007 07:37:00 +0000 (16:37 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 12 Jul 2007 07:37:00 +0000 (16:37 +0900)
Depending on which of the three dependencies for archprepare (in
arch/sh/Makefile) get built first, the directory include/asm-sh may or
may not exist when the maketools target is built. If the directory does
not exist, awk will fail to generate machtypes.h. This patch fixes this
by creating the directory before awk is executed.

Signed-off-by: Erik Johansson <erik.johansson@motorola.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/tools/Makefile

index 3c370a1132913b68371ce02142e8b2355b34bb4a..567516b58acca40ff99ada5fd9bd1bd100b91496 100644 (file)
@@ -12,4 +12,5 @@
 
 include/asm-sh/machtypes.h: $(src)/gen-mach-types $(src)/mach-types
        @echo '  Generating $@'
+       $(Q)if [ ! -d include/asm-sh ]; then mkdir -p include/asm-sh; fi
        $(Q)$(AWK) -f $^ > $@ || { rm -f $@; /bin/false; }