Eric Andersen | b09c6b5 | 1999-10-06 05:21:54 +0000 | [diff] [blame] | 1 | #!/bin/sh |
Erik Andersen | 6273f65 | 2000-03-17 01:12:41 +0000 | [diff] [blame] | 2 | |
Eric Andersen | 39eea89 | 2001-03-08 21:42:11 +0000 | [diff] [blame] | 3 | export LC_ALL=POSIX |
| 4 | export LC_CTYPE=POSIX |
| 5 | |
Eric Andersen | e2f6e12 | 2000-12-01 19:55:04 +0000 | [diff] [blame] | 6 | RAW=` \ |
| 7 | gcc -E -dM ${1:-Config.h} | \ |
Erik Andersen | 6273f65 | 2000-03-17 01:12:41 +0000 | [diff] [blame] | 8 | sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\<BB_\(.*\)\>/\1.c/gp;' \ |
Matt Kraai | e9e182e | 2000-12-26 16:36:10 +0000 | [diff] [blame] | 9 | | tr A-Z a-z | sort |
Eric Andersen | e2f6e12 | 2000-12-01 19:55:04 +0000 | [diff] [blame] | 10 | ` |
Eric Andersen | a2d61e7 | 2000-12-12 16:55:56 +0000 | [diff] [blame] | 11 | test "${RAW}" != "" || exit |
Eric Andersen | b9f5b82 | 2001-05-01 16:24:32 +0000 | [diff] [blame] | 12 | if [ -d "$BB_SRC_DIR" ]; then cd $BB_SRC_DIR; fi |
Eric Andersen | 19f8620 | 2001-02-17 00:42:47 +0000 | [diff] [blame] | 13 | # By running $RAW through "ls", we avoid listing |
| 14 | # source files that don't exist. |
| 15 | ls $RAW 2>/dev/null | tr '\n' ' ' |
Erik Andersen | 6273f65 | 2000-03-17 01:12:41 +0000 | [diff] [blame] | 16 | |