# Special script used to check that LOCAL_SHORT_COMMANDS works # correctly even when using a very large number of source files # when building a static or shared library. # # We're going to auto-generate all the files we need in a # temporary directory, because that's how we roll. # PROGDIR=$(dirname $0) PROGDIR=$(cd "$PROGDIR" && pwd) # TODO: Increment this to 1000 for long test runs. For the simple unit test # suite, keep this just over 100 # COUNT=110 # Generate all our source files NUM=0 SRCDIR=$PROGDIR/jni rm -rf "$SRCDIR" && mkdir -p "$SRCDIR" if [ $? != 0 ]; then echo "ERROR: Could not create temporary source directory: $SRCDIR" exit 1 fi CLEAN_FILES= generate_source_files () { # Generate all temporary source files we need local NUM=0 while [ $NUM -lt $COUNT ]; do SRCFILE=$SRCDIR/foo$NUM.c cat > $SRCFILE < $SRCDIR/main.c < EOF NUM=0 while [ $NUM -lt $COUNT ]; do cat >> $SRCDIR/main.c <> $SRCDIR/main.c <> $SRCDIR/main.c <> $SRCDIR/main.c < $SRCDIR/Android.mk <> $SRCDIR/Android.mk <> $SRCDIR/Android.mk <> $SRCDIR/Android.mk <> $SRCDIR/Android.mk <> $SRCDIR/Android.mk <> $SRCDIR/Android.mk <> $SRCDIR/Android.mk <