Mercurial > hg > toybox
comparison scripts/make.sh @ 234:163498bf547b
Move NEWTOY() list from end of toylist.h to generated/newtoys.h.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 19 Jan 2008 17:43:27 -0600 |
parents | d4176f3f3835 |
children | 7cb15eae1664 |
comparison
equal
deleted
inserted
replaced
233:d4176f3f3835 | 234:163498bf547b |
---|---|
4 | 4 |
5 source ./configure | 5 source ./configure |
6 | 6 |
7 echo "Extract configuration information from toys/*.c files." | 7 echo "Extract configuration information from toys/*.c files." |
8 scripts/genconfig.sh | 8 scripts/genconfig.sh |
9 | |
10 # Create a list of all the applets toybox can provide. Note that the first | |
11 # entry is out of order on purpose (the toybox multiplexer applet must be the | |
12 # first element of the array). The rest must be sorted in alphabetical order | |
13 # for fast binary search. | |
14 | |
15 function newtoys() | |
16 { | |
17 for i in toys/*.c | |
18 do | |
19 sed -n -e '1,/^config [A-Z]/s/^USE_/&/p' $i || exit 1 | |
20 done | |
21 } | |
22 echo "NEWTOY(toybox, NULL, 0)" > generated/newtoys.h | |
23 newtoys | sort >> generated/newtoys.h | |
9 | 24 |
10 # Only recreate generated/help.h if python is installed | 25 # Only recreate generated/help.h if python is installed |
11 if [ ! -z "$(which python)" ] && [ ! -z "$(grep 'CONFIG_HELP=y' .config)" ] | 26 if [ ! -z "$(which python)" ] && [ ! -z "$(grep 'CONFIG_HELP=y' .config)" ] |
12 then | 27 then |
13 echo "Extract help text from Config.in." | 28 echo "Extract help text from Config.in." |