aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Beppu <beppu@lbox.org>2000-04-17 17:49:44 +0000
committerJohn Beppu <beppu@lbox.org>2000-04-17 17:49:44 +0000
commit91e581fa0438b39ceb0ffb4ddcb90ee4d260ae81 (patch)
tree821da011406dde39fac4076ae8b50feca17783b8
parent5a50def0f4f7265f74a51995852e95851f06f2a1 (diff)
downloadbusybox-w32-91e581fa0438b39ceb0ffb4ddcb90ee4d260ae81.tar.gz
busybox-w32-91e581fa0438b39ceb0ffb4ddcb90ee4d260ae81.tar.bz2
busybox-w32-91e581fa0438b39ceb0ffb4ddcb90ee4d260ae81.zip
- 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.
-rw-r--r--Makefile6
-rw-r--r--busybox.def.h3
-rw-r--r--coreutils/uname.c5
-rw-r--r--uname.c5
4 files changed, 11 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 475a6e6fb..61fe0ed8e 100644
--- a/Makefile
+++ b/Makefile
@@ -96,7 +96,6 @@ ifdef BB_INIT_SCRIPT
96endif 96endif
97 97
98all: busybox busybox.links docs 98all: busybox busybox.links docs
99.PHONY: all
100 99
101busybox: $(OBJECTS) 100busybox: $(OBJECTS)
102 $(CC) $(LDFLAGS) -o $@ $^ $(LIBRARIES) 101 $(CC) $(LDFLAGS) -o $@ $^ $(LIBRARIES)
@@ -111,26 +110,21 @@ busybox.links: busybox.def.h
111regexp.o nfsmount.o: %.o: %.h 110regexp.o nfsmount.o: %.o: %.h
112$(OBJECTS): %.o: busybox.def.h internal.h %.c 111$(OBJECTS): %.o: busybox.def.h internal.h %.c
113 112
114.PHONY: test tests
115test tests: 113test tests:
116 cd tests && $(MAKE) all 114 cd tests && $(MAKE) all
117 115
118.PHONY: clean
119clean: 116clean:
120 - rm -f busybox.links *~ *.o core 117 - rm -f busybox.links *~ *.o core
121 - rm -rf _install 118 - rm -rf _install
122 - cd tests && $(MAKE) clean 119 - cd tests && $(MAKE) clean
123 120
124.PHONY: distclean
125distclean: clean 121distclean: clean
126 - rm -f busybox 122 - rm -f busybox
127 - cd tests && $(MAKE) distclean 123 - cd tests && $(MAKE) distclean
128 124
129.PHONY: install
130install: busybox busybox.links 125install: busybox busybox.links
131 ./install.sh $(PREFIX) 126 ./install.sh $(PREFIX)
132 127
133.PHONY: dist release
134dist release: distclean 128dist release: distclean
135 $(MAKE) -C docs clean all 129 $(MAKE) -C docs clean all
136 cd ..; \ 130 cd ..; \
diff --git a/busybox.def.h b/busybox.def.h
index 1880884f9..79eef1d12 100644
--- a/busybox.def.h
+++ b/busybox.def.h
@@ -130,6 +130,9 @@
130// normal strings. 130// normal strings.
131#define BB_FEATURE_FULL_REGULAR_EXPRESSIONS 131#define BB_FEATURE_FULL_REGULAR_EXPRESSIONS
132// 132//
133// Use only simple command help
134#define BB_FEATURE_TRIVIAL_HELP
135//
133// Use termios to manipulate the screen ('more' is prettier with this on) 136// Use termios to manipulate the screen ('more' is prettier with this on)
134#define BB_FEATURE_USE_TERMIOS 137#define BB_FEATURE_USE_TERMIOS
135// 138//
diff --git a/coreutils/uname.c b/coreutils/uname.c
index 9a1cb808a..f1304925d 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -43,6 +43,7 @@
43 43
44static const char uname_usage[] = 44static const char uname_usage[] =
45 "uname [OPTION]...\n\n" 45 "uname [OPTION]...\n\n"
46#ifndef BB_FEATURE_TRIVIAL_HELP
46 "Print certain system information. With no OPTION, same as -s.\n\n" 47 "Print certain system information. With no OPTION, same as -s.\n\n"
47 "Options:\n" 48 "Options:\n"
48 "\t-a\tprint all information\n" 49 "\t-a\tprint all information\n"
@@ -52,7 +53,9 @@ static const char uname_usage[] =
52 "\t-s\tprint the operating system name\n" 53 "\t-s\tprint the operating system name\n"
53 54
54 "\t-p\tprint the host processor type\n" 55 "\t-p\tprint the host processor type\n"
55 "\t-v\tprint the operating system version\n"; 56 "\t-v\tprint the operating system version\n"
57#endif
58 ;
56 59
57 60
58static void print_element(unsigned int mask, char *element); 61static void print_element(unsigned int mask, char *element);
diff --git a/uname.c b/uname.c
index 9a1cb808a..f1304925d 100644
--- a/uname.c
+++ b/uname.c
@@ -43,6 +43,7 @@
43 43
44static const char uname_usage[] = 44static const char uname_usage[] =
45 "uname [OPTION]...\n\n" 45 "uname [OPTION]...\n\n"
46#ifndef BB_FEATURE_TRIVIAL_HELP
46 "Print certain system information. With no OPTION, same as -s.\n\n" 47 "Print certain system information. With no OPTION, same as -s.\n\n"
47 "Options:\n" 48 "Options:\n"
48 "\t-a\tprint all information\n" 49 "\t-a\tprint all information\n"
@@ -52,7 +53,9 @@ static const char uname_usage[] =
52 "\t-s\tprint the operating system name\n" 53 "\t-s\tprint the operating system name\n"
53 54
54 "\t-p\tprint the host processor type\n" 55 "\t-p\tprint the host processor type\n"
55 "\t-v\tprint the operating system version\n"; 56 "\t-v\tprint the operating system version\n"
57#endif
58 ;
56 59
57 60
58static void print_element(unsigned int mask, char *element); 61static void print_element(unsigned int mask, char *element);