summaryrefslogtreecommitdiff
path: root/scripts/gen_build_files.sh
diff options
context:
space:
mode:
authorDenys Vlasenko2010-07-25 00:13:27 +0200
committerDenys Vlasenko2010-07-25 00:13:27 +0200
commit503a07cab24a1e58099a04970babd2b761469449 (patch)
treef96b01fd405adcbcbeed0086389da27bd1a07ccc /scripts/gen_build_files.sh
parentb2d95147c989448f23cc59c63b83e2d89f0bd9cd (diff)
downloadbusybox-503a07cab24a1e58099a04970babd2b761469449.zip
busybox-503a07cab24a1e58099a04970babd2b761469449.tar.gz
Apply post-1.17.0 fixes
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 a98f509..18c172d 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,11 +48,13 @@ 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"
if test -f "$src"; then
+ mkdir -p -- "$d" 2>/dev/null
#echo " CHK $dst"
s=`sed -n 's@^//kbuild:@@p' -- "$srctree/$d"/*.c`
@@ -70,6 +74,7 @@ find -type d | while read -r d; do
src="$srctree/$d/Config.src"
dst="$d/Config.in"
if test -f "$src"; then
+ mkdir -p -- "$d" 2>/dev/null
#echo " CHK $dst"
s=`sed -n 's@^//config:@@p' -- "$srctree/$d"/*.c`