From: Erik Johansson Date: Thu, 12 Jul 2007 07:37:00 +0000 (+0900) Subject: sh: fix race in parallel out-of-tree build X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8cb661d6a4b69734c393beeb523cbf86c915f374;p=linux-beck.git sh: fix race in parallel out-of-tree build 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 Signed-off-by: Paul Mundt --- diff --git a/arch/sh/tools/Makefile b/arch/sh/tools/Makefile index 3c370a113291..567516b58acc 100644 --- a/arch/sh/tools/Makefile +++ b/arch/sh/tools/Makefile @@ -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; }