diff options
author | Rob Landley <rob@landley.net> | 2006-08-05 00:41:39 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-08-05 00:41:39 +0000 |
commit | affb7a61a6576194b5c87635ad87d3b3b9e6575b (patch) | |
tree | 6d6c9b3d87542a474ea00a8cd06a20704d69c817 /scripts | |
parent | 59fe8b90890a07c87ec9c2943bae515d5c6d959d (diff) | |
download | busybox-w32-affb7a61a6576194b5c87635ad87d3b3b9e6575b.tar.gz busybox-w32-affb7a61a6576194b5c87635ad87d3b3b9e6575b.tar.bz2 busybox-w32-affb7a61a6576194b5c87635ad87d3b3b9e6575b.zip |
scripts/individual now builds 171 applets. Some of them may even work. :)
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/individual | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/scripts/individual b/scripts/individual index a4e433ca8..8815e1e14 100755 --- a/scripts/individual +++ b/scripts/individual | |||
@@ -12,21 +12,47 @@ cd libbb | |||
12 | make | 12 | make |
13 | cd .. | 13 | cd .. |
14 | 14 | ||
15 | cd archival/libunarchive | ||
16 | make | ||
17 | cd ../.. | ||
18 | |||
19 | # 146 applets build without any extra stuff. The applet is one C file with | ||
20 | # the same name as the corresponding applet, and all it needs to link against | ||
21 | # is libbb.a. However, 104 of them need more than that. | ||
22 | |||
23 | # dpkg_deb gzip | ||
24 | function extra_libraries() | ||
25 | { | ||
26 | archival="ar bunzip2 unlzma cpio dpkg gunzip rpm2cpio rpm tar uncompress unzip dpkg_deb gzip " | ||
27 | if [ "${archival/$1 //}" != "${archival}" ] | ||
28 | then | ||
29 | echo "archival/libunarchive/libunarchive.a" | ||
30 | fi | ||
31 | } | ||
32 | |||
33 | |||
34 | |||
15 | # Here are a few that build in a standard way. Others are easy to get to | 35 | # Here are a few that build in a standard way. Others are easy to get to |
16 | # build, for example miscutils/dc needs -lm and most of loginutils/* needs | 36 | # build, for example miscutils/dc needs -lm and most of loginutils/* needs |
17 | # -lcrypt... | 37 | # -lcrypt... |
18 | 38 | ||
19 | rm -rf build | 39 | rm -rf build |
20 | mkdir build | 40 | mkdir build |
41 | |||
21 | for APPLET in `sed 's .*/ ' busybox.links` | 42 | for APPLET in `sed 's .*/ ' busybox.links` |
22 | do | 43 | do |
23 | j=`find . -name "$APPLET.c"` | 44 | APPFILT=${APPLET/-/_} |
45 | j=`find . -name "${APPLET/-/?}.c"` # Because ether-wake.c is broken. | ||
24 | if [ -z "$j" ] | 46 | if [ -z "$j" ] |
25 | then | 47 | then |
26 | echo no file for $APPLET | 48 | echo no file for $APPLET |
27 | else | 49 | else |
28 | echo "Building $APPLET..." | 50 | echo "Building $APPLET..." |
29 | gcc -Os -o build/$APPLET applets/individual.c $j libbb/libbb.a -Iinclude -DAPPLET_main=${APPLET}_main -DAPPLET_full_usage=${APPLET}_full_usage | 51 | gcc -Os -o build/$APPLET applets/individual.c $j \ |
52 | `extra_libraries $APPFILT` libbb/libbb.a -Iinclude \ | ||
53 | -DBUILD_INDIVIDUAL \ | ||
54 | "-Drun_applet_by_name(...)" "-Dfind_applet_by_name(...) 0" \ | ||
55 | -DAPPLET_main=${APPFILT}_main -DAPPLET_full_usage=${APPFILT}_full_usage | ||
30 | if [ $? -ne 0 ]; | 56 | if [ $? -ne 0 ]; |
31 | then | 57 | then |
32 | echo "Failed." | 58 | echo "Failed." |