summaryrefslogtreecommitdiff
path: root/scripts/gen_build_files.sh
diff options
context:
space:
mode:
authorDenys Vlasenko2010-05-10 11:00:11 +0200
committerDenys Vlasenko2010-05-10 11:00:11 +0200
commit8e3aff0ce03cbc44b2fa80fb62fa2378a5212a5a (patch)
tree844103368dc1723c860a0d11cc30b3540cea67e0 /scripts/gen_build_files.sh
parente3d90a90d43b857a5305808560d485b030a15c0a (diff)
downloadbusybox-8e3aff0ce03cbc44b2fa80fb62fa2378a5212a5a.zip
busybox-8e3aff0ce03cbc44b2fa80fb62fa2378a5212a5a.tar.gz
more randomconfig testsuite fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts/gen_build_files.sh')
-rwxr-xr-xscripts/gen_build_files.sh80
1 files changed, 40 insertions, 40 deletions
diff --git a/scripts/gen_build_files.sh b/scripts/gen_build_files.sh
index 3d75750..2baefa2 100755
--- a/scripts/gen_build_files.sh
+++ b/scripts/gen_build_files.sh
@@ -3,52 +3,52 @@
test $# -ge 2 || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; }
# cd to objtree
-cd "$2" || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; }
+cd -- "$2" || { echo "Syntax: $0 SRCTREE OBJTREE"; exit 1; }
srctree="$1"
find -type d | while read; do
- d="$REPLY"
-
- src="$srctree/$d/Kbuild.src"
- dst="$d/Kbuild"
- if test -f "$src"; then
- echo " CHK $dst"
-
- s=`sed -n 's@^//kbuild:@@p' "$srctree/$d"/*.c`
- echo "# DO NOT EDIT. This file is generated from Kbuild.src" >"$dst.$$.tmp"
- while read; do
- test x"$REPLY" = x"INSERT" && REPLY="$s"
- printf "%s\n" "$REPLY"
- done <"$src" >>"$dst.$$.tmp"
-
- if test -f "$dst" && cmp -s "$dst.$$.tmp" "$dst"; then
- rm "$dst.$$.tmp"
- else
- echo " GEN $dst"
- mv "$dst.$$.tmp" "$dst"
+ d="$REPLY"
+
+ src="$srctree/$d/Kbuild.src"
+ dst="$d/Kbuild"
+ if test -f "$src"; then
+ echo " CHK $dst"
+
+ s=`sed -n 's@^//kbuild:@@p' -- "$srctree/$d"/*.c`
+ echo "# DO NOT EDIT. This file is generated from Kbuild.src" >"$dst.$$.tmp"
+ while read; do
+ test x"$REPLY" = x"INSERT" && REPLY="$s"
+ printf "%s\n" "$REPLY"
+ done <"$src" >>"$dst.$$.tmp"
+
+ if test -f "$dst" && cmp -s "$dst.$$.tmp" "$dst"; then
+ rm -- "$dst.$$.tmp"
+ else
+ echo " GEN $dst"
+ mv -- "$dst.$$.tmp" "$dst"
+ fi
fi
- fi
-
- src="$srctree/$d/Config.src"
- dst="$d/Config.in"
- if test -f "$src"; then
- echo " CHK $dst"
-
- s=`sed -n 's@^//config:@@p' "$srctree/$d"/*.c`
- echo "# DO NOT EDIT. This file is generated from Config.src" >"$dst.$$.tmp"
- while read; do
- test x"$REPLY" = x"INSERT" && REPLY="$s"
- printf "%s\n" "$REPLY"
- done <"$src" >>"$dst.$$.tmp"
-
- if test -f "$dst" && cmp -s "$dst.$$.tmp" "$dst"; then
- rm "$dst.$$.tmp"
- else
- echo " GEN $dst"
- mv "$dst.$$.tmp" "$dst"
+
+ src="$srctree/$d/Config.src"
+ dst="$d/Config.in"
+ if test -f "$src"; then
+ echo " CHK $dst"
+
+ s=`sed -n 's@^//config:@@p' -- "$srctree/$d"/*.c`
+ echo "# DO NOT EDIT. This file is generated from Config.src" >"$dst.$$.tmp"
+ while read; do
+ test x"$REPLY" = x"INSERT" && REPLY="$s"
+ printf "%s\n" "$REPLY"
+ done <"$src" >>"$dst.$$.tmp"
+
+ if test -f "$dst" && cmp -s "$dst.$$.tmp" "$dst"; then
+ rm -- "$dst.$$.tmp"
+ else
+ echo " GEN $dst"
+ mv -- "$dst.$$.tmp" "$dst"
+ fi
fi
- fi
done