summaryrefslogtreecommitdiffhomepage
path: root/busybox.mkll
blob: 12fa06f40c76785fa18f73a944d0ef535d1a53c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# Make busybox links list file.

CONFIG_H=${1:-Config.h}
APPLETS_H=${2:-applets.h}
gcc -E -DMAKE_LINKS -include $CONFIG_H $APPLETS_H |
  awk '/^[ \t]*LINK/{
	match($2,"_BB_DIR[A-Z_]*")
	dir=substr($2,RSTART+7,RLENGTH-7)
	gsub("_","/",dir)
	if(dir=="/ROOT") dir=""
	file=$3
	gsub("\"","",file)
	if (file=="busybox") next
	print tolower(dir) "/" file
  }'