File: busybox.mkll

package info (click to toggle)
pgi 0.9.6.3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,792 kB
  • ctags: 801
  • sloc: sh: 4,540; python: 3,069; xml: 1,895; makefile: 1,727; perl: 1,080; ansic: 647; lisp: 151
file content (31 lines) | stat: -rwxr-xr-x 857 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
# Make busybox links list file.

# $Progeny: busybox.mkll,v 1.3 2002/01/18 06:19:49 dsp Exp $
# Grrr, this is part of busybox but it is not extensible.  I need the
# Config.h pre-processed differently for the live and initrd builds,
# so make this script pass the rest of its arguments along to the
# pre-processor.

# input $1: full path to Config.h
# input $2: full path to applets.h
# output (stdout): list of pathnames that should be linked to busybox

# Maintainer: Larry Doolittle <ldoolitt@recycle.lbl.gov>

export LC_ALL=POSIX
export LC_CTYPE=POSIX

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