Patch from Larry Doolittle so it will build the newdocs right.

This commit is contained in:
Eric Andersen 2000-12-02 00:44:48 +00:00
parent e73fda8311
commit 868c057d25
5 changed files with 49 additions and 57 deletions

View File

@ -184,19 +184,19 @@ docs/busybox.txt: docs/busybox.sgml
@echo BusyBox Documentation @echo BusyBox Documentation
@echo @echo
- mkdir -p docs - mkdir -p docs
(cd docs; sgmltools -b txt $(BB_SRC_DIR)/busybox.sgml) (cd docs; sgmltools -b txt busybox.sgml)
docs/busybox.dvi: docs/busybox.sgml docs/busybox.dvi: docs/busybox.sgml
- mkdir -p docs - mkdir -p docs
(cd docs; sgmltools -b dvi $(BB_SRC_DIR)/busybox.sgml) (cd docs; sgmltools -b dvi busybox.sgml)
docs/busybox.ps: docs/busybox.sgml docs/busybox.ps: docs/busybox.sgml
- mkdir -p docs - mkdir -p docs
(cd docs; sgmltools -b ps $(BB_SRC_DIR)/busybox.sgml) (cd docs; sgmltools -b ps busybox.sgml)
docs/busybox.pdf: docs/busybox.ps docs/busybox.pdf: docs/busybox.ps
- mkdir -p docs - mkdir -p docs
(cd docs; ps2pdf $(BB_SRC_DIR)/busybox.ps) (cd docs; ps2pdf busybox.ps)
docs/busybox/busyboxdocumentation.html: docs/busybox.sgml docs/busybox/busyboxdocumentation.html: docs/busybox.sgml
- mkdir -p docs - mkdir -p docs
@ -209,7 +209,7 @@ busybox: $(OBJECTS)
$(STRIP) $(STRIP)
busybox.links: Config.h busybox.links: Config.h
-$(BB_SRC_DIR)/busybox.mkll $(BB_SRC_DIR)/applets.h | sort >$@ - $(BB_SRC_DIR)/busybox.mkll $(CONFIG_H) $(BB_SRC_DIR)/applets.h >$@
nfsmount.o cmdedit.o: %.o: %.h nfsmount.o cmdedit.o: %.o: %.h
$(OBJECTS): %.o: %.c Config.h busybox.h Makefile $(OBJECTS): %.o: %.c Config.h busybox.h Makefile

View File

@ -10,16 +10,19 @@
* file result in the listing remaining in ascii order. You have been warned. * file result in the listing remaining in ascii order. You have been warned.
*/ */
#ifndef PROTOTYPES #if defined(PROTOTYPES)
const struct BB_applet applets[] = {
#define APPLET(a,b,c,d) {a,b,c,d},
#define APPLET_NOUSAGE(a,b,c) {a,b,c,NULL},
#else
#define APPLET(a,b,c,d) \ #define APPLET(a,b,c,d) \
extern int b(int argc, char **argv); \ extern int b(int argc, char **argv); \
extern const char d[]; extern const char d[];
#define APPLET_NOUSAGE(a,b,c) \ #define APPLET_NOUSAGE(a,b,c) \
extern int b(int argc, char **argv); extern int b(int argc, char **argv);
#elif defined(MAKE_LINKS)
#define APPLET(a,b,c,d) LINK c a
#define APPLET_NOUSAGE(a,b,c) LINK c a
#else
const struct BB_applet applets[] = {
#define APPLET(a,b,c,d) {a,b,c,d},
#define APPLET_NOUSAGE(a,b,c) {a,b,c,NULL},
#endif #endif
#ifdef BB_TEST #ifdef BB_TEST
@ -378,7 +381,7 @@ const struct BB_applet applets[] = {
APPLET("zcat", gunzip_main, _BB_DIR_BIN, gunzip_usage) APPLET("zcat", gunzip_main, _BB_DIR_BIN, gunzip_usage)
#endif #endif
#ifndef PROTOTYPES #if !defined(PROTOTYPES) && !defined(MAKE_LINKS)
{ 0,NULL,0,NULL} { 0,NULL,0,NULL}
}; };

View File

@ -1,23 +1,16 @@
#!/bin/sh #!/bin/sh
# Make busybox links list file. # Make busybox links list file.
DF="Config.h" CONFIG_H=${1:-Config.h}
APPLETS_H=${2:-applets.h}
MF=$1 gcc -E -DMAKE_LINKS -include $CONFIG_H $APPLETS_H |
if [ "$MF" = "" ]; then awk '/^[ \t]*LINK/{
MF="applets.h" match($2,"_BB_DIR[A-Z_]*")
fi dir=substr($2,RSTART+7,RLENGTH-7)
gsub("_","/",dir)
LIST="$(gcc -E -dM $DF | sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\<BB_\(.*\)\>/BB_\1/gp;' | sort)" if(dir=="/ROOT") dir=""
file=$3
for def in ${LIST}; do gsub("\"","",file)
i=`sed -n '/^#ifdef \<'$def'\>.*/,/^#endif/{ s/.*\"\(.*\)\".*\(_BB_DIR_[A-Z_]*\).*$/\2\/\1/gp; }' $MF` if (file=="busybox") next
for j in $i; do print tolower(dir) "/" file
if [ -z $j ] ; then }'
continue;
fi;
echo $j | sed -e 's/_BB_DIR_ROOT//g;s/_BB_DIR_BIN/\/bin/g;' \
-e 's/_BB_DIR_SBIN/\/sbin/g;s/_BB_DIR_USR_BIN/\/usr\/bin/g;' \
-e 's/_BB_DIR_USR_SBIN/\/usr\/sbin/g;'
done;
done

View File

@ -1,23 +1,16 @@
#!/bin/sh #!/bin/sh
# Make busybox links list file. # Make busybox links list file.
DF="Config.h" CONFIG_H=${1:-Config.h}
APPLETS_H=${2:-applets.h}
MF=$1 gcc -E -DMAKE_LINKS -include $CONFIG_H $APPLETS_H |
if [ "$MF" = "" ]; then awk '/^[ \t]*LINK/{
MF="applets.h" match($2,"_BB_DIR[A-Z_]*")
fi dir=substr($2,RSTART+7,RLENGTH-7)
gsub("_","/",dir)
LIST="$(gcc -E -dM $DF | sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\<BB_\(.*\)\>/BB_\1/gp;' | sort)" if(dir=="/ROOT") dir=""
file=$3
for def in ${LIST}; do gsub("\"","",file)
i=`sed -n '/^#ifdef \<'$def'\>.*/,/^#endif/{ s/.*\"\(.*\)\".*\(_BB_DIR_[A-Z_]*\).*$/\2\/\1/gp; }' $MF` if (file=="busybox") next
for j in $i; do print tolower(dir) "/" file
if [ -z $j ] ; then }'
continue;
fi;
echo $j | sed -e 's/_BB_DIR_ROOT//g;s/_BB_DIR_BIN/\/bin/g;' \
-e 's/_BB_DIR_SBIN/\/sbin/g;s/_BB_DIR_USR_BIN/\/usr\/bin/g;' \
-e 's/_BB_DIR_USR_SBIN/\/usr\/sbin/g;'
done;
done

View File

@ -10,16 +10,19 @@
* file result in the listing remaining in ascii order. You have been warned. * file result in the listing remaining in ascii order. You have been warned.
*/ */
#ifndef PROTOTYPES #if defined(PROTOTYPES)
const struct BB_applet applets[] = {
#define APPLET(a,b,c,d) {a,b,c,d},
#define APPLET_NOUSAGE(a,b,c) {a,b,c,NULL},
#else
#define APPLET(a,b,c,d) \ #define APPLET(a,b,c,d) \
extern int b(int argc, char **argv); \ extern int b(int argc, char **argv); \
extern const char d[]; extern const char d[];
#define APPLET_NOUSAGE(a,b,c) \ #define APPLET_NOUSAGE(a,b,c) \
extern int b(int argc, char **argv); extern int b(int argc, char **argv);
#elif defined(MAKE_LINKS)
#define APPLET(a,b,c,d) LINK c a
#define APPLET_NOUSAGE(a,b,c) LINK c a
#else
const struct BB_applet applets[] = {
#define APPLET(a,b,c,d) {a,b,c,d},
#define APPLET_NOUSAGE(a,b,c) {a,b,c,NULL},
#endif #endif
#ifdef BB_TEST #ifdef BB_TEST
@ -378,7 +381,7 @@ const struct BB_applet applets[] = {
APPLET("zcat", gunzip_main, _BB_DIR_BIN, gunzip_usage) APPLET("zcat", gunzip_main, _BB_DIR_BIN, gunzip_usage)
#endif #endif
#ifndef PROTOTYPES #if !defined(PROTOTYPES) && !defined(MAKE_LINKS)
{ 0,NULL,0,NULL} { 0,NULL,0,NULL}
}; };