Skip to content

Commit

Permalink
sh: fix race in parallel out-of-tree build
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Erik Johansson authored and Paul Mundt committed Jul 12, 2007
1 parent 0caf3ea commit 8cb661d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/sh/tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

0 comments on commit 8cb661d

Please sign in to comment.