view sources/sections/busybox.build @ 1197:8b1017be9de8

is_in_list doesn't like "[" and "[[", thinks it's an unterminated regex.
author Rob Landley <rob@landley.net>
date Sun, 08 Aug 2010 20:57:58 -0500
parents 41fdac77a907
children 313c702a0984
line wrap: on
line source

# Build busybox statically by default, but don't statically link against
# glibc (during host_tools) build because glibc is buggy and can't combine
# --static with --gc-sections.

# Build busybox

#make allyesconfig KCONFIG_ALLCONFIG="${SOURCES}/trimconfig-busybox" &&
make defconfig &&
cp .config "$WORK"/config-busybox &&
LDFLAGS="$LDFLAGS $STATIC_FLAGS" make -j $CPUS $VERBOSITY $DO_CROSS &&
make busybox.links || dienow

[ -d "$STAGE_DIR/bin" ] && INSTDIR="$STAGE_DIR/bin" || INSTDIR="$STAGE_DIR"

cp busybox${SKIP_STRIP:+_unstripped} "$INSTDIR/busybox" || dienow

for i in $(sed 's@.*/@@' busybox.links)
do
  # is_in_list can't handle [ and [[ filenames, they're an unterminated regex.
  [ "$i" != "[" ] && [ "$i" != "[[" ] &&
  # Still using toybox patch, and busybox mke2fs/tune2fs don't support -j
  is_in_list $i patch,tune2fs,mke2fs && continue
  [ ! -f "$INSTDIR/$i" ] && (ln -sf busybox "$INSTDIR/$i" || dienow)
done