touch: fix help text to not show options disabled in .config
authorDenys Vlasenko <dvlasenk@redhat.com>
Wed, 1 Dec 2010 12:06:03 +0000 (13:06 +0100)
committerDenys Vlasenko <dvlasenk@redhat.com>
Wed, 1 Dec 2010 12:06:03 +0000 (13:06 +0100)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
coreutils/Config.src
coreutils/Kbuild.src
coreutils/touch.c
include/applets.src.h
include/usage.src.h

index 0eb70af5579bf0452b4ad1115ae1c1506dbb6512..c2fd73e59cd67a3aa6b50ce80ef6b0643eb78ba3 100644 (file)
@@ -661,13 +661,6 @@ config FEATURE_TEE_USE_BLOCK_IO
        help
          Enable this option for a faster tee, at expense of size.
 
-config TOUCH
-       bool "touch"
-       default y
-       help
-         touch is used to create or change the access and/or
-         modification timestamp of specified files.
-
 config TRUE
        bool "true"
        default y
index 630b048dfcb7655499f215ea26959b37dfc7f896..4ea0fa50a6ba00ec87c88a50ce94a3f5d3f49339 100644 (file)
@@ -74,7 +74,6 @@ lib-$(CONFIG_SYNC)      += sync.o
 lib-$(CONFIG_TAC)       += tac.o
 lib-$(CONFIG_TAIL)      += tail.o
 lib-$(CONFIG_TEE)       += tee.o
-lib-$(CONFIG_TOUCH)     += touch.o
 lib-$(CONFIG_TRUE)      += true.o
 lib-$(CONFIG_TTY)       += tty.o
 lib-$(CONFIG_UNAME)     += uname.o
index afff36b4ddb5986595293c00f1553f8612c7b3f5..35217711113766f8af94fc69c5239c21b1af1405 100644 (file)
 
 #include "libbb.h"
 
+//config:config TOUCH
+//config:      bool "touch"
+//config:      default y
+//config:      help
+//config:        touch is used to create or change the access and/or
+//config:        modification timestamp of specified files.
+
+//applet:IF_TOUCH(APPLET_NOFORK(touch, touch, _BB_DIR_BIN, _BB_SUID_DROP, touch))
+
+//kbuild:lib-$(CONFIG_TOUCH) += touch.o
+
+//usage:#define touch_trivial_usage
+//usage:       "[-c]" IF_DESKTOP(" [-d DATE] [-r FILE]") " FILE [FILE]..."
+//usage:#define touch_full_usage "\n\n"
+//usage:       "Update the last-modified date on the given FILE[s]\n"
+//usage:     "\nOptions:"
+//usage:     "\n       -c      Don't create files"
+//usage:       IF_DESKTOP(
+//usage:     "\n       -d DT   Date/time to use"
+//usage:     "\n       -r FILE Use FILE's date/time"
+//usage:       )
+//usage:
+//usage:#define touch_example_usage
+//usage:       "$ ls -l /tmp/foo\n"
+//usage:       "/bin/ls: /tmp/foo: No such file or directory\n"
+//usage:       "$ touch /tmp/foo\n"
+//usage:       "$ ls -l /tmp/foo\n"
+//usage:       "-rw-rw-r--    1 andersen andersen        0 Apr 15 01:11 /tmp/foo\n"
+
 /* This is a NOFORK applet. Be very careful! */
 
 /* coreutils implements:
index 131fca504f286f8c2b65a25549b582fb34eabde9..9dd5b6d842b10aaff7008ce9e93fd3b74f3e6570 100644 (file)
@@ -356,7 +356,6 @@ IF_TFTPD(APPLET(tftpd, _BB_DIR_USR_BIN, _BB_SUID_DROP))
 IF_TIME(APPLET(time, _BB_DIR_USR_BIN, _BB_SUID_DROP))
 IF_TIMEOUT(APPLET(timeout, _BB_DIR_USR_BIN, _BB_SUID_DROP))
 IF_TOP(APPLET(top, _BB_DIR_USR_BIN, _BB_SUID_DROP))
-IF_TOUCH(APPLET_NOFORK(touch, touch, _BB_DIR_BIN, _BB_SUID_DROP, touch))
 IF_TR(APPLET(tr, _BB_DIR_USR_BIN, _BB_SUID_DROP))
 IF_TRACEROUTE(APPLET(traceroute, _BB_DIR_USR_BIN, _BB_SUID_MAYBE))
 IF_TRACEROUTE6(APPLET(traceroute6, _BB_DIR_USR_BIN, _BB_SUID_MAYBE))
index 7de2c69281e03827740a4a50bc5de5b7a6dfdfed..c413fbb919330ce7b3833f27e274525921f9c254 100644 (file)
@@ -4005,22 +4005,6 @@ INSERT
        "and display a screenful of them." \
 //TODO: add options and keyboard commands
 
-#define touch_trivial_usage \
-       "[-c] [-d DATE] [-r FILE] FILE [FILE]..."
-#define touch_full_usage "\n\n" \
-       "Update the last-modified date on the given FILE[s]\n" \
-     "\nOptions:" \
-     "\n       -c      Don't create files" \
-     "\n       -d DT   Date/time to use" \
-     "\n       -r FILE Use FILE's date/time" \
-
-#define touch_example_usage \
-       "$ ls -l /tmp/foo\n" \
-       "/bin/ls: /tmp/foo: No such file or directory\n" \
-       "$ touch /tmp/foo\n" \
-       "$ ls -l /tmp/foo\n" \
-       "-rw-rw-r--    1 andersen andersen        0 Apr 15 01:11 /tmp/foo\n"
-
 #define tr_trivial_usage \
        "[-cds] STRING1 [STRING2]"
 #define tr_full_usage "\n\n" \