view sources/sections/toybox.build @ 1014:75054b02f21d

When USE_TOYBOX=1, don't try to truncate and append to a file that's in use. (Bug spotted by David Seikel.)
author Rob Landley <rob@landley.net>
date Sat, 27 Mar 2010 20:26:58 -0500
parents de53ddd05abd
children e021bba5e22e
line wrap: on
line source

# Build toybox

yes "" | make defconfig &&
CFLAGS="$CFLAGS $STATIC_DEFAULT_FLAGS" make $DO_CROSS || dienow

if [ -z "$USE_TOYBOX" ]
then
  ln -sf toybox "$STAGE_DIR"/patch &&
  ln -sf toybox "$STAGE_DIR"/oneit &&
  ln -sf toybox "$STAGE_DIR"/netcat || dienow
else
  make install_flat PREFIX="$STAGE_DIR" || dienow
fi

mv toybox${SKIP_STRIP:+_unstripped} "$STAGE_DIR/toybox"