aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorGravatar Denis Vlasenko <vda.linux@googlemail.com>2006-10-05 10:17:08 +0000
committerGravatar Denis Vlasenko <vda.linux@googlemail.com>2006-10-05 10:17:08 +0000
commit7d219aab70e6951ab82c27c202cac05016696723 (patch)
tree4c0679bfa391f71aee9b51505a5d3dc8f60a0cf7 /coreutils
parent8f8f268cfdecb4cabeb2e649a73afc7a485aeff5 (diff)
downloadbusybox-7d219aab70e6951ab82c27c202cac05016696723.tar.gz
busybox-7d219aab70e6951ab82c27c202cac05016696723.tar.bz2
build system overhaul
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/Config.in300
-rw-r--r--coreutils/Kbuild81
-rw-r--r--coreutils/Makefile23
-rw-r--r--coreutils/Makefile.in102
-rw-r--r--coreutils/diff.c5
-rw-r--r--coreutils/id.c1
-rw-r--r--coreutils/libcoreutils/Kbuild12
-rw-r--r--coreutils/libcoreutils/Makefile37
-rw-r--r--coreutils/libcoreutils/Makefile.in39
9 files changed, 245 insertions, 355 deletions
diff --git a/coreutils/Config.in b/coreutils/Config.in
index 6598a8d9c..000f3a8af 100644
--- a/coreutils/Config.in
+++ b/coreutils/Config.in
@@ -5,7 +5,7 @@
menu "Coreutils"
-config CONFIG_BASENAME
+config BASENAME
bool "basename"
default n
help
@@ -13,101 +13,101 @@ config CONFIG_BASENAME
leaving just the filename itself. Enable this option if you wish
to enable the 'basename' utility.
-config CONFIG_CAL
+config CAL
bool "cal"
default n
help
cal is used to display a monthly calender.
-config CONFIG_CAT
+config CAT
bool "cat"
default n
help
cat is used to concatenate files and print them to the standard
output. Enable this option if you wish to enable the 'cat' utility.
-config CONFIG_CATV
+config CATV
bool "catv"
default n
help
Display nonprinting characters as escape sequences (like some
implementations' cat -v option).
-config CONFIG_CHGRP
+config CHGRP
bool "chgrp"
default n
help
chgrp is used to change the group ownership of files.
-config CONFIG_CHMOD
+config CHMOD
bool "chmod"
default n
help
chmod is used to change the access permission of files.
-config CONFIG_CHOWN
+config CHOWN
bool "chown"
default n
help
chown is used to change the user and/or group ownership
of files.
-config CONFIG_CHROOT
+config CHROOT
bool "chroot"
default n
help
chroot is used to change the root directory and run a command.
The default command is `/bin/sh'.
-config CONFIG_CKSUM
+config CKSUM
bool "cksum"
default n
help
cksum is used to calculate the CRC32 checksum of a file.
-config CONFIG_CMP
+config CMP
bool "cmp"
default n
help
cmp is used to compare two files and returns the result
to standard output.
-config CONFIG_COMM
+config COMM
bool "comm"
default n
help
comm is used to compare two files line by line and return
a three-column output.
-config CONFIG_CP
+config CP
bool "cp"
default n
help
cp is used to copy files and directories.
-config CONFIG_CUT
+config CUT
bool "cut"
default n
help
cut is used to print selected parts of lines from
each file to stdout.
-config CONFIG_DATE
+config DATE
bool "date"
default n
help
date is used to set the system date or display the
current time in the given format.
-config CONFIG_FEATURE_DATE_ISOFMT
+config FEATURE_DATE_ISOFMT
bool "Enable ISO date format output (-I)"
default y
- depends on CONFIG_DATE
+ depends on DATE
help
Enable option (-I) to output an ISO-8601 compliant
date/time string.
-config CONFIG_DD
+config DD
bool "dd"
default n
help
@@ -115,10 +115,10 @@ config CONFIG_DD
by default) using specific input and output blocksizes,
while optionally performing conversions on it.
-config CONFIG_FEATURE_DD_SIGNAL_HANDLING
+config FEATURE_DD_SIGNAL_HANDLING
bool "Enable DD signal handling for status reporting"
default y
- depends on CONFIG_DD
+ depends on DD
help
sending a SIGUSR1 signal to a running `dd' process makes it
print to standard error the number of records read and written
@@ -127,22 +127,22 @@ config CONFIG_FEATURE_DD_SIGNAL_HANDLING
$ dd if=/dev/zero of=/dev/null& pid=$! $ kill -USR1 $pid; sleep 1; kill $pid
10899206+0 records in 10899206+0 records out
-config CONFIG_FEATURE_DD_IBS_OBS
+config FEATURE_DD_IBS_OBS
bool "Enable ibs, obs and conv options"
default n
- depends on CONFIG_DD
+ depends on DD
help
Enables support for writing a certain number of bytes in and out,
at a time, and performing conversions on the data stream.
-config CONFIG_DF
+config DF
bool "df"
default n
help
df reports the amount of disk space used and available
on filesystems.
-config CONFIG_DIFF
+config DIFF
bool "diff"
default n
help
@@ -150,81 +150,81 @@ config CONFIG_DIFF
differences between them in a form that can be given to
the patch command.
-config CONFIG_FEATURE_DIFF_BINARY
+config FEATURE_DIFF_BINARY
bool "Enable checks for binary files"
default y
- depends on CONFIG_DIFF
+ depends on DIFF
help
This option enables support for checking for binary files
before a comparison is carried out.
-config CONFIG_FEATURE_DIFF_DIR
+config FEATURE_DIFF_DIR
bool "Enable directory support"
default y
- depends on CONFIG_DIFF
+ depends on DIFF
help
This option enables support for directory and subdirectory
comparison.
-config CONFIG_FEATURE_DIFF_MINIMAL
+config FEATURE_DIFF_MINIMAL
bool "Enable -d option to find smaller sets of changes"
default n
- depends on CONFIG_DIFF
+ depends on DIFF
help
Enabling this option allows the use of -d to make diff
try hard to find the smallest possible set of changes.
-config CONFIG_DIRNAME
+config DIRNAME
bool "dirname"
default n
help
dirname is used to strip a non-directory suffix from
a file name.
-config CONFIG_DOS2UNIX
+config DOS2UNIX
bool "dos2unix/unix2dos"
default n
help
dos2unix is used to convert a text file from DOS format to
UNIX format, and vice versa.
-config CONFIG_UNIX2DOS
+config UNIX2DOS
bool
default y
- depends on CONFIG_DOS2UNIX
+ depends on DOS2UNIX
help
unix2dos is used to convert a text file from UNIX format to
DOS format, and vice versa.
-config CONFIG_DU
+config DU
bool "du (default blocksize of 512 bytes)"
default n
help
du is used to report the amount of disk space used
for specified files.
-config CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
+config FEATURE_DU_DEFAULT_BLOCKSIZE_1K
bool "Use a default blocksize of 1024 bytes (1K)"
default y
- depends on CONFIG_DU
+ depends on DU
help
Use a blocksize of (1K) instead of the default 512b.
-config CONFIG_ECHO
+config ECHO
bool "echo (basic SuSv3 version taking no options)"
default n
help
echo is used to print a specified string to stdout.
# this entry also appears in shell/Config.in, next to the echo builtin
-config CONFIG_FEATURE_FANCY_ECHO
+config FEATURE_FANCY_ECHO
bool "Enable echo options (-n and -e)"
default y
- depends on CONFIG_ECHO
+ depends on ECHO
help
This adds options (-n and -e) to echo.
-config CONFIG_ENV
+config ENV
bool "env"
default n
help
@@ -232,158 +232,158 @@ config CONFIG_ENV
a command; without options it displays the current
environment.
-config CONFIG_FEATURE_ENV_LONG_OPTIONS
+config FEATURE_ENV_LONG_OPTIONS
bool "Enable long options"
default n
- depends on CONFIG_ENV && CONFIG_GETOPT_LONG
+ depends on ENV && GETOPT_LONG
help
Support long options for the env applet.
-config CONFIG_EXPR
+config EXPR
bool "expr"
default n
help
expr is used to calculate numbers and print the result
to standard output.
-config CONFIG_EXPR_MATH_SUPPORT_64
+config EXPR_MATH_SUPPORT_64
bool "Extend Posix numbers support to 64 bit"
default n
- depends on CONFIG_EXPR
+ depends on EXPR
help
Enable 64-bit math support in the expr applet. This will make
the applet slightly larger, but will allow computation with very
large numbers.
-config CONFIG_FALSE
+config FALSE
bool "false"
default n
help
false returns an exit code of FALSE (1).
-config CONFIG_FOLD
+config FOLD
bool "fold"
default n
help
Wrap text to fit a specific width.
-config CONFIG_HEAD
+config HEAD
bool "head"
default n
help
head is used to print the first specified number of lines
from files.
-config CONFIG_FEATURE_FANCY_HEAD
+config FEATURE_FANCY_HEAD
bool "Enable head options (-c, -q, and -v)"
default n
- depends on CONFIG_HEAD
+ depends on HEAD
help
This enables the head options (-c, -q, and -v).
-config CONFIG_HOSTID
+config HOSTID
bool "hostid"
default n
help
hostid prints the numeric identifier (in hexadecimal) for
the current host.
-config CONFIG_ID
+config ID
bool "id"
default n
help
id displays the current user and group ID names.
-config CONFIG_INSTALL
+config INSTALL
bool "install"
default n
help
Copy files and set attributes.
-config CONFIG_FEATURE_INSTALL_LONG_OPTIONS
+config FEATURE_INSTALL_LONG_OPTIONS
bool "Enable long options"
default n
- depends on CONFIG_INSTALL && CONFIG_GETOPT_LONG
+ depends on INSTALL && GETOPT_LONG
help
Support long options for the install applet.
-config CONFIG_LENGTH
+config LENGTH
bool "length"
default n
help
length is used to print out the length of a specified string.
-config CONFIG_LN
+config LN
bool "ln"
default n
help
ln is used to create hard or soft links between files.
-config CONFIG_LOGNAME
+config LOGNAME
bool "logname"
default n
help
logname is used to print the current user's login name.
-config CONFIG_LS
+config LS
bool "ls"
default n
help
ls is used to list the contents of directories.
-config CONFIG_FEATURE_LS_FILETYPES
+config FEATURE_LS_FILETYPES
bool "Enable filetyping options (-p and -F)"
default y
- depends on CONFIG_LS
+ depends on LS
help
Enable the ls options (-p and -F).
-config CONFIG_FEATURE_LS_FOLLOWLINKS
+config FEATURE_LS_FOLLOWLINKS
bool "Enable symlinks dereferencing (-L)"
default y
- depends on CONFIG_LS
+ depends on LS
help
Enable the ls option (-L).
-config CONFIG_FEATURE_LS_RECURSIVE
+config FEATURE_LS_RECURSIVE
bool "Enable recursion (-R)"
default y
- depends on CONFIG_LS
+ depends on LS
help
Enable the ls option (-R).
-config CONFIG_FEATURE_LS_SORTFILES
+config FEATURE_LS_SORTFILES
bool "Sort the file names"
default y
- depends on CONFIG_LS
+ depends on LS
help
Allow ls to sort file names alphabetically.
-config CONFIG_FEATURE_LS_TIMESTAMPS
+config FEATURE_LS_TIMESTAMPS
bool "Show file timestamps"
default y
- depends on CONFIG_LS
+ depends on LS
help
Allow ls to display timestamps for files.
-config CONFIG_FEATURE_LS_USERNAME
+config FEATURE_LS_USERNAME
bool "Show username/groupnames"
default y
- depends on CONFIG_LS
+ depends on LS
help
Allow ls to display username/groupname for files.
-config CONFIG_FEATURE_LS_COLOR
+config FEATURE_LS_COLOR
bool "Allow use of color to identify file types"
default y
- depends on CONFIG_LS && CONFIG_GETOPT_LONG
+ depends on LS && GETOPT_LONG
help
This enables the --color option to ls.
-config CONFIG_FEATURE_LS_COLOR_IS_DEFAULT
+config FEATURE_LS_COLOR_IS_DEFAULT
bool "Produce colored ls output by default"
default n
- depends on CONFIG_FEATURE_LS_COLOR
+ depends on FEATURE_LS_COLOR
help
Saying yes here will turn coloring on by default,
even if no "--color" option is given to the ls command.
@@ -391,143 +391,143 @@ config CONFIG_FEATURE_LS_COLOR_IS_DEFAULT
configurable, and the output may not be legible on
many output screens.
-config CONFIG_MD5SUM
+config MD5SUM
bool "md5sum"
default n
help
md5sum is used to print or check MD5 checksums.
-config CONFIG_MKDIR
+config MKDIR
bool "mkdir"
default n
help
mkdir is used to create directories with the specified names.
-config CONFIG_FEATURE_MKDIR_LONG_OPTIONS
+config FEATURE_MKDIR_LONG_OPTIONS
bool "Enable long options"
default n
- depends on CONFIG_MKDIR && CONFIG_GETOPT_LONG
+ depends on MKDIR && GETOPT_LONG
help
Support long options for the mkdir applet.
-config CONFIG_MKFIFO
+config MKFIFO
bool "mkfifo"
default n
help
mkfifo is used to create FIFOs (named pipes).
The `mknod' program can also create FIFOs.
-config CONFIG_MKNOD
+config MKNOD
bool "mknod"
default n
help
mknod is used to create FIFOs or block/character special
files with the specified names.
-config CONFIG_MV
+config MV
bool "mv"
default n
help
mv is used to move or rename files or directories.
-config CONFIG_FEATURE_MV_LONG_OPTIONS
+config FEATURE_MV_LONG_OPTIONS
bool "Enable long options"
default n
- depends on CONFIG_MV && CONFIG_GETOPT_LONG
+ depends on MV && GETOPT_LONG
help
Support long options for the mv applet.
-config CONFIG_NICE
+config NICE
bool "nice"
default n
help
nice runs a program with modified scheduling priority.
-config CONFIG_NOHUP
+config NOHUP
bool "nohup"
default n
help
run a command immune to hangups, with output to a non-tty.
-config CONFIG_OD
+config OD
bool "od"
default n
help
od is used to dump binary files in octal and other formats.
-config CONFIG_PRINTENV
+config PRINTENV
bool "printenv"
default n
help
printenv is used to print all or part of environment.
-config CONFIG_PRINTF
+config PRINTF
bool "printf"
default n
help
printf is used to format and print specified strings.
It's similar to `echo' except it has more options.
-config CONFIG_PWD
+config PWD
bool "pwd"
default n
help
pwd is used to print the current directory.
-config CONFIG_REALPATH
+config REALPATH
bool "realpath"
default n
help
Return the canonicalized absolute pathname.
This isn't provided by GNU shellutils, but where else does it belong.
-config CONFIG_RM
+config RM
bool "rm"
default n
help
rm is used to remove files or directories.
-config CONFIG_RMDIR
+config RMDIR
bool "rmdir"
default n
help
rmdir is used to remove empty directories.
-config CONFIG_SEQ
+config SEQ
bool "seq"
default n
help
print a sequence of numbers
-config CONFIG_SHA1SUM
+config SHA1SUM
bool "sha1sum"
default n
help
Compute and check SHA1 message digest
-config CONFIG_SLEEP
+config SLEEP
bool "sleep (single integer arg with no suffix)"
default n
help
sleep is used to pause for a specified number of seconds,
-config CONFIG_FEATURE_FANCY_SLEEP
+config FEATURE_FANCY_SLEEP
bool "Enable multiple integer args and optional time suffixes"
default n
- depends on CONFIG_SLEEP
+ depends on SLEEP
help
Allow sleep to pause for specified minutes, hours, and days.
-config CONFIG_SORT
+config SORT
bool "sort"
default n
help
sort is used to sort lines of text in specified files.
-config CONFIG_FEATURE_SORT_BIG
+config FEATURE_SORT_BIG
bool "full SuSv3 compliant sort (Support -ktcsbdfiozgM)"
default y
- depends on CONFIG_SORT
+ depends on SORT
help
Without this, sort only supports -r, -u, and an integer version
of -n. Selecting this adds sort keys, floating point support, and
@@ -536,69 +536,69 @@ config CONFIG_FEATURE_SORT_BIG
The SuSv3 sort standard is available at:
http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html
-config CONFIG_STAT
+config STAT
bool "stat"
default n
help
display file or filesystem status.
-config CONFIG_FEATURE_STAT_FORMAT
+config FEATURE_STAT_FORMAT
bool "Enable custom formats (-c)"
default n
- depends on CONFIG_STAT
+ depends on STAT
help
Without this, stat will not support the '-c format' option where
users can pass a custom format string for output. This adds about
7k to a nonstatic build on amd64.
-config CONFIG_STTY
+config STTY
bool "stty"
default n
help
stty is used to change and print terminal line settings.
-config CONFIG_SUM
+config SUM
bool "sum"
default n
help
checksum and count the blocks in a file
-config CONFIG_SYNC
+config SYNC
bool "sync"
default n
help
sync is used to flush filesystem buffers.
-config CONFIG_TAIL
+config TAIL
bool "tail"
default n
help
tail is used to print the last specified number of lines
from files.
-config CONFIG_FEATURE_FANCY_TAIL
+config FEATURE_FANCY_TAIL
bool "Enable extra tail options (-q, -s, and -v)"
default y
- depends on CONFIG_TAIL
+ depends on TAIL
help
The options (-q, -s, and -v) are provided by GNU tail, but
are not specific in the SUSv3 standard.
-config CONFIG_TEE
+config TEE
bool "tee"
default n
help
tee is used to read from standard input and write
to standard output and files.
-config CONFIG_FEATURE_TEE_USE_BLOCK_IO
+config FEATURE_TEE_USE_BLOCK_IO
bool "Enable block i/o (larger/faster) instead of byte i/o."
default n
- depends on CONFIG_TEE
+ depends on TEE
help
Enable this option for a faster tee, at expense of size.
-config CONFIG_TEST
+config TEST
bool "test"
default n
help
@@ -606,39 +606,39 @@ config CONFIG_TEST
returning an appropriate exit code. The bash shell
has test built in, ash can build it in optionally.
-config CONFIG_FEATURE_TEST_64
+config FEATURE_TEST_64
bool "Extend test to 64 bit"
default n
- depends on CONFIG_TEST
+ depends on TEST
help
Enable 64-bit support in test.
-config CONFIG_TOUCH
+config TOUCH
bool "touch"
default n
help
touch is used to create or change the access and/or
modification timestamp of specified files.
-config CONFIG_TR
+config TR
bool "tr"
default n
help
tr is used to squeeze, and/or delete characters from standard
input, writing to standard output.
-config CONFIG_FEATURE_TR_CLASSES
+config FEATURE_TR_CLASSES
bool "Enable character classes (such as [:upper:])"
default n
- depends on CONFIG_TR
+ depends on TR
help
Enable character classes, enabling commands such as:
tr [:upper:] [:lower:] to convert input into lowercase.
-config CONFIG_FEATURE_TR_EQUIV
+config FEATURE_TR_EQUIV
bool "Enable equivalence classes"
default n
- depends on CONFIG_TR
+ depends on TR
help
Enable equivalence classes, which essentially add the enclosed
character to the current set. For instance, tr [=a=] xyz would
@@ -646,86 +646,86 @@ config CONFIG_FEATURE_TR_EQUIV
useful for cases when no other way of expressing a character
is possible.
-config CONFIG_TRUE
+config TRUE
bool "true"
default n
help
true returns an exit code of TRUE (0).
-config CONFIG_TTY
+config TTY
bool "tty"
default n
help
tty is used to print the name of the current terminal to
standard output.
-config CONFIG_UNAME
+config UNAME
bool "uname"
default n
help
uname is used to print system information.
-config CONFIG_UNIQ
+config UNIQ
bool "uniq"
default n
help
uniq is used to remove duplicate lines from a sorted file.
-config CONFIG_USLEEP
+config USLEEP
bool "usleep"
default n
help
usleep is used to pause for a specified number of microseconds.
-config CONFIG_UUDECODE
+config UUDECODE
bool "uudecode"
default n
help
uudecode is used to decode a uuencoded file.
-config CONFIG_UUENCODE
+config UUENCODE
bool "uuencode"
default n
help
uuencode is used to uuencode a file.
-config CONFIG_WATCH
+config WATCH
bool "watch"
default n
- select CONFIG_DATE
+ select DATE
help
watch is used to execute a program periodically, showing
output to the screen.
-config CONFIG_WC
+config WC
bool "wc"
default n
help
wc is used to print the number of bytes, words, and lines,
in specified files.
-config CONFIG_FEATURE_WC_LARGE
+config FEATURE_WC_LARGE
bool "Support very large files in wc"
default n
- depends on CONFIG_WC
+ depends on WC
help
Use "unsigned long long" in wc for count variables
-config CONFIG_WHO
+config WHO
bool "who"
default n
- select CONFIG_FEATURE_UTMP
+ select FEATURE_UTMP
help
who is used to show who is logged on.
-config CONFIG_WHOAMI
+config WHOAMI
bool "whoami"
default n
help
whoami is used to print the username of the current
user id (same as id -un).
-config CONFIG_YES
+config YES
bool "yes"
default n
help
@@ -733,22 +733,22 @@ config CONFIG_YES
the default string `y'.
comment "Common options for cp and mv"
- depends on CONFIG_CP || CONFIG_MV
+ depends on CP || MV
-config CONFIG_FEATURE_PRESERVE_HARDLINKS
+config FEATURE_PRESERVE_HARDLINKS
bool "Preserve hard links"
default n
- depends on CONFIG_CP || CONFIG_MV
+ depends on CP || MV
help
Allow cp and mv to preserve hard links.
comment "Common options for ls, more and telnet"
- depends on CONFIG_LS || CONFIG_MORE || CONFIG_TELNET
+ depends on LS || MORE || TELNET
-config CONFIG_FEATURE_AUTOWIDTH
+config FEATURE_AUTOWIDTH
bool "Calculate terminal & column widths"
default y
- depends on CONFIG_LS || CONFIG_MORE || CONFIG_TELNET
+ depends on LS || MORE || TELNET
help
This option allows utilities such as 'ls', 'more' and 'telnet'
to determine the width of the screen, which can allow them to
@@ -757,22 +757,22 @@ config CONFIG_FEATURE_AUTOWIDTH
primitive and will be unable to determine the current screen width.
comment "Common options for df, du, ls"
- depends on CONFIG_DF || CONFIG_DU || CONFIG_LS
+ depends on DF || DU || LS
-config CONFIG_FEATURE_HUMAN_READABLE
+config FEATURE_HUMAN_READABLE
bool "Support for human readable output (example 13k, 23M, 235G)"
default n
- depends on CONFIG_DF || CONFIG_DU || CONFIG_LS
+ depends on DF || DU || LS
help
Allow df, du, and ls to have human readable output.
comment "Common options for md5sum, sha1sum"
- depends on CONFIG_MD5SUM || CONFIG_SHA1SUM
+ depends on MD5SUM || SHA1SUM
-config CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
+config FEATURE_MD5_SHA1_SUM_CHECK
bool "Enable -c, -s and -w options"
default n
- depends on CONFIG_MD5SUM || CONFIG_SHA1SUM
+ depends on MD5SUM || SHA1SUM
help
Enabling the -c options allows files to be checked
against pre-calculated hash values.
diff --git a/coreutils/Kbuild b/coreutils/Kbuild
new file mode 100644
index 000000000..cf1718419
--- /dev/null
+++ b/coreutils/Kbuild
@@ -0,0 +1,81 @@
+# Makefile for busybox
+#
+# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
+#
+# Licensed under the GPL v2, see the file LICENSE in this tarball.
+
+libs-y += libcoreutils/
+
+lib-y:=
+lib-$(CONFIG_BASENAME) += basename.o
+lib-$(CONFIG_CAL) += cal.o
+lib-$(CONFIG_CAT) += cat.o
+lib-$(CONFIG_CATV) += catv.o
+lib-$(CONFIG_CHGRP) += chgrp.o
+lib-$(CONFIG_CHMOD) += chmod.o
+lib-$(CONFIG_CHOWN) += chown.o
+lib-$(CONFIG_CHROOT) += chroot.o
+lib-$(CONFIG_CKSUM) += cksum.o
+lib-$(CONFIG_CMP) += cmp.o
+lib-$(CONFIG_COMM) += comm.o
+lib-$(CONFIG_CP) += cp.o
+lib-$(CONFIG_CUT) += cut.o
+lib-$(CONFIG_DATE) += date.o
+lib-$(CONFIG_DD) += dd.o
+lib-$(CONFIG_DF) += df.o
+lib-$(CONFIG_DIFF) += diff.o
+lib-$(CONFIG_DIRNAME) += dirname.o
+lib-$(CONFIG_DOS2UNIX) += dos2unix.o
+lib-$(CONFIG_DU) += du.o
+lib-$(CONFIG_ECHO) += echo.o
+lib-$(CONFIG_ENV) += env.o
+lib-$(CONFIG_EXPR) += expr.o
+lib-$(CONFIG_FALSE) += false.o
+lib-$(CONFIG_FOLD) += fold.o
+lib-$(CONFIG_HEAD) += head.o
+lib-$(CONFIG_HOSTID) += hostid.o
+lib-$(CONFIG_ID) += id.o
+lib-$(CONFIG_INSTALL) += install.o
+lib-$(CONFIG_LENGTH) += length.o
+lib-$(CONFIG_LN) += ln.o
+lib-$(CONFIG_LOGNAME) += logname.o
+lib-$(CONFIG_LS) += ls.o
+lib-$(CONFIG_MD5SUM) += md5_sha1_sum.o
+lib-$(CONFIG_MKDIR) += mkdir.o
+lib-$(CONFIG_MKFIFO) += mkfifo.o
+lib-$(CONFIG_MKNOD) += mknod.o
+lib-$(CONFIG_MV) += mv.o
+lib-$(CONFIG_NICE) += nice.o
+lib-$(CONFIG_NOHUP) += nohup.o
+lib-$(CONFIG_OD) += od.o
+lib-$(CONFIG_PRINTENV) += printenv.o
+lib-$(CONFIG_PRINTF) += printf.o
+lib-$(CONFIG_PWD) += pwd.o
+lib-$(CONFIG_REALPATH) += realpath.o
+lib-$(CONFIG_RM) += rm.o
+lib-$(CONFIG_RMDIR) += rmdir.o
+lib-$(CONFIG_SEQ) += seq.o
+lib-$(CONFIG_SHA1SUM) += md5_sha1_sum.o
+lib-$(CONFIG_SLEEP) += sleep.o
+lib-$(CONFIG_SORT) += sort.o
+lib-$(CONFIG_STAT) += stat.o
+lib-$(CONFIG_STTY) += stty.o
+lib-$(CONFIG_SUM) += sum.o
+lib-$(CONFIG_SYNC) += sync.o
+lib-$(CONFIG_TAIL) += tail.o
+lib-$(CONFIG_TEE) += tee.o
+lib-$(CONFIG_TEST) += test.o
+lib-$(CONFIG_TOUCH) += touch.o
+lib-$(CONFIG_TR) += tr.o
+lib-$(CONFIG_TRUE) += true.o
+lib-$(CONFIG_TTY) += tty.o
+lib-$(CONFIG_UNAME) += uname.o
+lib-$(CONFIG_UNIQ) += uniq.o
+lib-$(CONFIG_USLEEP) += usleep.o
+lib-$(CONFIG_UUDECODE) += uudecode.o
+lib-$(CONFIG_UUENCODE) += uuencode.o
+lib-$(CONFIG_WATCH) += watch.o
+lib-$(CONFIG_WC) += wc.o
+lib-$(CONFIG_WHO) += who.o
+lib-$(CONFIG_WHOAMI) += whoami.o
+lib-$(CONFIG_YES) += yes.o
diff --git a/coreutils/Makefile b/coreutils/Makefile
deleted file mode 100644
index c29f3a934..000000000
--- a/coreutils/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-ifndef top_srcdir
-top_srcdir=..
-endif
-ifndef top_builddir
-top_builddir=..
-endif
-srcdir=$(top_srcdir)/coreutils
-SHELLUTILS_DIR:=./
-include $(top_srcdir)/Rules.mak
-include $(top_builddir)/.config
-include $(srcdir)/Makefile.in
-all: $(libraries-y)
--include $(top_builddir)/.depend
-
-clean:
- rm -f *.o *.a $(AR_TARGET)
-
diff --git a/coreutils/Makefile.in b/coreutils/Makefile.in
deleted file mode 100644
index 50c090f8d..000000000
--- a/coreutils/Makefile.in
+++ /dev/null
@@ -1,102 +0,0 @@
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-COREUTILS_AR:=coreutils.a
-ifndef $(COREUTILS_DIR)
-COREUTILS_DIR:=$(top_builddir)/coreutils/
-endif
-srcdir=$(top_srcdir)/coreutils
-
-COREUTILS-y:=
-COREUTILS-$(CONFIG_BASENAME) += basename.o
-COREUTILS-$(CONFIG_CAL) += cal.o
-COREUTILS-$(CONFIG_CAT) += cat.o
-COREUTILS-$(CONFIG_CATV) += catv.o
-COREUTILS-$(CONFIG_CHGRP) += chgrp.o
-COREUTILS-$(CONFIG_CHMOD) += chmod.o
-COREUTILS-$(CONFIG_CHOWN) += chown.o
-COREUTILS-$(CONFIG_CHROOT) += chroot.o
-COREUTILS-$(CONFIG_CKSUM) += cksum.o
-COREUTILS-$(CONFIG_CMP) += cmp.o
-COREUTILS-$(CONFIG_COMM) += comm.o
-COREUTILS-$(CONFIG_CP) += cp.o
-COREUTILS-$(CONFIG_CUT) += cut.o
-COREUTILS-$(CONFIG_DATE) += date.o
-COREUTILS-$(CONFIG_DD) += dd.o
-COREUTILS-$(CONFIG_DF) += df.o
-COREUTILS-$(CONFIG_DIFF) += diff.o
-COREUTILS-$(CONFIG_DIRNAME) += dirname.o
-COREUTILS-$(CONFIG_DOS2UNIX) += dos2unix.o
-COREUTILS-$(CONFIG_DU) += du.o
-COREUTILS-$(CONFIG_ECHO) += echo.o
-COREUTILS-$(CONFIG_ENV) += env.o
-COREUTILS-$(CONFIG_EXPR) += expr.o
-COREUTILS-$(CONFIG_FALSE) += false.o
-COREUTILS-$(CONFIG_FOLD) += fold.o
-COREUTILS-$(CONFIG_HEAD) += head.o
-COREUTILS-$(CONFIG_HOSTID) += hostid.o
-COREUTILS-$(CONFIG_ID) += id.o
-COREUTILS-$(CONFIG_INSTALL) += install.o
-COREUTILS-$(CONFIG_LENGTH) += length.o
-COREUTILS-$(CONFIG_LN) += ln.o
-COREUTILS-$(CONFIG_LOGNAME) += logname.o
-COREUTILS-$(CONFIG_LS) += ls.o
-COREUTILS-$(CONFIG_MD5SUM) += md5_sha1_sum.o
-COREUTILS-$(CONFIG_MKDIR) += mkdir.o
-COREUTILS-$(CONFIG_MKFIFO) += mkfifo.o
-COREUTILS-$(CONFIG_MKNOD) += mknod.o
-COREUTILS-$(CONFIG_MV) += mv.o
-COREUTILS-$(CONFIG_NICE) += nice.o
-COREUTILS-$(CONFIG_NOHUP) += nohup.o
-COREUTILS-$(CONFIG_OD) += od.o
-COREUTILS-$(CONFIG_PRINTENV) += printenv.o
-COREUTILS-$(CONFIG_PRINTF) += printf.o
-COREUTILS-$(CONFIG_PWD) += pwd.o
-COREUTILS-$(CONFIG_REALPATH) += realpath.o
-COREUTILS-$(CONFIG_RM) += rm.o
-COREUTILS-$(CONFIG_RMDIR) += rmdir.o
-COREUTILS-$(CONFIG_SEQ) += seq.o
-COREUTILS-$(CONFIG_SHA1SUM) += md5_sha1_sum.o
-COREUTILS-$(CONFIG_SLEEP) += sleep.o
-COREUTILS-$(CONFIG_SORT) += sort.o
-COREUTILS-$(CONFIG_STAT) += stat.o
-COREUTILS-$(CONFIG_STTY) += stty.o
-COREUTILS-$(CONFIG_SUM) += sum.o
-COREUTILS-$(CONFIG_SYNC) += sync.o
-COREUTILS-$(CONFIG_TAIL) += tail.o
-COREUTILS-$(CONFIG_TEE) += tee.o
-COREUTILS-$(CONFIG_TEST) += test.o
-COREUTILS-$(CONFIG_TOUCH) += touch.o
-COREUTILS-$(CONFIG_TR) += tr.o
-COREUTILS-$(CONFIG_TRUE) += true.o
-COREUTILS-$(CONFIG_TTY) += tty.o
-COREUTILS-$(CONFIG_UNAME) += uname.o
-COREUTILS-$(CONFIG_UNIQ) += uniq.o
-COREUTILS-$(CONFIG_USLEEP) += usleep.o
-COREUTILS-$(CONFIG_UUDECODE) += uudecode.o
-COREUTILS-$(CONFIG_UUENCODE) += uuencode.o
-COREUTILS-$(CONFIG_WATCH) += watch.o
-COREUTILS-$(CONFIG_WC) += wc.o
-COREUTILS-$(CONFIG_WHO) += who.o
-COREUTILS-$(CONFIG_WHOAMI) += whoami.o
-COREUTILS-$(CONFIG_YES) += yes.o
-
-COREUTILS-y:=$(sort $(COREUTILS-y))
-
-ifneq ($(strip $(COREUTILS-y)),)
-libraries-y+=$(COREUTILS_DIR)$(COREUTILS_AR)
-endif
-
-COREUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(COREUTILS-y))
-COREUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
-APPLET_SRC-y+=$(COREUTILS_SRC-y)
-APPLET_SRC-a+=$(COREUTILS_SRC-a)
-
-$(COREUTILS_DIR)$(COREUTILS_AR): $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y))
- $(do_ar)
-
-$(COREUTILS_DIR)%.o: $(srcdir)/%.c
- $(compile.c)
diff --git a/coreutils/diff.c b/coreutils/diff.c
index 2edcd96ca..b30aad5a7 100644
--- a/coreutils/diff.c
+++ b/coreutils/diff.c
@@ -1165,9 +1165,8 @@ int diff_main(int argc, char **argv)
llist_t *L_arg = NULL;
opt_complementary = "L::";
- cmd_flags =
- getopt32(argc, argv, "abdiL:NqrsS:tTU:wu", &L_arg, &start,
- &U_opt);
+ cmd_flags = getopt32(argc, argv, "abdiL:NqrsS:tTU:wu",
+ &L_arg, &start, &U_opt);
if (cmd_flags & FLAG_L) {
while (L_arg) {
diff --git a/coreutils/id.c b/coreutils/id.c
index dd825ab3c..9e49999cd 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -13,7 +13,6 @@
*/
#include "busybox.h"
-#include "pwd_.h"
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
diff --git a/coreutils/libcoreutils/Kbuild b/coreutils/libcoreutils/Kbuild
new file mode 100644
index 000000000..755d01f86
--- /dev/null
+++ b/coreutils/libcoreutils/Kbuild
@@ -0,0 +1,12 @@
+# Makefile for busybox
+#
+# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
+#
+# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
+
+lib-y:=
+lib-$(CONFIG_MKFIFO) += getopt_mk_fifo_nod.o
+lib-$(CONFIG_MKNOD) += getopt_mk_fifo_nod.o
+lib-$(CONFIG_INSTALL) += cp_mv_stat.o
+lib-$(CONFIG_CP) += cp_mv_stat.o
+lib-$(CONFIG_MV) += cp_mv_stat.o
diff --git a/coreutils/libcoreutils/Makefile b/coreutils/libcoreutils/Makefile
deleted file mode 100644
index fabde2d0e..000000000
--- a/coreutils/libcoreutils/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-# Makefile for busybox
-#
-# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-
-ifndef top_srcdir
-top_srcdir=../..
-endif
-ifndef top_builddir
-top_builddir=../..
-endif
-srcdir=$(top_srcdir)/coreutils/libcoreutils
-LIBCOREUTILS_DIR:=./
-include $(top_srcdir)/Rules.mak
-include $(top_builddir)/.config
-include $(srcdir)/Makefile.in
-
-all: $(libraries-y)
--include $(top_builddir)/.depend
-
-clean:
- rm -f *.o *.a $(AR_TARGET)
-
diff --git a/coreutils/libcoreutils/Makefile.in b/coreutils/libcoreutils/Makefile.in
deleted file mode 100644
index 30a38c9d9..000000000
--- a/coreutils/libcoreutils/Makefile.in
+++ /dev/null
@@ -1,39 +0,0 @@
-# Makefile for busybox
-#
-# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
-
-LIBCOREUTILS_AR:=libcoreutils.a
-ifndef $(LIBCOREUTILS_DIR)
-LIBCOREUTILS_DIR:=$(top_builddir)/coreutils/libcoreutils
-endif
-srcdir=$(top_srcdir)/coreutils/libcoreutils
-
-LIBCOREUTILS_ALL_SRC:= cp_mv_stat.c getopt_mk_fifo_nod.c
-
-LIBCOREUTILS-y:=
-LIBCOREUTILS-$(CONFIG_MKFIFO) += getopt_mk_fifo_nod.o
-LIBCOREUTILS-$(CONFIG_MKNOD) += getopt_mk_fifo_nod.o
-LIBCOREUTILS-$(CONFIG_INSTALL) += cp_mv_stat.o
-LIBCOREUTILS-$(CONFIG_CP) += cp_mv_stat.o
-LIBCOREUTILS-$(CONFIG_MV) += cp_mv_stat.o
-
-LIBCOREUTILS-y:=$(sort $(LIBCOREUTILS-y))
-
-LIBCOREUTILS_SRC-y:=$(patsubst %,$(srcdir)/%,$(subst .o,.c,$(LIBCOREUTILS-y)))
-LIBCOREUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
-LIBRARY_SRC-y+=$(LIBCOREUTILS_SRC-y)
-LIBRARY_SRC-a+=$(LIBCOREUTILS_SRC-a)
-
-ifneq ($(strip $(LIBCOREUTILS-y)),)
-libraries-y+=$(LIBCOREUTILS_DIR)/$(LIBCOREUTILS_AR)
-endif
-
-LIBCOREUTILS_OBJS=$(patsubst %,$(LIBCOREUTILS_DIR)/%, $(LIBCOREUTILS-y))
-
-$(LIBCOREUTILS_DIR)/$(LIBCOREUTILS_AR): $(patsubst %,$(LIBCOREUTILS_DIR)/%,$(LIBCOREUTILS-y))
- $(do_ar)
-
-$(LIBCOREUTILS_DIR)/%.o: $(srcdir)/%.c
- $(compile.c)