aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_build_files.sh
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-07-09 01:25:36 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-07-09 01:25:36 +0200
commit1883cb174619cfc90ca86da08598f470d3a11315 (patch)
treea1e849d0cf637894d166e66b4885d708713ba075 /scripts/gen_build_files.sh
parent1f0ab1dc6427e9340f50551d9e4f2212d03ec845 (diff)
downloadbusybox-1883cb174619cfc90ca86da08598f470d3a11315.tar.gz
fix make O=dir build
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts/gen_build_files.sh')
-rwxr-xr-xscripts/gen_build_files.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/gen_build_files.sh b/scripts/gen_build_files.sh
index a98f509ce..968158758 100755
--- a/scripts/gen_build_files.sh
+++ b/scripts/gen_build_files.sh
@@ -4,6 +4,8 @@ test $# -ge 2 || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; }
# cd to objtree
cd -- "$2" || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; }
+# In separate objtree build, include/ might not exist yet
+mkdir include 2>/dev/null
srctree="$1"
@@ -46,10 +48,12 @@ if test x"$new" != x"$old"; then
fi
# (Re)generate */Kbuild and */Config.in
-find -type d | while read -r d; do
+{ cd -- "$srctree" && find -type d; } | while read -r d; do
d="${d#./}"
+
src="$srctree/$d/Kbuild.src"
dst="$d/Kbuild"
+ mkdir -p -- "$d" 2>/dev/null
if test -f "$src"; then
#echo " CHK $dst"
@@ -69,6 +73,7 @@ find -type d | while read -r d; do
src="$srctree/$d/Config.src"
dst="$d/Config.in"
+ mkdir -p -- "$d" 2>/dev/null
if test -f "$src"; then
#echo " CHK $dst"