Mercurial > hg > toybox
comparison scripts/make.sh @ 1172:db517206d752 draft
Cosmetic tweak.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 28 Dec 2013 17:06:55 -0600 |
parents | 2213cedd15b4 |
children | 260cce6c3e35 |
comparison
equal
deleted
inserted
replaced
1171:a7df29f72bc6 | 1172:db517206d752 |
---|---|
48 # Create a list of all the commands toybox can provide. Note that the first | 48 # Create a list of all the commands toybox can provide. Note that the first |
49 # entry is out of order on purpose (the toybox multiplexer command must be the | 49 # entry is out of order on purpose (the toybox multiplexer command must be the |
50 # first element of the array). The rest must be sorted in alphabetical order | 50 # first element of the array). The rest must be sorted in alphabetical order |
51 # for fast binary search. | 51 # for fast binary search. |
52 | 52 |
53 echo "generated/newtoys.h" | 53 echo -n "generated/newtoys.h " |
54 | 54 |
55 echo "USE_TOYBOX(NEWTOY(toybox, NULL, TOYFLAG_STAYROOT))" > generated/newtoys.h | 55 echo "USE_TOYBOX(NEWTOY(toybox, NULL, TOYFLAG_STAYROOT))" > generated/newtoys.h |
56 sed -n -e 's/^USE_[A-Z0-9_]*(/&/p' toys/*/*.c \ | 56 sed -n -e 's/^USE_[A-Z0-9_]*(/&/p' toys/*/*.c \ |
57 | sed 's/\(.*TOY(\)\([^,]*\),\(.*\)/\2 \1\2,\3/' | sort -k 1,1 \ | 57 | sed 's/\(.*TOY(\)\([^,]*\),\(.*\)/\2 \1\2,\3/' | sort -k 1,1 \ |
58 | sed 's/[^ ]* //' >> generated/newtoys.h | 58 | sed 's/[^ ]* //' >> generated/newtoys.h |
62 if [ ! -e generated/mkflags ] | 62 if [ ! -e generated/mkflags ] |
63 then | 63 then |
64 $HOSTCC scripts/mkflags.c -o generated/mkflags || exit 1 | 64 $HOSTCC scripts/mkflags.c -o generated/mkflags || exit 1 |
65 fi | 65 fi |
66 | 66 |
67 echo generated/flags.h | 67 echo -n "generated/flags.h " |
68 | 68 |
69 # Parse files through C preprocessor twice, once to get flags for current | 69 # Parse files through C preprocessor twice, once to get flags for current |
70 # .config and once to get flags for allyesconfig | 70 # .config and once to get flags for allyesconfig |
71 for I in A B | 71 for I in A B |
72 do | 72 do |
111 | 111 |
112 [ ! -z "$DATA" ] && echo -e "// $i\n\n$DATA\n" | 112 [ ! -z "$DATA" ] && echo -e "// $i\n\n$DATA\n" |
113 done | 113 done |
114 } | 114 } |
115 | 115 |
116 echo "generated/globals.h" | 116 echo -n "generated/globals.h " |
117 | 117 |
118 GLOBSTRUCT="$(getglobals)" | 118 GLOBSTRUCT="$(getglobals)" |
119 ( | 119 ( |
120 echo "$GLOBSTRUCT" | 120 echo "$GLOBSTRUCT" |
121 echo | 121 echo |