- grep -v ^\.PHONY < Makefile
authorJohn Beppu <beppu@lbox.org>
Mon, 17 Apr 2000 17:49:44 +0000 (17:49 -0000)
committerJohn Beppu <beppu@lbox.org>
Mon, 17 Apr 2000 17:49:44 +0000 (17:49 -0000)
+ busybox.def.h
  BB_FEATURE_TRIVIAL_HELP
+ uname.c has an example of how BB_FEATURE_TRIVIAL_HELP
  is to be applied.

Makefile
busybox.def.h
coreutils/uname.c
uname.c

index 475a6e6fb837ad395fb7c12d827fdf229b36fca3..61fe0ed8e8090530ed5465c6f5f236591e7d54de 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -96,7 +96,6 @@ ifdef BB_INIT_SCRIPT
 endif
 
 all: busybox busybox.links docs
-.PHONY: all
 
 busybox: $(OBJECTS)
        $(CC) $(LDFLAGS) -o $@ $^ $(LIBRARIES)
@@ -111,26 +110,21 @@ busybox.links: busybox.def.h
 regexp.o nfsmount.o: %.o: %.h
 $(OBJECTS): %.o: busybox.def.h internal.h  %.c
 
-.PHONY: test tests
 test tests:
        cd tests && $(MAKE) all
 
-.PHONY: clean
 clean:
        - rm -f busybox.links *~ *.o core
        - rm -rf _install
        - cd tests && $(MAKE) clean
 
-.PHONY: distclean
 distclean: clean
        - rm -f busybox
        - cd tests && $(MAKE) distclean
 
-.PHONY: install
 install: busybox busybox.links
        ./install.sh $(PREFIX)
 
-.PHONY: dist release
 dist release: distclean
        $(MAKE) -C docs clean all 
        cd ..;                                  \
index 1880884f976174fbad688741c99ff9295830d8d3..79eef1d1219add81ddf11b7dff87b22ecc6a2ce5 100644 (file)
 // normal strings.
 #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)
 #define BB_FEATURE_USE_TERMIOS
 //
index 9a1cb808aa56d62b28ee30d49d1fcf5d69a4c3a5..f1304925db845ac2aea80522b72d6dec6f700793 100644 (file)
@@ -43,6 +43,7 @@
 
 static const char uname_usage[] =
        "uname [OPTION]...\n\n"
+#ifndef BB_FEATURE_TRIVIAL_HELP
        "Print certain system information.  With no OPTION, same as -s.\n\n"
        "Options:\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-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);
diff --git a/uname.c b/uname.c
index 9a1cb808aa56d62b28ee30d49d1fcf5d69a4c3a5..f1304925db845ac2aea80522b72d6dec6f700793 100644 (file)
--- a/uname.c
+++ b/uname.c
@@ -43,6 +43,7 @@
 
 static const char uname_usage[] =
        "uname [OPTION]...\n\n"
+#ifndef BB_FEATURE_TRIVIAL_HELP
        "Print certain system information.  With no OPTION, same as -s.\n\n"
        "Options:\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-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);