- grep -v ^\.PHONY < Makefile

+ busybox.def.h
  BB_FEATURE_TRIVIAL_HELP
+ uname.c has an example of how BB_FEATURE_TRIVIAL_HELP
  is to be applied.
This commit is contained in:
John Beppu 2000-04-17 17:49:44 +00:00
parent 5a50def0f4
commit 91e581fa04
4 changed files with 11 additions and 8 deletions

View File

@ -96,7 +96,6 @@ ifdef BB_INIT_SCRIPT
endif endif
all: busybox busybox.links docs all: busybox busybox.links docs
.PHONY: all
busybox: $(OBJECTS) busybox: $(OBJECTS)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBRARIES) $(CC) $(LDFLAGS) -o $@ $^ $(LIBRARIES)
@ -111,26 +110,21 @@ busybox.links: busybox.def.h
regexp.o nfsmount.o: %.o: %.h regexp.o nfsmount.o: %.o: %.h
$(OBJECTS): %.o: busybox.def.h internal.h %.c $(OBJECTS): %.o: busybox.def.h internal.h %.c
.PHONY: test tests
test tests: test tests:
cd tests && $(MAKE) all cd tests && $(MAKE) all
.PHONY: clean
clean: clean:
- rm -f busybox.links *~ *.o core - rm -f busybox.links *~ *.o core
- rm -rf _install - rm -rf _install
- cd tests && $(MAKE) clean - cd tests && $(MAKE) clean
.PHONY: distclean
distclean: clean distclean: clean
- rm -f busybox - rm -f busybox
- cd tests && $(MAKE) distclean - cd tests && $(MAKE) distclean
.PHONY: install
install: busybox busybox.links install: busybox busybox.links
./install.sh $(PREFIX) ./install.sh $(PREFIX)
.PHONY: dist release
dist release: distclean dist release: distclean
$(MAKE) -C docs clean all $(MAKE) -C docs clean all
cd ..; \ cd ..; \

View File

@ -130,6 +130,9 @@
// normal strings. // normal strings.
#define BB_FEATURE_FULL_REGULAR_EXPRESSIONS #define BB_FEATURE_FULL_REGULAR_EXPRESSIONS
// //
// Use only simple command help
#define BB_FEATURE_TRIVIAL_HELP
//
// Use termios to manipulate the screen ('more' is prettier with this on) // Use termios to manipulate the screen ('more' is prettier with this on)
#define BB_FEATURE_USE_TERMIOS #define BB_FEATURE_USE_TERMIOS
// //

View File

@ -43,6 +43,7 @@
static const char uname_usage[] = static const char uname_usage[] =
"uname [OPTION]...\n\n" "uname [OPTION]...\n\n"
#ifndef BB_FEATURE_TRIVIAL_HELP
"Print certain system information. With no OPTION, same as -s.\n\n" "Print certain system information. With no OPTION, same as -s.\n\n"
"Options:\n" "Options:\n"
"\t-a\tprint all information\n" "\t-a\tprint all information\n"
@ -52,7 +53,9 @@ static const char uname_usage[] =
"\t-s\tprint the operating system name\n" "\t-s\tprint the operating system name\n"
"\t-p\tprint the host processor type\n" "\t-p\tprint the host processor type\n"
"\t-v\tprint the operating system version\n"; "\t-v\tprint the operating system version\n"
#endif
;
static void print_element(unsigned int mask, char *element); static void print_element(unsigned int mask, char *element);

View File

@ -43,6 +43,7 @@
static const char uname_usage[] = static const char uname_usage[] =
"uname [OPTION]...\n\n" "uname [OPTION]...\n\n"
#ifndef BB_FEATURE_TRIVIAL_HELP
"Print certain system information. With no OPTION, same as -s.\n\n" "Print certain system information. With no OPTION, same as -s.\n\n"
"Options:\n" "Options:\n"
"\t-a\tprint all information\n" "\t-a\tprint all information\n"
@ -52,7 +53,9 @@ static const char uname_usage[] =
"\t-s\tprint the operating system name\n" "\t-s\tprint the operating system name\n"
"\t-p\tprint the host processor type\n" "\t-p\tprint the host processor type\n"
"\t-v\tprint the operating system version\n"; "\t-v\tprint the operating system version\n"
#endif
;
static void print_element(unsigned int mask, char *element); static void print_element(unsigned int mask, char *element);