diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-12-02 00:44:48 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-12-02 00:44:48 +0000 |
commit | 868c057d253c9f96b9646ef49f2f06e9c20181df (patch) | |
tree | 77ebde3b4f2581a272e235090349f380bd07d357 | |
parent | e73fda83111ce7f043be3028b440e8ba96cbf639 (diff) | |
download | busybox-w32-868c057d253c9f96b9646ef49f2f06e9c20181df.tar.gz busybox-w32-868c057d253c9f96b9646ef49f2f06e9c20181df.tar.bz2 busybox-w32-868c057d253c9f96b9646ef49f2f06e9c20181df.zip |
Patch from Larry Doolittle so it will build the newdocs right.
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | applets.h | 15 | ||||
-rwxr-xr-x | applets/busybox.mkll | 33 | ||||
-rwxr-xr-x | busybox.mkll | 33 | ||||
-rw-r--r-- | include/applets.h | 15 |
5 files changed, 49 insertions, 57 deletions
@@ -184,19 +184,19 @@ docs/busybox.txt: docs/busybox.sgml | |||
184 | @echo BusyBox Documentation | 184 | @echo BusyBox Documentation |
185 | @echo | 185 | @echo |
186 | - mkdir -p docs | 186 | - mkdir -p docs |
187 | (cd docs; sgmltools -b txt $(BB_SRC_DIR)/busybox.sgml) | 187 | (cd docs; sgmltools -b txt busybox.sgml) |
188 | 188 | ||
189 | docs/busybox.dvi: docs/busybox.sgml | 189 | docs/busybox.dvi: docs/busybox.sgml |
190 | - mkdir -p docs | 190 | - mkdir -p docs |
191 | (cd docs; sgmltools -b dvi $(BB_SRC_DIR)/busybox.sgml) | 191 | (cd docs; sgmltools -b dvi busybox.sgml) |
192 | 192 | ||
193 | docs/busybox.ps: docs/busybox.sgml | 193 | docs/busybox.ps: docs/busybox.sgml |
194 | - mkdir -p docs | 194 | - mkdir -p docs |
195 | (cd docs; sgmltools -b ps $(BB_SRC_DIR)/busybox.sgml) | 195 | (cd docs; sgmltools -b ps busybox.sgml) |
196 | 196 | ||
197 | docs/busybox.pdf: docs/busybox.ps | 197 | docs/busybox.pdf: docs/busybox.ps |
198 | - mkdir -p docs | 198 | - mkdir -p docs |
199 | (cd docs; ps2pdf $(BB_SRC_DIR)/busybox.ps) | 199 | (cd docs; ps2pdf busybox.ps) |
200 | 200 | ||
201 | docs/busybox/busyboxdocumentation.html: docs/busybox.sgml | 201 | docs/busybox/busyboxdocumentation.html: docs/busybox.sgml |
202 | - mkdir -p docs | 202 | - mkdir -p docs |
@@ -209,7 +209,7 @@ busybox: $(OBJECTS) | |||
209 | $(STRIP) | 209 | $(STRIP) |
210 | 210 | ||
211 | busybox.links: Config.h | 211 | busybox.links: Config.h |
212 | -$(BB_SRC_DIR)/busybox.mkll $(BB_SRC_DIR)/applets.h | sort >$@ | 212 | - $(BB_SRC_DIR)/busybox.mkll $(CONFIG_H) $(BB_SRC_DIR)/applets.h >$@ |
213 | 213 | ||
214 | nfsmount.o cmdedit.o: %.o: %.h | 214 | nfsmount.o cmdedit.o: %.o: %.h |
215 | $(OBJECTS): %.o: %.c Config.h busybox.h Makefile | 215 | $(OBJECTS): %.o: %.c Config.h busybox.h Makefile |
@@ -10,16 +10,19 @@ | |||
10 | * file result in the listing remaining in ascii order. You have been warned. | 10 | * file result in the listing remaining in ascii order. You have been warned. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef PROTOTYPES | 13 | #if defined(PROTOTYPES) |
14 | const struct BB_applet applets[] = { | ||
15 | #define APPLET(a,b,c,d) {a,b,c,d}, | ||
16 | #define APPLET_NOUSAGE(a,b,c) {a,b,c,NULL}, | ||
17 | #else | ||
18 | #define APPLET(a,b,c,d) \ | 14 | #define APPLET(a,b,c,d) \ |
19 | extern int b(int argc, char **argv); \ | 15 | extern int b(int argc, char **argv); \ |
20 | extern const char d[]; | 16 | extern const char d[]; |
21 | #define APPLET_NOUSAGE(a,b,c) \ | 17 | #define APPLET_NOUSAGE(a,b,c) \ |
22 | extern int b(int argc, char **argv); | 18 | extern int b(int argc, char **argv); |
19 | #elif defined(MAKE_LINKS) | ||
20 | #define APPLET(a,b,c,d) LINK c a | ||
21 | #define APPLET_NOUSAGE(a,b,c) LINK c a | ||
22 | #else | ||
23 | const struct BB_applet applets[] = { | ||
24 | #define APPLET(a,b,c,d) {a,b,c,d}, | ||
25 | #define APPLET_NOUSAGE(a,b,c) {a,b,c,NULL}, | ||
23 | #endif | 26 | #endif |
24 | 27 | ||
25 | #ifdef BB_TEST | 28 | #ifdef BB_TEST |
@@ -378,7 +381,7 @@ const struct BB_applet applets[] = { | |||
378 | APPLET("zcat", gunzip_main, _BB_DIR_BIN, gunzip_usage) | 381 | APPLET("zcat", gunzip_main, _BB_DIR_BIN, gunzip_usage) |
379 | #endif | 382 | #endif |
380 | 383 | ||
381 | #ifndef PROTOTYPES | 384 | #if !defined(PROTOTYPES) && !defined(MAKE_LINKS) |
382 | { 0,NULL,0,NULL} | 385 | { 0,NULL,0,NULL} |
383 | }; | 386 | }; |
384 | 387 | ||
diff --git a/applets/busybox.mkll b/applets/busybox.mkll index 922dcdd81..12fa06f40 100755 --- a/applets/busybox.mkll +++ b/applets/busybox.mkll | |||
@@ -1,23 +1,16 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # Make busybox links list file. | 2 | # Make busybox links list file. |
3 | 3 | ||
4 | DF="Config.h" | 4 | CONFIG_H=${1:-Config.h} |
5 | 5 | APPLETS_H=${2:-applets.h} | |
6 | MF=$1 | 6 | gcc -E -DMAKE_LINKS -include $CONFIG_H $APPLETS_H | |
7 | if [ "$MF" = "" ]; then | 7 | awk '/^[ \t]*LINK/{ |
8 | MF="applets.h" | 8 | match($2,"_BB_DIR[A-Z_]*") |
9 | fi | 9 | dir=substr($2,RSTART+7,RLENGTH-7) |
10 | 10 | gsub("_","/",dir) | |
11 | LIST="$(gcc -E -dM $DF | sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\<BB_\(.*\)\>/BB_\1/gp;' | sort)" | 11 | if(dir=="/ROOT") dir="" |
12 | 12 | file=$3 | |
13 | for def in ${LIST}; do | 13 | gsub("\"","",file) |
14 | i=`sed -n '/^#ifdef \<'$def'\>.*/,/^#endif/{ s/.*\"\(.*\)\".*\(_BB_DIR_[A-Z_]*\).*$/\2\/\1/gp; }' $MF` | 14 | if (file=="busybox") next |
15 | for j in $i; do | 15 | print tolower(dir) "/" file |
16 | if [ -z $j ] ; then | 16 | }' |
17 | continue; | ||
18 | fi; | ||
19 | echo $j | sed -e 's/_BB_DIR_ROOT//g;s/_BB_DIR_BIN/\/bin/g;' \ | ||
20 | -e 's/_BB_DIR_SBIN/\/sbin/g;s/_BB_DIR_USR_BIN/\/usr\/bin/g;' \ | ||
21 | -e 's/_BB_DIR_USR_SBIN/\/usr\/sbin/g;' | ||
22 | done; | ||
23 | done | ||
diff --git a/busybox.mkll b/busybox.mkll index 922dcdd81..12fa06f40 100755 --- a/busybox.mkll +++ b/busybox.mkll | |||
@@ -1,23 +1,16 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # Make busybox links list file. | 2 | # Make busybox links list file. |
3 | 3 | ||
4 | DF="Config.h" | 4 | CONFIG_H=${1:-Config.h} |
5 | 5 | APPLETS_H=${2:-applets.h} | |
6 | MF=$1 | 6 | gcc -E -DMAKE_LINKS -include $CONFIG_H $APPLETS_H | |
7 | if [ "$MF" = "" ]; then | 7 | awk '/^[ \t]*LINK/{ |
8 | MF="applets.h" | 8 | match($2,"_BB_DIR[A-Z_]*") |
9 | fi | 9 | dir=substr($2,RSTART+7,RLENGTH-7) |
10 | 10 | gsub("_","/",dir) | |
11 | LIST="$(gcc -E -dM $DF | sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\<BB_\(.*\)\>/BB_\1/gp;' | sort)" | 11 | if(dir=="/ROOT") dir="" |
12 | 12 | file=$3 | |
13 | for def in ${LIST}; do | 13 | gsub("\"","",file) |
14 | i=`sed -n '/^#ifdef \<'$def'\>.*/,/^#endif/{ s/.*\"\(.*\)\".*\(_BB_DIR_[A-Z_]*\).*$/\2\/\1/gp; }' $MF` | 14 | if (file=="busybox") next |
15 | for j in $i; do | 15 | print tolower(dir) "/" file |
16 | if [ -z $j ] ; then | 16 | }' |
17 | continue; | ||
18 | fi; | ||
19 | echo $j | sed -e 's/_BB_DIR_ROOT//g;s/_BB_DIR_BIN/\/bin/g;' \ | ||
20 | -e 's/_BB_DIR_SBIN/\/sbin/g;s/_BB_DIR_USR_BIN/\/usr\/bin/g;' \ | ||
21 | -e 's/_BB_DIR_USR_SBIN/\/usr\/sbin/g;' | ||
22 | done; | ||
23 | done | ||
diff --git a/include/applets.h b/include/applets.h index 254924a7a..fe8c59782 100644 --- a/include/applets.h +++ b/include/applets.h | |||
@@ -10,16 +10,19 @@ | |||
10 | * file result in the listing remaining in ascii order. You have been warned. | 10 | * file result in the listing remaining in ascii order. You have been warned. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef PROTOTYPES | 13 | #if defined(PROTOTYPES) |
14 | const struct BB_applet applets[] = { | ||
15 | #define APPLET(a,b,c,d) {a,b,c,d}, | ||
16 | #define APPLET_NOUSAGE(a,b,c) {a,b,c,NULL}, | ||
17 | #else | ||
18 | #define APPLET(a,b,c,d) \ | 14 | #define APPLET(a,b,c,d) \ |
19 | extern int b(int argc, char **argv); \ | 15 | extern int b(int argc, char **argv); \ |
20 | extern const char d[]; | 16 | extern const char d[]; |
21 | #define APPLET_NOUSAGE(a,b,c) \ | 17 | #define APPLET_NOUSAGE(a,b,c) \ |
22 | extern int b(int argc, char **argv); | 18 | extern int b(int argc, char **argv); |
19 | #elif defined(MAKE_LINKS) | ||
20 | #define APPLET(a,b,c,d) LINK c a | ||
21 | #define APPLET_NOUSAGE(a,b,c) LINK c a | ||
22 | #else | ||
23 | const struct BB_applet applets[] = { | ||
24 | #define APPLET(a,b,c,d) {a,b,c,d}, | ||
25 | #define APPLET_NOUSAGE(a,b,c) {a,b,c,NULL}, | ||
23 | #endif | 26 | #endif |
24 | 27 | ||
25 | #ifdef BB_TEST | 28 | #ifdef BB_TEST |
@@ -378,7 +381,7 @@ const struct BB_applet applets[] = { | |||
378 | APPLET("zcat", gunzip_main, _BB_DIR_BIN, gunzip_usage) | 381 | APPLET("zcat", gunzip_main, _BB_DIR_BIN, gunzip_usage) |
379 | #endif | 382 | #endif |
380 | 383 | ||
381 | #ifndef PROTOTYPES | 384 | #if !defined(PROTOTYPES) && !defined(MAKE_LINKS) |
382 | { 0,NULL,0,NULL} | 385 | { 0,NULL,0,NULL} |
383 | }; | 386 | }; |
384 | 387 | ||