aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-11-13 12:45:33 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-11-13 12:45:33 +0100
commit73225b6d6e14f63e048fd95b504a2d909684699f (patch)
treefa4e412ed699e2e4abbc62d810cd8a9980055d5a
parentf200f732f4d04a26814f109be8db2b6510e7127c (diff)
downloadbusybox-w32-73225b6d6e14f63e048fd95b504a2d909684699f.tar.gz
busybox-w32-73225b6d6e14f63e048fd95b504a2d909684699f.tar.bz2
busybox-w32-73225b6d6e14f63e048fd95b504a2d909684699f.zip
switch editors/* to embedded-in-source kbuild system
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-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
-rw-r--r--include/applets.src.h4
7 files changed, 61 insertions, 53 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"
7 7
8INSERT 8INSERT
9 9
10config CMP
11 bool "cmp"
12 default y
13 help
14 cmp is used to compare two files and returns the result
15 to standard output.
16
17config DIFF
18 bool "diff"
19 default y
20 help
21 diff compares two files or directories and outputs the
22 differences between them in a form that can be given to
23 the patch command.
24
25config FEATURE_DIFF_LONG_OPTIONS
26 bool "Enable long options"
27 default y
28 depends on DIFF && LONG_OPTS
29 help
30 Enable use of long options.
31
32config FEATURE_DIFF_DIR
33 bool "Enable directory support"
34 default y
35 depends on DIFF
36 help
37 This option enables support for directory and subdirectory
38 comparison.
39
40config ED
41 bool "ed"
42 default y
43 help
44 The original 1970's Unix text editor, from the days of teletypes.
45 Small, simple, evil. Part of SUSv3. If you're not already using
46 this, you don't need it.
47
48config SED
49 bool "sed"
50 default y
51 help
52 sed is used to perform text transformations on a file
53 or input from a pipeline.
54
55config FEATURE_ALLOW_EXEC 10config FEATURE_ALLOW_EXEC
56 bool "Allow vi and awk to execute shell commands" 11 bool "Allow vi and awk to execute shell commands"
57 default y 12 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 @@
7lib-y:= 7lib-y:=
8 8
9INSERT 9INSERT
10lib-$(CONFIG_CMP) += cmp.o
11lib-$(CONFIG_DIFF) += diff.o
12lib-$(CONFIG_ED) += ed.o
13lib-$(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 @@
10/* BB_AUDIT SUSv3 (virtually) compliant -- uses nicer GNU format for -l. */ 10/* BB_AUDIT SUSv3 (virtually) compliant -- uses nicer GNU format for -l. */
11/* http://www.opengroup.org/onlinepubs/007904975/utilities/cmp.html */ 11/* http://www.opengroup.org/onlinepubs/007904975/utilities/cmp.html */
12 12
13//config:config CMP
14//config: bool "cmp"
15//config: default y
16//config: help
17//config: cmp is used to compare two files and returns the result
18//config: to standard output.
19
20//kbuild:lib-$(CONFIG_CMP) += cmp.o
21
22//applet:IF_CMP(APPLET(cmp, BB_DIR_USR_BIN, BB_SUID_DROP))
23
13//usage:#define cmp_trivial_usage 24//usage:#define cmp_trivial_usage
14//usage: "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]" 25//usage: "[-l] [-s] FILE1 [FILE2" IF_DESKTOP(" [SKIP1 [SKIP2]]") "]"
15//usage:#define cmp_full_usage "\n\n" 26//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 @@
76 * 6n words for files of length n. 76 * 6n words for files of length n.
77 */ 77 */
78 78
79//config:config DIFF
80//config: bool "diff"
81//config: default y
82//config: help
83//config: diff compares two files or directories and outputs the
84//config: differences between them in a form that can be given to
85//config: the patch command.
86//config:
87//config:config FEATURE_DIFF_LONG_OPTIONS
88//config: bool "Enable long options"
89//config: default y
90//config: depends on DIFF && LONG_OPTS
91//config: help
92//config: Enable use of long options.
93//config:
94//config:config FEATURE_DIFF_DIR
95//config: bool "Enable directory support"
96//config: default y
97//config: depends on DIFF
98//config: help
99//config: This option enables support for directory and subdirectory
100//config: comparison.
101
102//kbuild:lib-$(CONFIG_DIFF) += diff.o
103
104//applet:IF_DIFF(APPLET(diff, BB_DIR_USR_BIN, BB_SUID_DROP))
105
79//usage:#define diff_trivial_usage 106//usage:#define diff_trivial_usage
80//usage: "[-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2" 107//usage: "[-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2"
81//usage:#define diff_full_usage "\n\n" 108//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 @@
7 * The "ed" built-in command (much simplified) 7 * The "ed" built-in command (much simplified)
8 */ 8 */
9 9
10//config:config ED
11//config: bool "ed"
12//config: default y
13//config: help
14//config: The original 1970's Unix text editor, from the days of teletypes.
15//config: Small, simple, evil. Part of SUSv3. If you're not already using
16//config: this, you don't need it.
17
18//kbuild:lib-$(CONFIG_ED) += ed.o
19
20//applet:IF_ED(APPLET(ed, BB_DIR_BIN, BB_SUID_DROP))
21
10//usage:#define ed_trivial_usage "" 22//usage:#define ed_trivial_usage ""
11//usage:#define ed_full_usage "" 23//usage:#define ed_full_usage ""
12 24
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 @@
58 * http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html 58 * http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
59 */ 59 */
60 60
61//config:config SED
62//config: bool "sed"
63//config: default y
64//config: help
65//config: sed is used to perform text transformations on a file
66//config: or input from a pipeline.
67
68//kbuild:lib-$(CONFIG_SED) += sed.o
69
70//applet:IF_SED(APPLET(sed, BB_DIR_BIN, BB_SUID_DROP))
71
61//usage:#define sed_trivial_usage 72//usage:#define sed_trivial_usage
62//usage: "[-inrE] [-f FILE]... [-e CMD]... [FILE]...\n" 73//usage: "[-inrE] [-f FILE]... [-e CMD]... [FILE]...\n"
63//usage: "or: sed [-inrE] CMD [FILE]..." 74//usage: "or: sed [-inrE] CMD [FILE]..."
diff --git a/include/applets.src.h b/include/applets.src.h
index ac8f18056..0ba88f965 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
@@ -104,7 +104,6 @@ IF_CHRT(APPLET(chrt, BB_DIR_USR_BIN, BB_SUID_DROP))
104IF_CHVT(APPLET(chvt, BB_DIR_USR_BIN, BB_SUID_DROP)) 104IF_CHVT(APPLET(chvt, BB_DIR_USR_BIN, BB_SUID_DROP))
105IF_CKSUM(APPLET_NOEXEC(cksum, cksum, BB_DIR_USR_BIN, BB_SUID_DROP, cksum)) 105IF_CKSUM(APPLET_NOEXEC(cksum, cksum, BB_DIR_USR_BIN, BB_SUID_DROP, cksum))
106IF_CLEAR(APPLET(clear, BB_DIR_USR_BIN, BB_SUID_DROP)) 106IF_CLEAR(APPLET(clear, BB_DIR_USR_BIN, BB_SUID_DROP))
107IF_CMP(APPLET(cmp, BB_DIR_USR_BIN, BB_SUID_DROP))
108IF_COMM(APPLET(comm, BB_DIR_USR_BIN, BB_SUID_DROP)) 107IF_COMM(APPLET(comm, BB_DIR_USR_BIN, BB_SUID_DROP))
109IF_CP(APPLET_NOEXEC(cp, cp, BB_DIR_BIN, BB_SUID_DROP, cp)) 108IF_CP(APPLET_NOEXEC(cp, cp, BB_DIR_BIN, BB_SUID_DROP, cp))
110IF_CPIO(APPLET(cpio, BB_DIR_BIN, BB_SUID_DROP)) 109IF_CPIO(APPLET(cpio, BB_DIR_BIN, BB_SUID_DROP))
@@ -122,7 +121,6 @@ IF_DEVFSD(APPLET(devfsd, BB_DIR_SBIN, BB_SUID_DROP))
122IF_DEVMEM(APPLET(devmem, BB_DIR_SBIN, BB_SUID_DROP)) 121IF_DEVMEM(APPLET(devmem, BB_DIR_SBIN, BB_SUID_DROP))
123IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP)) 122IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP))
124IF_DHCPRELAY(APPLET(dhcprelay, BB_DIR_USR_SBIN, BB_SUID_DROP)) 123IF_DHCPRELAY(APPLET(dhcprelay, BB_DIR_USR_SBIN, BB_SUID_DROP))
125IF_DIFF(APPLET(diff, BB_DIR_USR_BIN, BB_SUID_DROP))
126IF_DIRNAME(APPLET_NOFORK(dirname, dirname, BB_DIR_USR_BIN, BB_SUID_DROP, dirname)) 124IF_DIRNAME(APPLET_NOFORK(dirname, dirname, BB_DIR_USR_BIN, BB_SUID_DROP, dirname))
127IF_DMESG(APPLET(dmesg, BB_DIR_BIN, BB_SUID_DROP)) 125IF_DMESG(APPLET(dmesg, BB_DIR_BIN, BB_SUID_DROP))
128IF_DNSD(APPLET(dnsd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 126IF_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))
136//IF_E2FSCK(APPLET(e2fsck, BB_DIR_SBIN, BB_SUID_DROP)) 134//IF_E2FSCK(APPLET(e2fsck, BB_DIR_SBIN, BB_SUID_DROP))
137//IF_E2LABEL(APPLET_ODDNAME(e2label, tune2fs, BB_DIR_SBIN, BB_SUID_DROP, e2label)) 135//IF_E2LABEL(APPLET_ODDNAME(e2label, tune2fs, BB_DIR_SBIN, BB_SUID_DROP, e2label))
138IF_ECHO(APPLET_NOFORK(echo, echo, BB_DIR_BIN, BB_SUID_DROP, echo)) 136IF_ECHO(APPLET_NOFORK(echo, echo, BB_DIR_BIN, BB_SUID_DROP, echo))
139IF_ED(APPLET(ed, BB_DIR_BIN, BB_SUID_DROP))
140IF_EJECT(APPLET(eject, BB_DIR_USR_BIN, BB_SUID_DROP)) 137IF_EJECT(APPLET(eject, BB_DIR_USR_BIN, BB_SUID_DROP))
141IF_ENV(APPLET_NOEXEC(env, env, BB_DIR_USR_BIN, BB_SUID_DROP, env)) 138IF_ENV(APPLET_NOEXEC(env, env, BB_DIR_USR_BIN, BB_SUID_DROP, env))
142IF_ENVDIR(APPLET_ODDNAME(envdir, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, envdir)) 139IF_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))
317IF_RX(APPLET(rx, BB_DIR_USR_BIN, BB_SUID_DROP)) 314IF_RX(APPLET(rx, BB_DIR_USR_BIN, BB_SUID_DROP))
318IF_SCRIPT(APPLET(script, BB_DIR_USR_BIN, BB_SUID_DROP)) 315IF_SCRIPT(APPLET(script, BB_DIR_USR_BIN, BB_SUID_DROP))
319IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP)) 316IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP))
320IF_SED(APPLET(sed, BB_DIR_BIN, BB_SUID_DROP))
321IF_SELINUXENABLED(APPLET(selinuxenabled, BB_DIR_USR_SBIN, BB_SUID_DROP)) 317IF_SELINUXENABLED(APPLET(selinuxenabled, BB_DIR_USR_SBIN, BB_SUID_DROP))
322IF_SENDMAIL(APPLET(sendmail, BB_DIR_USR_SBIN, BB_SUID_DROP)) 318IF_SENDMAIL(APPLET(sendmail, BB_DIR_USR_SBIN, BB_SUID_DROP))
323IF_SEQ(APPLET_NOFORK(seq, seq, BB_DIR_USR_BIN, BB_SUID_DROP, seq)) 319IF_SEQ(APPLET_NOFORK(seq, seq, BB_DIR_USR_BIN, BB_SUID_DROP, seq))