summaryrefslogtreecommitdiff
path: root/applets/busybox.mkll
diff options
context:
space:
mode:
Diffstat (limited to 'applets/busybox.mkll')
-rwxr-xr-xapplets/busybox.mkll16
1 files changed, 7 insertions, 9 deletions
diff --git a/applets/busybox.mkll b/applets/busybox.mkll
index e43a1cc..f79462b 100755
--- a/applets/busybox.mkll
+++ b/applets/busybox.mkll
@@ -2,16 +2,14 @@
#Make busybox links list file
DF="busybox.def.h"
-MF="main.c"
+MF="busybox.c"
LIST="$(sed -n '/^#define/{s/^#define //p;}' $DF)"
- for def in ${LIST}; do
-
- set -- $(sed -n '/^#ifdef '$def'[ +| +].*/,/^#endif/{s/.*\/\///p; /^{ /{ s/^{ "//; s/",.*$//p;}; }' $MF)
- path=$1; shift
-
- for n in $@; do
- echo "$path/$n"
- done
+for def in ${LIST}; do
+ i=`sed -n 's/^#ifdef '$def'.*\/\/\(.*$\)/\/\1\//gp' $MF`
+ j=`sed -n '/^#ifdef '$def'.*/,/^#endif/{ s/.*\"\(.*\)\".*/\1/gp; }' $MF`
+ for k in $j; do
+ echo $i$k
done
+done