diff options
author | Rob Landley <rob@landley.net> | 2008-01-19 17:43:27 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2008-01-19 17:43:27 -0600 |
commit | 55928b1e0a08d84a5cbc50020f0a8c1024f5b6ce (patch) | |
tree | 22a4175b86fc92f3ac5745f658dcb4f4f339fcec /scripts/make.sh | |
parent | 2896480c4918f2accccb8301bec457a7bff7377e (diff) | |
download | toybox-55928b1e0a08d84a5cbc50020f0a8c1024f5b6ce.tar.gz |
Move NEWTOY() list from end of toylist.h to generated/newtoys.h.
Diffstat (limited to 'scripts/make.sh')
-rwxr-xr-x | scripts/make.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/make.sh b/scripts/make.sh index 6cdd01a8..b5300d38 100755 --- a/scripts/make.sh +++ b/scripts/make.sh @@ -7,6 +7,21 @@ source ./configure echo "Extract configuration information from toys/*.c files." scripts/genconfig.sh +# Create a list of all the applets toybox can provide. Note that the first +# entry is out of order on purpose (the toybox multiplexer applet must be the +# first element of the array). The rest must be sorted in alphabetical order +# for fast binary search. + +function newtoys() +{ + for i in toys/*.c + do + sed -n -e '1,/^config [A-Z]/s/^USE_/&/p' $i || exit 1 + done +} +echo "NEWTOY(toybox, NULL, 0)" > generated/newtoys.h +newtoys | sort >> generated/newtoys.h + # Only recreate generated/help.h if python is installed if [ ! -z "$(which python)" ] && [ ! -z "$(grep 'CONFIG_HELP=y' .config)" ] then |