Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 1 | #!/bin/sh |
Erik Andersen | fac10d7 | 2000-02-07 05:29:42 +0000 | [diff] [blame] | 2 | # Make busybox links list file. |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 3 | |
Eric Andersen | 868c057 | 2000-12-02 00:44:48 +0000 | [diff] [blame] | 4 | CONFIG_H=${1:-Config.h} |
| 5 | APPLETS_H=${2:-applets.h} |
| 6 | gcc -E -DMAKE_LINKS -include $CONFIG_H $APPLETS_H | |
| 7 | awk '/^[ \t]*LINK/{ |
| 8 | match($2,"_BB_DIR[A-Z_]*") |
| 9 | dir=substr($2,RSTART+7,RLENGTH-7) |
| 10 | gsub("_","/",dir) |
| 11 | if(dir=="/ROOT") dir="" |
| 12 | file=$3 |
| 13 | gsub("\"","",file) |
| 14 | if (file=="busybox") next |
| 15 | print tolower(dir) "/" file |
| 16 | }' |