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 | a68b21a | 2001-01-26 20:31:02 +0000 | [diff] [blame] | 4 | # input $1: full path to Config.h |
| 5 | # input $2: full path to applets.h |
| 6 | # output (stdout): list of pathnames that should be linked to busybox |
| 7 | |
| 8 | # Maintainer: Larry Doolittle <ldoolitt@recycle.lbl.gov> |
| 9 | |
Eric Andersen | 868c057 | 2000-12-02 00:44:48 +0000 | [diff] [blame] | 10 | CONFIG_H=${1:-Config.h} |
| 11 | APPLETS_H=${2:-applets.h} |
| 12 | gcc -E -DMAKE_LINKS -include $CONFIG_H $APPLETS_H | |
| 13 | awk '/^[ \t]*LINK/{ |
Eric Andersen | a68b21a | 2001-01-26 20:31:02 +0000 | [diff] [blame] | 14 | dir=substr($2,8) |
Eric Andersen | 868c057 | 2000-12-02 00:44:48 +0000 | [diff] [blame] | 15 | gsub("_","/",dir) |
| 16 | if(dir=="/ROOT") dir="" |
| 17 | file=$3 |
| 18 | gsub("\"","",file) |
| 19 | if (file=="busybox") next |
| 20 | print tolower(dir) "/" file |
| 21 | }' |