aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorGravatar Denys Vlasenko <vda.linux@googlemail.com>2013-11-13 12:45:33 +0100
committerGravatar Denys Vlasenko <vda.linux@googlemail.com>2013-11-13 12:45:33 +0100
commit73225b6d6e14f63e048fd95b504a2d909684699f (patch)
treefa4e412ed699e2e4abbc62d810cd8a9980055d5a /editors
parentf200f732f4d04a26814f109be8db2b6510e7127c (diff)
downloadbusybox-73225b6d6e14f63e048fd95b504a2d909684699f.tar.gz
busybox-73225b6d6e14f63e048fd95b504a2d909684699f.tar.bz2
switch editors/* to embedded-in-source kbuild system
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors')
-rw-r--r--editors/Config.src45
-rw-r--r--editors/Kbuild.src4
-rw-r--r--editors/cmp.c11
-rw-r--r--editors/diff.c27
-rw-r--r--editors/ed.c12
-rw-r--r--editors/sed.c11
6 files changed, 61 insertions, 49 deletions
diff --git a/editors/Config.src b/editors/Config.src
index d3bd46e40..c6e9d92af 100644
--- a/editors/Config.src
+++ b/editors/Config.src
@@ -7,51 +7,6 @@ menu "Editors"
INSERT
-config CMP
- bool "cmp"
- default y
- help
- cmp is used to compare two files and returns the result
- to standard output.
-
-config DIFF
- bool "diff"
- default y
- help
- diff compares two files or directories and outputs the
- differences between them in a form that can be given to
- the patch command.
-
-config FEATURE_DIFF_LONG_OPTIONS
- bool "Enable long options"
- default y
- depends on DIFF && LONG_OPTS
- help
- Enable use of long options.
-
-config FEATURE_DIFF_DIR
- bool "Enable directory support"
- default y
- depends on DIFF
- help
- This option enables support for directory and subdirectory
- comparison.
-
-config ED
- bool "ed"
- default y
- help
- The original 1970's Unix text editor, from the days of teletypes.
- Small, simple, evil. Part of SUSv3. If you're not already using
- this, you don't need it.
-
-config SED
- bool "sed"
- default y
- help
- sed is used to perform text transformations on a file
- or input from a pipeline.
-
config FEATURE_ALLOW_EXEC
bool "Allow vi and awk to execute shell commands"
default y
diff --git a/editors/Kbuild.src b/editors/Kbuild.src
index 15d7a4cac..6b4fb7470 100644
--- a/editors/Kbuild.src
+++ b/editors/Kbuild.src
@@ -7,7 +7,3 @@
lib-y:=
INSERT
-lib-$(CONFIG_CMP) += cmp.o
-lib-$(CONFIG_DIFF) += diff.o
-lib-$(CONFIG_ED) += ed.o
-lib-$(CONFIG_SED) += sed.o
diff --git a/editors/cmp.c b/editors/cmp.c
index fbe6b9753..a4af6f480 100644
--- a/editors/cmp.c
+++ b/editors/cmp.c
@@ -10,6 +10,17 @@
/* BB_AUDIT SUSv3 (virtually) compliant -- uses nicer GNU format for -l. */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/cmp.html */
+//config:config CMP
+//config: bool "cmp"
+//config: default y
+//config: help
+//config: cmp is used to compare two files and returns the result
+//config: to standard output.
+
+//kbuild:lib-$(CONFIG_CMP) += cmp.o
+
+//applet:IF_CMP(APPLET(cmp, BB_DIR_USR_BIN, BB_SUID_DROP))
+
//usage:#define cmp_trivial_usage
//usage: "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]"
//usage:#define cmp_full_usage "\n\n"
diff --git a/editors/diff.c b/editors/diff.c
index b08ded3a1..a78a0ee28 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -76,6 +76,33 @@
* 6n words for files of length n.
*/
+//config:config DIFF
+//config: bool "diff"
+//config: default y
+//config: help
+//config: diff compares two files or directories and outputs the
+//config: differences between them in a form that can be given to
+//config: the patch command.
+//config:
+//config:config FEATURE_DIFF_LONG_OPTIONS
+//config: bool "Enable long options"
+//config: default y
+//config: depends on DIFF && LONG_OPTS
+//config: help
+//config: Enable use of long options.
+//config:
+//config:config FEATURE_DIFF_DIR
+//config: bool "Enable directory support"
+//config: default y
+//config: depends on DIFF
+//config: help
+//config: This option enables support for directory and subdirectory
+//config: comparison.
+
+//kbuild:lib-$(CONFIG_DIFF) += diff.o
+
+//applet:IF_DIFF(APPLET(diff, BB_DIR_USR_BIN, BB_SUID_DROP))
+
//usage:#define diff_trivial_usage
//usage: "[-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2"
//usage:#define diff_full_usage "\n\n"
diff --git a/editors/ed.c b/editors/ed.c
index dbb51306c..3087fb0b9 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -7,6 +7,18 @@
* The "ed" built-in command (much simplified)
*/
+//config:config ED
+//config: bool "ed"
+//config: default y
+//config: help
+//config: The original 1970's Unix text editor, from the days of teletypes.
+//config: Small, simple, evil. Part of SUSv3. If you're not already using
+//config: this, you don't need it.
+
+//kbuild:lib-$(CONFIG_ED) += ed.o
+
+//applet:IF_ED(APPLET(ed, BB_DIR_BIN, BB_SUID_DROP))
+
//usage:#define ed_trivial_usage ""
//usage:#define ed_full_usage ""
diff --git a/editors/sed.c b/editors/sed.c
index 971375884..777f38308 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -58,6 +58,17 @@
* http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
*/
+//config:config SED
+//config: bool "sed"
+//config: default y
+//config: help
+//config: sed is used to perform text transformations on a file
+//config: or input from a pipeline.
+
+//kbuild:lib-$(CONFIG_SED) += sed.o
+
+//applet:IF_SED(APPLET(sed, BB_DIR_BIN, BB_SUID_DROP))
+
//usage:#define sed_trivial_usage
//usage: "[-inrE] [-f FILE]... [-e CMD]... [FILE]...\n"
//usage: "or: sed [-inrE] CMD [FILE]..."