switch editors/* to embedded-in-source kbuild system
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 13 Nov 2013 11:45:33 +0000 (12:45 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 13 Nov 2013 11:45:33 +0000 (12:45 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
editors/Config.src
editors/Kbuild.src
editors/cmp.c
editors/diff.c
editors/ed.c
editors/sed.c
include/applets.src.h

index d3bd46e402b5b7a539b5378f14567f12c70e4b50..c6e9d92af58036f22b5e39ab8bf16f0455281ba8 100644 (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
index 15d7a4cacf156cb1016ce2d0a4efa64d965c5141..6b4fb747007c3f8819fe2a060e7cc4d8547dcb98 100644 (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
index fbe6b975387d7419c5e1614cc36c1dbbb3d8632c..a4af6f4809cdb8dfa996032cde97b5d6dfa88725 100644 (file)
 /* 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"
index b08ded3a157d47a1559d33339309faae62233ca2..a78a0ee283732b359d4e001c09c519e9f264d909 100644 (file)
  * 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"
index dbb51306cc35ca47aae622cd82ae2180bad92bf3..3087fb0b9f14797fb75391ef1d096a530bb52155 100644 (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 ""
 
index 971375884c444d1d72751b6f4ee8eb9246fb4a51..777f38308ef4d7605a38c70af6025f87bb204a40 100644 (file)
  * 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]..."
index ac8f18056569e49bacff625edb638e5fbb449306..0ba88f965513c0005beee3c95d88153c3a4335e2 100644 (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))