aboutsummaryrefslogtreecommitdiff
path: root/scripts/make.sh
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-08-30 04:42:49 -0500
committerRob Landley <rob@landley.net>2015-08-30 04:42:49 -0500
commit6fde0f9be2c78d336b2bbcb4c1488bd171c8bccd (patch)
treef50328e23aac5f631d0e0c9fc636babcf912ccec /scripts/make.sh
parent8c588d822a4771420fa32571693f728e809bb2f2 (diff)
downloadtoybox-6fde0f9be2c78d336b2bbcb4c1488bd171c8bccd.tar.gz
Build updates: make change should use top level .config for global settings,
add NOSTRIP variable to force skipping strip, and save intermediate flag data in generated/flags.raw and have mkflags.c error message point to that.
Diffstat (limited to 'scripts/make.sh')
-rwxr-xr-xscripts/make.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/make.sh b/scripts/make.sh
index 7ebe148d..f6e0c6d5 100755
--- a/scripts/make.sh
+++ b/scripts/make.sh
@@ -177,7 +177,7 @@ do
# If no pair (because command's disabled in config), use " " for flags
# so allflags can define the appropriate zero macros.
-done | sort -s | sed -n 's/ A / /;t pair;h;s/\([^ ]*\).*/\1 " "/;x;b single;:pair;h;n;:single;s/[^ ]* B //;H;g;s/\n/ /;p' |\
+done | sort -s | sed -n 's/ A / /;t pair;h;s/\([^ ]*\).*/\1 " "/;x;b single;:pair;h;n;:single;s/[^ ]* B //;H;g;s/\n/ /;p' | tee generated/flags.raw | \
generated/mkflags > generated/flags.h || exit 1
# Extract global structure definitions and flag definitions from toys/*/*.c
@@ -271,12 +271,13 @@ done
[ $DONE -ne 0 ] && exit 1
do_loudly $BUILD $LFILES $LINK || exit 1
-if ! do_loudly ${CROSS_COMPILE}strip toybox_unstripped -o toybox
+if [ ! -z "$NOSTRIP" ] || ! do_loudly ${CROSS_COMPILE}strip toybox_unstripped -o toybox
then
echo "strip failed, using unstripped" && cp toybox_unstripped toybox ||
exit 1
+else
+ # gcc 4.4's strip command is buggy, and doesn't set the executable bit on
+ # its output the way SUSv4 suggests it do so.
+ do_loudly chmod +x toybox || exit 1
fi
-# gcc 4.4's strip command is buggy, and doesn't set the executable bit on
-# its output the way SUSv4 suggests it do so.
-do_loudly chmod +x toybox || exit 1
echo