Small size optimization from Aaron Lehmann
[oweals/busybox.git] / busybox.sh
1 #!/bin/sh
2
3 export LC_ALL=POSIX
4 export LC_CTYPE=POSIX
5
6 RAW=` \
7     gcc -E -dM ${1:-Config.h} | \
8     sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\<BB_\(.*\)\>/\1.c/gp;' \
9     | tr A-Z a-z | sort
10 `
11 test "${RAW}" != "" ||  exit
12 if [ -d "$BB_SRC_DIR" ]; then cd $BB_SRC_DIR; fi
13 # By running $RAW through "ls", we avoid listing
14 # source files that don't exist.
15 ls $RAW 2>/dev/null | tr '\n' ' '
16