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 | 39eea89 | 2001-03-08 21:42:11 +0000 | [diff] [blame] | 10 | export LC_ALL=POSIX |
| 11 | export LC_CTYPE=POSIX |
| 12 | |
Bernhard Reutner-Fischer | 193bcf3 | 2006-11-17 13:17:04 +0000 | [diff] [blame] | 13 | CONFIG_H=${1:-include/autoconf.h} |
Eric Andersen | 3cd2760 | 2001-10-24 07:58:02 +0000 | [diff] [blame] | 14 | APPLETS_H=${2:-include/applets.h} |
Bernhard Reutner-Fischer | f00680e | 2005-12-29 16:53:47 +0000 | [diff] [blame] | 15 | $HOSTCC -E -DMAKE_LINKS -include $CONFIG_H $APPLETS_H | |
Eric Andersen | 868c057 | 2000-12-02 00:44:48 +0000 | [diff] [blame] | 16 | awk '/^[ \t]*LINK/{ |
Bernd Jendrissek | 55988ae | 2011-02-20 05:50:04 +0100 | [diff] [blame] | 17 | dir=substr($2,7) |
Eric Andersen | 868c057 | 2000-12-02 00:44:48 +0000 | [diff] [blame] | 18 | gsub("_","/",dir) |
| 19 | if(dir=="/ROOT") dir="" |
| 20 | file=$3 |
| 21 | gsub("\"","",file) |
| 22 | if (file=="busybox") next |
| 23 | print tolower(dir) "/" file |
| 24 | }' |