switch editors/* to embedded-in-source kbuild system

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2013-11-13 12:45:33 +01:00
parent f200f732f4
commit 73225b6d6e
7 changed files with 61 additions and 53 deletions

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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 ""

View File

@ -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]..."

View File

@ -104,7 +104,6 @@ IF_CHRT(APPLET(chrt, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_CHVT(APPLET(chvt, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_CKSUM(APPLET_NOEXEC(cksum, cksum, BB_DIR_USR_BIN, BB_SUID_DROP, cksum))
IF_CLEAR(APPLET(clear, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_CMP(APPLET(cmp, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_COMM(APPLET(comm, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_CP(APPLET_NOEXEC(cp, cp, BB_DIR_BIN, BB_SUID_DROP, cp))
IF_CPIO(APPLET(cpio, BB_DIR_BIN, BB_SUID_DROP))
@ -122,7 +121,6 @@ IF_DEVFSD(APPLET(devfsd, BB_DIR_SBIN, BB_SUID_DROP))
IF_DEVMEM(APPLET(devmem, BB_DIR_SBIN, BB_SUID_DROP))
IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP))
IF_DHCPRELAY(APPLET(dhcprelay, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_DIFF(APPLET(diff, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_DIRNAME(APPLET_NOFORK(dirname, dirname, BB_DIR_USR_BIN, BB_SUID_DROP, dirname))
IF_DMESG(APPLET(dmesg, BB_DIR_BIN, BB_SUID_DROP))
IF_DNSD(APPLET(dnsd, BB_DIR_USR_SBIN, BB_SUID_DROP))
@ -136,7 +134,6 @@ IF_DUMPLEASES(APPLET(dumpleases, BB_DIR_USR_BIN, BB_SUID_DROP))
//IF_E2FSCK(APPLET(e2fsck, BB_DIR_SBIN, BB_SUID_DROP))
//IF_E2LABEL(APPLET_ODDNAME(e2label, tune2fs, BB_DIR_SBIN, BB_SUID_DROP, e2label))
IF_ECHO(APPLET_NOFORK(echo, echo, BB_DIR_BIN, BB_SUID_DROP, echo))
IF_ED(APPLET(ed, BB_DIR_BIN, BB_SUID_DROP))
IF_EJECT(APPLET(eject, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_ENV(APPLET_NOEXEC(env, env, BB_DIR_USR_BIN, BB_SUID_DROP, env))
IF_ENVDIR(APPLET_ODDNAME(envdir, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, envdir))
@ -317,7 +314,6 @@ IF_RUNSVDIR(APPLET(runsvdir, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_RX(APPLET(rx, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_SCRIPT(APPLET(script, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP))
IF_SED(APPLET(sed, BB_DIR_BIN, BB_SUID_DROP))
IF_SELINUXENABLED(APPLET(selinuxenabled, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_SENDMAIL(APPLET(sendmail, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_SEQ(APPLET_NOFORK(seq, seq, BB_DIR_USR_BIN, BB_SUID_DROP, seq))