Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | #Make busybox links list file |
| 3 | |
| 4 | DF="busybox.def.h" |
Eric Andersen | 17d49ef | 1999-10-06 20:25:32 +0000 | [diff] [blame] | 5 | MF="busybox.c" |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 6 | |
| 7 | LIST="$(sed -n '/^#define/{s/^#define //p;}' $DF)" |
| 8 | |
Eric Andersen | 17d49ef | 1999-10-06 20:25:32 +0000 | [diff] [blame] | 9 | for def in ${LIST}; do |
Eric Andersen | c499601 | 1999-10-20 22:08:37 +0000 | [diff] [blame] | 10 | i=`sed -n 's/^#ifdef \<'$def'\>.*\/\/\(.*$\)/\/\1\//gp' $MF` |
Erik Andersen | f4acea8 | 2000-01-22 04:55:32 +0000 | [diff] [blame^] | 11 | j=`sed -n '/^#ifdef \<'$def'\>.*/,/^#endif/{ s/.*\"\(.*\)\".*/\1/gp; }' $MF` |
Eric Andersen | 17d49ef | 1999-10-06 20:25:32 +0000 | [diff] [blame] | 12 | for k in $j; do |
| 13 | echo $i$k |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 14 | done |
Eric Andersen | 17d49ef | 1999-10-06 20:25:32 +0000 | [diff] [blame] | 15 | done |