aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-05 10:17:08 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-05 10:17:08 +0000
commitc2a198d4d1552b349750a13d2c22486e99ef6270 (patch)
tree20db60b3a787cd3152160fb60206922fd5eb18ed /coreutils
parentd8cf793135eac928e653eb5178894a611aa27837 (diff)
downloadbusybox-w32-c2a198d4d1552b349750a13d2c22486e99ef6270.tar.gz
busybox-w32-c2a198d4d1552b349750a13d2c22486e99ef6270.tar.bz2
busybox-w32-c2a198d4d1552b349750a13d2c22486e99ef6270.zip
build system overhaul
git-svn-id: svn://busybox.net/trunk/busybox@16307 69ca8d6d-28ef-0310-b511-8ec308f3f277
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 @@
5 5
6menu "Coreutils" 6menu "Coreutils"
7 7
8config CONFIG_BASENAME 8config BASENAME
9 bool "basename" 9 bool "basename"
10 default n 10 default n
11 help 11 help
@@ -13,101 +13,101 @@ config CONFIG_BASENAME
13 leaving just the filename itself. Enable this option if you wish 13 leaving just the filename itself. Enable this option if you wish
14 to enable the 'basename' utility. 14 to enable the 'basename' utility.
15 15
16config CONFIG_CAL 16config CAL
17 bool "cal" 17 bool "cal"
18 default n 18 default n
19 help 19 help
20 cal is used to display a monthly calender. 20 cal is used to display a monthly calender.
21 21
22config CONFIG_CAT 22config CAT
23 bool "cat" 23 bool "cat"
24 default n 24 default n
25 help 25 help
26 cat is used to concatenate files and print them to the standard 26 cat is used to concatenate files and print them to the standard
27 output. Enable this option if you wish to enable the 'cat' utility. 27 output. Enable this option if you wish to enable the 'cat' utility.
28 28
29config CONFIG_CATV 29config CATV
30 bool "catv" 30 bool "catv"
31 default n 31 default n
32 help 32 help
33 Display nonprinting characters as escape sequences (like some 33 Display nonprinting characters as escape sequences (like some
34 implementations' cat -v option). 34 implementations' cat -v option).
35 35
36config CONFIG_CHGRP 36config CHGRP
37 bool "chgrp" 37 bool "chgrp"
38 default n 38 default n
39 help 39 help
40 chgrp is used to change the group ownership of files. 40 chgrp is used to change the group ownership of files.
41 41
42config CONFIG_CHMOD 42config CHMOD
43 bool "chmod" 43 bool "chmod"
44 default n 44 default n
45 help 45 help
46 chmod is used to change the access permission of files. 46 chmod is used to change the access permission of files.
47 47
48config CONFIG_CHOWN 48config CHOWN
49 bool "chown" 49 bool "chown"
50 default n 50 default n
51 help 51 help
52 chown is used to change the user and/or group ownership 52 chown is used to change the user and/or group ownership
53 of files. 53 of files.
54 54
55config CONFIG_CHROOT 55config CHROOT
56 bool "chroot" 56 bool "chroot"
57 default n 57 default n
58 help 58 help
59 chroot is used to change the root directory and run a command. 59 chroot is used to change the root directory and run a command.
60 The default command is `/bin/sh'. 60 The default command is `/bin/sh'.
61 61
62config CONFIG_CKSUM 62config CKSUM
63 bool "cksum" 63 bool "cksum"
64 default n 64 default n
65 help 65 help
66 cksum is used to calculate the CRC32 checksum of a file. 66 cksum is used to calculate the CRC32 checksum of a file.
67 67
68config CONFIG_CMP 68config CMP
69 bool "cmp" 69 bool "cmp"
70 default n 70 default n
71 help 71 help
72 cmp is used to compare two files and returns the result 72 cmp is used to compare two files and returns the result
73 to standard output. 73 to standard output.
74 74
75config CONFIG_COMM 75config COMM
76 bool "comm" 76 bool "comm"
77 default n 77 default n
78 help 78 help
79 comm is used to compare two files line by line and return 79 comm is used to compare two files line by line and return
80 a three-column output. 80 a three-column output.
81 81
82config CONFIG_CP 82config CP
83 bool "cp" 83 bool "cp"
84 default n 84 default n
85 help 85 help
86 cp is used to copy files and directories. 86 cp is used to copy files and directories.
87 87
88config CONFIG_CUT 88config CUT
89 bool "cut" 89 bool "cut"
90 default n 90 default n
91 help 91 help
92 cut is used to print selected parts of lines from 92 cut is used to print selected parts of lines from
93 each file to stdout. 93 each file to stdout.
94 94
95config CONFIG_DATE 95config DATE
96 bool "date" 96 bool "date"
97 default n 97 default n
98 help 98 help
99 date is used to set the system date or display the 99 date is used to set the system date or display the
100 current time in the given format. 100 current time in the given format.
101 101
102config CONFIG_FEATURE_DATE_ISOFMT 102config FEATURE_DATE_ISOFMT
103 bool "Enable ISO date format output (-I)" 103 bool "Enable ISO date format output (-I)"
104 default y 104 default y
105 depends on CONFIG_DATE 105 depends on DATE
106 help 106 help
107 Enable option (-I) to output an ISO-8601 compliant 107 Enable option (-I) to output an ISO-8601 compliant
108 date/time string. 108 date/time string.
109 109
110config CONFIG_DD 110config DD
111 bool "dd" 111 bool "dd"
112 default n 112 default n
113 help 113 help
@@ -115,10 +115,10 @@ config CONFIG_DD
115 by default) using specific input and output blocksizes, 115 by default) using specific input and output blocksizes,
116 while optionally performing conversions on it. 116 while optionally performing conversions on it.
117 117
118config CONFIG_FEATURE_DD_SIGNAL_HANDLING 118config FEATURE_DD_SIGNAL_HANDLING
119 bool "Enable DD signal handling for status reporting" 119 bool "Enable DD signal handling for status reporting"
120 default y 120 default y
121 depends on CONFIG_DD 121 depends on DD
122 help 122 help
123 sending a SIGUSR1 signal to a running `dd' process makes it 123 sending a SIGUSR1 signal to a running `dd' process makes it
124 print to standard error the number of records read and written 124 print to standard error the number of records read and written
@@ -127,22 +127,22 @@ config CONFIG_FEATURE_DD_SIGNAL_HANDLING
127 $ dd if=/dev/zero of=/dev/null& pid=$! $ kill -USR1 $pid; sleep 1; kill $pid 127 $ dd if=/dev/zero of=/dev/null& pid=$! $ kill -USR1 $pid; sleep 1; kill $pid
128 10899206+0 records in 10899206+0 records out 128 10899206+0 records in 10899206+0 records out
129 129
130config CONFIG_FEATURE_DD_IBS_OBS 130config FEATURE_DD_IBS_OBS
131 bool "Enable ibs, obs and conv options" 131 bool "Enable ibs, obs and conv options"
132 default n 132 default n
133 depends on CONFIG_DD 133 depends on DD
134 help 134 help
135 Enables support for writing a certain number of bytes in and out, 135 Enables support for writing a certain number of bytes in and out,
136 at a time, and performing conversions on the data stream. 136 at a time, and performing conversions on the data stream.
137 137
138config CONFIG_DF 138config DF
139 bool "df" 139 bool "df"
140 default n 140 default n
141 help 141 help
142 df reports the amount of disk space used and available 142 df reports the amount of disk space used and available
143 on filesystems. 143 on filesystems.
144 144
145config CONFIG_DIFF 145config DIFF
146 bool "diff" 146 bool "diff"
147 default n 147 default n
148 help 148 help
@@ -150,81 +150,81 @@ config CONFIG_DIFF
150 differences between them in a form that can be given to 150 differences between them in a form that can be given to
151 the patch command. 151 the patch command.
152 152
153config CONFIG_FEATURE_DIFF_BINARY 153config FEATURE_DIFF_BINARY
154 bool "Enable checks for binary files" 154 bool "Enable checks for binary files"
155 default y 155 default y
156 depends on CONFIG_DIFF 156 depends on DIFF
157 help 157 help
158 This option enables support for checking for binary files 158 This option enables support for checking for binary files
159 before a comparison is carried out. 159 before a comparison is carried out.
160 160
161config CONFIG_FEATURE_DIFF_DIR 161config FEATURE_DIFF_DIR
162 bool "Enable directory support" 162 bool "Enable directory support"
163 default y 163 default y
164 depends on CONFIG_DIFF 164 depends on DIFF
165 help 165 help
166 This option enables support for directory and subdirectory 166 This option enables support for directory and subdirectory
167 comparison. 167 comparison.
168 168
169config CONFIG_FEATURE_DIFF_MINIMAL 169config FEATURE_DIFF_MINIMAL
170 bool "Enable -d option to find smaller sets of changes" 170 bool "Enable -d option to find smaller sets of changes"
171 default n 171 default n
172 depends on CONFIG_DIFF 172 depends on DIFF
173 help 173 help
174 Enabling this option allows the use of -d to make diff 174 Enabling this option allows the use of -d to make diff
175 try hard to find the smallest possible set of changes. 175 try hard to find the smallest possible set of changes.
176 176
177config CONFIG_DIRNAME 177config DIRNAME
178 bool "dirname" 178 bool "dirname"
179 default n 179 default n
180 help 180 help
181 dirname is used to strip a non-directory suffix from 181 dirname is used to strip a non-directory suffix from
182 a file name. 182 a file name.
183 183
184config CONFIG_DOS2UNIX 184config DOS2UNIX
185 bool "dos2unix/unix2dos" 185 bool "dos2unix/unix2dos"
186 default n 186 default n
187 help 187 help
188 dos2unix is used to convert a text file from DOS format to 188 dos2unix is used to convert a text file from DOS format to
189 UNIX format, and vice versa. 189 UNIX format, and vice versa.
190 190
191config CONFIG_UNIX2DOS 191config UNIX2DOS
192 bool 192 bool
193 default y 193 default y
194 depends on CONFIG_DOS2UNIX 194 depends on DOS2UNIX
195 help 195 help
196 unix2dos is used to convert a text file from UNIX format to 196 unix2dos is used to convert a text file from UNIX format to
197 DOS format, and vice versa. 197 DOS format, and vice versa.
198 198
199config CONFIG_DU 199config DU
200 bool "du (default blocksize of 512 bytes)" 200 bool "du (default blocksize of 512 bytes)"
201 default n 201 default n
202 help 202 help
203 du is used to report the amount of disk space used 203 du is used to report the amount of disk space used
204 for specified files. 204 for specified files.
205 205
206config CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K 206config FEATURE_DU_DEFAULT_BLOCKSIZE_1K
207 bool "Use a default blocksize of 1024 bytes (1K)" 207 bool "Use a default blocksize of 1024 bytes (1K)"
208 default y 208 default y
209 depends on CONFIG_DU 209 depends on DU
210 help 210 help
211 Use a blocksize of (1K) instead of the default 512b. 211 Use a blocksize of (1K) instead of the default 512b.
212 212
213config CONFIG_ECHO 213config ECHO
214 bool "echo (basic SuSv3 version taking no options)" 214 bool "echo (basic SuSv3 version taking no options)"
215 default n 215 default n
216 help 216 help
217 echo is used to print a specified string to stdout. 217 echo is used to print a specified string to stdout.
218 218
219# this entry also appears in shell/Config.in, next to the echo builtin 219# this entry also appears in shell/Config.in, next to the echo builtin
220config CONFIG_FEATURE_FANCY_ECHO 220config FEATURE_FANCY_ECHO
221 bool "Enable echo options (-n and -e)" 221 bool "Enable echo options (-n and -e)"
222 default y 222 default y
223 depends on CONFIG_ECHO 223 depends on ECHO
224 help 224 help
225 This adds options (-n and -e) to echo. 225 This adds options (-n and -e) to echo.
226 226
227config CONFIG_ENV 227config ENV
228 bool "env" 228 bool "env"
229 default n 229 default n
230 help 230 help
@@ -232,158 +232,158 @@ config CONFIG_ENV
232 a command; without options it displays the current 232 a command; without options it displays the current
233 environment. 233 environment.
234 234
235config CONFIG_FEATURE_ENV_LONG_OPTIONS 235config FEATURE_ENV_LONG_OPTIONS
236 bool "Enable long options" 236 bool "Enable long options"
237 default n 237 default n
238 depends on CONFIG_ENV && CONFIG_GETOPT_LONG 238 depends on ENV && GETOPT_LONG
239 help 239 help
240 Support long options for the env applet. 240 Support long options for the env applet.
241 241
242config CONFIG_EXPR 242config EXPR
243 bool "expr" 243 bool "expr"
244 default n 244 default n
245 help 245 help
246 expr is used to calculate numbers and print the result 246 expr is used to calculate numbers and print the result
247 to standard output. 247 to standard output.
248 248
249config CONFIG_EXPR_MATH_SUPPORT_64 249config EXPR_MATH_SUPPORT_64
250 bool "Extend Posix numbers support to 64 bit" 250 bool "Extend Posix numbers support to 64 bit"
251 default n 251 default n
252 depends on CONFIG_EXPR 252 depends on EXPR
253 help 253 help
254 Enable 64-bit math support in the expr applet. This will make 254 Enable 64-bit math support in the expr applet. This will make
255 the applet slightly larger, but will allow computation with very 255 the applet slightly larger, but will allow computation with very
256 large numbers. 256 large numbers.
257 257
258config CONFIG_FALSE 258config FALSE
259 bool "false" 259 bool "false"
260 default n 260 default n
261 help 261 help
262 false returns an exit code of FALSE (1). 262 false returns an exit code of FALSE (1).
263 263
264config CONFIG_FOLD 264config FOLD
265 bool "fold" 265 bool "fold"
266 default n 266 default n
267 help 267 help
268 Wrap text to fit a specific width. 268 Wrap text to fit a specific width.
269 269
270config CONFIG_HEAD 270config HEAD
271 bool "head" 271 bool "head"
272 default n 272 default n
273 help 273 help
274 head is used to print the first specified number of lines 274 head is used to print the first specified number of lines
275 from files. 275 from files.
276 276
277config CONFIG_FEATURE_FANCY_HEAD 277config FEATURE_FANCY_HEAD
278 bool "Enable head options (-c, -q, and -v)" 278 bool "Enable head options (-c, -q, and -v)"
279 default n 279 default n
280 depends on CONFIG_HEAD 280 depends on HEAD
281 help 281 help
282 This enables the head options (-c, -q, and -v). 282 This enables the head options (-c, -q, and -v).
283 283
284config CONFIG_HOSTID 284config HOSTID
285 bool "hostid" 285 bool "hostid"
286 default n 286 default n
287 help 287 help
288 hostid prints the numeric identifier (in hexadecimal) for 288 hostid prints the numeric identifier (in hexadecimal) for
289 the current host. 289 the current host.
290 290
291config CONFIG_ID 291config ID
292 bool "id" 292 bool "id"
293 default n 293 default n
294 help 294 help
295 id displays the current user and group ID names. 295 id displays the current user and group ID names.
296 296
297config CONFIG_INSTALL 297config INSTALL
298 bool "install" 298 bool "install"
299 default n 299 default n
300 help 300 help
301 Copy files and set attributes. 301 Copy files and set attributes.
302 302
303config CONFIG_FEATURE_INSTALL_LONG_OPTIONS 303config FEATURE_INSTALL_LONG_OPTIONS
304 bool "Enable long options" 304 bool "Enable long options"
305 default n 305 default n
306 depends on CONFIG_INSTALL && CONFIG_GETOPT_LONG 306 depends on INSTALL && GETOPT_LONG
307 help 307 help
308 Support long options for the install applet. 308 Support long options for the install applet.
309 309
310config CONFIG_LENGTH 310config LENGTH
311 bool "length" 311 bool "length"
312 default n 312 default n
313 help 313 help
314 length is used to print out the length of a specified string. 314 length is used to print out the length of a specified string.
315 315
316config CONFIG_LN 316config LN
317 bool "ln" 317 bool "ln"
318 default n 318 default n
319 help 319 help
320 ln is used to create hard or soft links between files. 320 ln is used to create hard or soft links between files.
321 321
322config CONFIG_LOGNAME 322config LOGNAME
323 bool "logname" 323 bool "logname"
324 default n 324 default n
325 help 325 help
326 logname is used to print the current user's login name. 326 logname is used to print the current user's login name.
327 327
328config CONFIG_LS 328config LS
329 bool "ls" 329 bool "ls"
330 default n 330 default n
331 help 331 help
332 ls is used to list the contents of directories. 332 ls is used to list the contents of directories.
333 333
334config CONFIG_FEATURE_LS_FILETYPES 334config FEATURE_LS_FILETYPES
335 bool "Enable filetyping options (-p and -F)" 335 bool "Enable filetyping options (-p and -F)"
336 default y 336 default y
337 depends on CONFIG_LS 337 depends on LS
338 help 338 help
339 Enable the ls options (-p and -F). 339 Enable the ls options (-p and -F).
340 340
341config CONFIG_FEATURE_LS_FOLLOWLINKS 341config FEATURE_LS_FOLLOWLINKS
342 bool "Enable symlinks dereferencing (-L)" 342 bool "Enable symlinks dereferencing (-L)"
343 default y 343 default y
344 depends on CONFIG_LS 344 depends on LS
345 help 345 help
346 Enable the ls option (-L). 346 Enable the ls option (-L).
347 347
348config CONFIG_FEATURE_LS_RECURSIVE 348config FEATURE_LS_RECURSIVE
349 bool "Enable recursion (-R)" 349 bool "Enable recursion (-R)"
350 default y 350 default y
351 depends on CONFIG_LS 351 depends on LS
352 help 352 help
353 Enable the ls option (-R). 353 Enable the ls option (-R).
354 354
355config CONFIG_FEATURE_LS_SORTFILES 355config FEATURE_LS_SORTFILES
356 bool "Sort the file names" 356 bool "Sort the file names"
357 default y 357 default y
358 depends on CONFIG_LS 358 depends on LS
359 help 359 help
360 Allow ls to sort file names alphabetically. 360 Allow ls to sort file names alphabetically.
361 361
362config CONFIG_FEATURE_LS_TIMESTAMPS 362config FEATURE_LS_TIMESTAMPS
363 bool "Show file timestamps" 363 bool "Show file timestamps"
364 default y 364 default y
365 depends on CONFIG_LS 365 depends on LS
366 help 366 help
367 Allow ls to display timestamps for files. 367 Allow ls to display timestamps for files.
368 368
369config CONFIG_FEATURE_LS_USERNAME 369config FEATURE_LS_USERNAME
370 bool "Show username/groupnames" 370 bool "Show username/groupnames"
371 default y 371 default y
372 depends on CONFIG_LS 372 depends on LS
373 help 373 help
374 Allow ls to display username/groupname for files. 374 Allow ls to display username/groupname for files.
375 375
376config CONFIG_FEATURE_LS_COLOR 376config FEATURE_LS_COLOR
377 bool "Allow use of color to identify file types" 377 bool "Allow use of color to identify file types"
378 default y 378 default y
379 depends on CONFIG_LS && CONFIG_GETOPT_LONG 379 depends on LS && GETOPT_LONG
380 help 380 help
381 This enables the --color option to ls. 381 This enables the --color option to ls.
382 382
383config CONFIG_FEATURE_LS_COLOR_IS_DEFAULT 383config FEATURE_LS_COLOR_IS_DEFAULT
384 bool "Produce colored ls output by default" 384 bool "Produce colored ls output by default"
385 default n 385 default n
386 depends on CONFIG_FEATURE_LS_COLOR 386 depends on FEATURE_LS_COLOR
387 help 387 help
388 Saying yes here will turn coloring on by default, 388 Saying yes here will turn coloring on by default,
389 even if no "--color" option is given to the ls command. 389 even if no "--color" option is given to the ls command.
@@ -391,143 +391,143 @@ config CONFIG_FEATURE_LS_COLOR_IS_DEFAULT
391 configurable, and the output may not be legible on 391 configurable, and the output may not be legible on
392 many output screens. 392 many output screens.
393 393
394config CONFIG_MD5SUM 394config MD5SUM
395 bool "md5sum" 395 bool "md5sum"
396 default n 396 default n
397 help 397 help
398 md5sum is used to print or check MD5 checksums. 398 md5sum is used to print or check MD5 checksums.
399 399
400config CONFIG_MKDIR 400config MKDIR
401 bool "mkdir" 401 bool "mkdir"
402 default n 402 default n
403 help 403 help
404 mkdir is used to create directories with the specified names. 404 mkdir is used to create directories with the specified names.
405 405
406config CONFIG_FEATURE_MKDIR_LONG_OPTIONS 406config FEATURE_MKDIR_LONG_OPTIONS
407 bool "Enable long options" 407 bool "Enable long options"
408 default n 408 default n
409 depends on CONFIG_MKDIR && CONFIG_GETOPT_LONG 409 depends on MKDIR && GETOPT_LONG
410 help 410 help
411 Support long options for the mkdir applet. 411 Support long options for the mkdir applet.
412 412
413config CONFIG_MKFIFO 413config MKFIFO
414 bool "mkfifo" 414 bool "mkfifo"
415 default n 415 default n
416 help 416 help
417 mkfifo is used to create FIFOs (named pipes). 417 mkfifo is used to create FIFOs (named pipes).
418 The `mknod' program can also create FIFOs. 418 The `mknod' program can also create FIFOs.
419 419
420config CONFIG_MKNOD 420config MKNOD
421 bool "mknod" 421 bool "mknod"
422 default n 422 default n
423 help 423 help
424 mknod is used to create FIFOs or block/character special 424 mknod is used to create FIFOs or block/character special
425 files with the specified names. 425 files with the specified names.
426 426
427config CONFIG_MV 427config MV
428 bool "mv" 428 bool "mv"
429 default n 429 default n
430 help 430 help
431 mv is used to move or rename files or directories. 431 mv is used to move or rename files or directories.
432 432
433config CONFIG_FEATURE_MV_LONG_OPTIONS 433config FEATURE_MV_LONG_OPTIONS
434 bool "Enable long options" 434 bool "Enable long options"
435 default n 435 default n
436 depends on CONFIG_MV && CONFIG_GETOPT_LONG 436 depends on MV && GETOPT_LONG
437 help 437 help
438 Support long options for the mv applet. 438 Support long options for the mv applet.
439 439
440config CONFIG_NICE 440config NICE
441 bool "nice" 441 bool "nice"
442 default n 442 default n
443 help 443 help
444 nice runs a program with modified scheduling priority. 444 nice runs a program with modified scheduling priority.
445 445
446config CONFIG_NOHUP 446config NOHUP
447 bool "nohup" 447 bool "nohup"
448 default n 448 default n
449 help 449 help
450 run a command immune to hangups, with output to a non-tty. 450 run a command immune to hangups, with output to a non-tty.
451 451
452config CONFIG_OD 452config OD
453 bool "od" 453 bool "od"
454 default n 454 default n
455 help 455 help
456 od is used to dump binary files in octal and other formats. 456 od is used to dump binary files in octal and other formats.
457 457
458config CONFIG_PRINTENV 458config PRINTENV
459 bool "printenv" 459 bool "printenv"
460 default n 460 default n
461 help 461 help
462 printenv is used to print all or part of environment. 462 printenv is used to print all or part of environment.
463 463
464config CONFIG_PRINTF 464config PRINTF
465 bool "printf" 465 bool "printf"
466 default n 466 default n
467 help 467 help
468 printf is used to format and print specified strings. 468 printf is used to format and print specified strings.
469 It's similar to `echo' except it has more options. 469 It's similar to `echo' except it has more options.
470 470
471config CONFIG_PWD 471config PWD
472 bool "pwd" 472 bool "pwd"
473 default n 473 default n
474 help 474 help
475 pwd is used to print the current directory. 475 pwd is used to print the current directory.
476 476
477config CONFIG_REALPATH 477config REALPATH
478 bool "realpath" 478 bool "realpath"
479 default n 479 default n
480 help 480 help
481 Return the canonicalized absolute pathname. 481 Return the canonicalized absolute pathname.
482 This isn't provided by GNU shellutils, but where else does it belong. 482 This isn't provided by GNU shellutils, but where else does it belong.
483 483
484config CONFIG_RM 484config RM
485 bool "rm" 485 bool "rm"
486 default n 486 default n
487 help 487 help
488 rm is used to remove files or directories. 488 rm is used to remove files or directories.
489 489
490config CONFIG_RMDIR 490config RMDIR
491 bool "rmdir" 491 bool "rmdir"
492 default n 492 default n
493 help 493 help
494 rmdir is used to remove empty directories. 494 rmdir is used to remove empty directories.
495 495
496config CONFIG_SEQ 496config SEQ
497 bool "seq" 497 bool "seq"
498 default n 498 default n
499 help 499 help
500 print a sequence of numbers 500 print a sequence of numbers
501 501
502config CONFIG_SHA1SUM 502config SHA1SUM
503 bool "sha1sum" 503 bool "sha1sum"
504 default n 504 default n
505 help 505 help
506 Compute and check SHA1 message digest 506 Compute and check SHA1 message digest
507 507
508config CONFIG_SLEEP 508config SLEEP
509 bool "sleep (single integer arg with no suffix)" 509 bool "sleep (single integer arg with no suffix)"
510 default n 510 default n
511 help 511 help
512 sleep is used to pause for a specified number of seconds, 512 sleep is used to pause for a specified number of seconds,
513 513
514config CONFIG_FEATURE_FANCY_SLEEP 514config FEATURE_FANCY_SLEEP
515 bool "Enable multiple integer args and optional time suffixes" 515 bool "Enable multiple integer args and optional time suffixes"
516 default n 516 default n
517 depends on CONFIG_SLEEP 517 depends on SLEEP
518 help 518 help
519 Allow sleep to pause for specified minutes, hours, and days. 519 Allow sleep to pause for specified minutes, hours, and days.
520 520
521config CONFIG_SORT 521config SORT
522 bool "sort" 522 bool "sort"
523 default n 523 default n
524 help 524 help
525 sort is used to sort lines of text in specified files. 525 sort is used to sort lines of text in specified files.
526 526
527config CONFIG_FEATURE_SORT_BIG 527config FEATURE_SORT_BIG
528 bool "full SuSv3 compliant sort (Support -ktcsbdfiozgM)" 528 bool "full SuSv3 compliant sort (Support -ktcsbdfiozgM)"
529 default y 529 default y
530 depends on CONFIG_SORT 530 depends on SORT
531 help 531 help
532 Without this, sort only supports -r, -u, and an integer version 532 Without this, sort only supports -r, -u, and an integer version
533 of -n. Selecting this adds sort keys, floating point support, and 533 of -n. Selecting this adds sort keys, floating point support, and
@@ -536,69 +536,69 @@ config CONFIG_FEATURE_SORT_BIG
536 The SuSv3 sort standard is available at: 536 The SuSv3 sort standard is available at:
537 http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html 537 http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html
538 538
539config CONFIG_STAT 539config STAT
540 bool "stat" 540 bool "stat"
541 default n 541 default n
542 help 542 help
543 display file or filesystem status. 543 display file or filesystem status.
544 544
545config CONFIG_FEATURE_STAT_FORMAT 545config FEATURE_STAT_FORMAT
546 bool "Enable custom formats (-c)" 546 bool "Enable custom formats (-c)"
547 default n 547 default n
548 depends on CONFIG_STAT 548 depends on STAT
549 help 549 help
550 Without this, stat will not support the '-c format' option where 550 Without this, stat will not support the '-c format' option where
551 users can pass a custom format string for output. This adds about 551 users can pass a custom format string for output. This adds about
552 7k to a nonstatic build on amd64. 552 7k to a nonstatic build on amd64.
553 553
554config CONFIG_STTY 554config STTY
555 bool "stty" 555 bool "stty"
556 default n 556 default n
557 help 557 help
558 stty is used to change and print terminal line settings. 558 stty is used to change and print terminal line settings.
559 559
560config CONFIG_SUM 560config SUM
561 bool "sum" 561 bool "sum"
562 default n 562 default n
563 help 563 help
564 checksum and count the blocks in a file 564 checksum and count the blocks in a file
565 565
566config CONFIG_SYNC 566config SYNC
567 bool "sync" 567 bool "sync"
568 default n 568 default n
569 help 569 help
570 sync is used to flush filesystem buffers. 570 sync is used to flush filesystem buffers.
571 571
572config CONFIG_TAIL 572config TAIL
573 bool "tail" 573 bool "tail"
574 default n 574 default n
575 help 575 help
576 tail is used to print the last specified number of lines 576 tail is used to print the last specified number of lines
577 from files. 577 from files.
578 578
579config CONFIG_FEATURE_FANCY_TAIL 579config FEATURE_FANCY_TAIL
580 bool "Enable extra tail options (-q, -s, and -v)" 580 bool "Enable extra tail options (-q, -s, and -v)"
581 default y 581 default y
582 depends on CONFIG_TAIL 582 depends on TAIL
583 help 583 help
584 The options (-q, -s, and -v) are provided by GNU tail, but 584 The options (-q, -s, and -v) are provided by GNU tail, but
585 are not specific in the SUSv3 standard. 585 are not specific in the SUSv3 standard.
586 586
587config CONFIG_TEE 587config TEE
588 bool "tee" 588 bool "tee"
589 default n 589 default n
590 help 590 help
591 tee is used to read from standard input and write 591 tee is used to read from standard input and write
592 to standard output and files. 592 to standard output and files.
593 593
594config CONFIG_FEATURE_TEE_USE_BLOCK_IO 594config FEATURE_TEE_USE_BLOCK_IO
595 bool "Enable block i/o (larger/faster) instead of byte i/o." 595 bool "Enable block i/o (larger/faster) instead of byte i/o."
596 default n 596 default n
597 depends on CONFIG_TEE 597 depends on TEE
598 help 598 help
599 Enable this option for a faster tee, at expense of size. 599 Enable this option for a faster tee, at expense of size.
600 600
601config CONFIG_TEST 601config TEST
602 bool "test" 602 bool "test"
603 default n 603 default n
604 help 604 help
@@ -606,39 +606,39 @@ config CONFIG_TEST
606 returning an appropriate exit code. The bash shell 606 returning an appropriate exit code. The bash shell
607 has test built in, ash can build it in optionally. 607 has test built in, ash can build it in optionally.
608 608
609config CONFIG_FEATURE_TEST_64 609config FEATURE_TEST_64
610 bool "Extend test to 64 bit" 610 bool "Extend test to 64 bit"
611 default n 611 default n
612 depends on CONFIG_TEST 612 depends on TEST
613 help 613 help
614 Enable 64-bit support in test. 614 Enable 64-bit support in test.
615 615
616config CONFIG_TOUCH 616config TOUCH
617 bool "touch" 617 bool "touch"
618 default n 618 default n
619 help 619 help
620 touch is used to create or change the access and/or 620 touch is used to create or change the access and/or
621 modification timestamp of specified files. 621 modification timestamp of specified files.
622 622
623config CONFIG_TR 623config TR
624 bool "tr" 624 bool "tr"
625 default n 625 default n
626 help 626 help
627 tr is used to squeeze, and/or delete characters from standard 627 tr is used to squeeze, and/or delete characters from standard
628 input, writing to standard output. 628 input, writing to standard output.
629 629
630config CONFIG_FEATURE_TR_CLASSES 630config FEATURE_TR_CLASSES
631 bool "Enable character classes (such as [:upper:])" 631 bool "Enable character classes (such as [:upper:])"
632 default n 632 default n
633 depends on CONFIG_TR 633 depends on TR
634 help 634 help
635 Enable character classes, enabling commands such as: 635 Enable character classes, enabling commands such as:
636 tr [:upper:] [:lower:] to convert input into lowercase. 636 tr [:upper:] [:lower:] to convert input into lowercase.
637 637
638config CONFIG_FEATURE_TR_EQUIV 638config FEATURE_TR_EQUIV
639 bool "Enable equivalence classes" 639 bool "Enable equivalence classes"
640 default n 640 default n
641 depends on CONFIG_TR 641 depends on TR
642 help 642 help
643 Enable equivalence classes, which essentially add the enclosed 643 Enable equivalence classes, which essentially add the enclosed
644 character to the current set. For instance, tr [=a=] xyz would 644 character to the current set. For instance, tr [=a=] xyz would
@@ -646,86 +646,86 @@ config CONFIG_FEATURE_TR_EQUIV
646 useful for cases when no other way of expressing a character 646 useful for cases when no other way of expressing a character
647 is possible. 647 is possible.
648 648
649config CONFIG_TRUE 649config TRUE
650 bool "true" 650 bool "true"
651 default n 651 default n
652 help 652 help
653 true returns an exit code of TRUE (0). 653 true returns an exit code of TRUE (0).
654 654
655config CONFIG_TTY 655config TTY
656 bool "tty" 656 bool "tty"
657 default n 657 default n
658 help 658 help
659 tty is used to print the name of the current terminal to 659 tty is used to print the name of the current terminal to
660 standard output. 660 standard output.
661 661
662config CONFIG_UNAME 662config UNAME
663 bool "uname" 663 bool "uname"
664 default n 664 default n
665 help 665 help
666 uname is used to print system information. 666 uname is used to print system information.
667 667
668config CONFIG_UNIQ 668config UNIQ
669 bool "uniq" 669 bool "uniq"
670 default n 670 default n
671 help 671 help
672 uniq is used to remove duplicate lines from a sorted file. 672 uniq is used to remove duplicate lines from a sorted file.
673 673
674config CONFIG_USLEEP 674config USLEEP
675 bool "usleep" 675 bool "usleep"
676 default n 676 default n
677 help 677 help
678 usleep is used to pause for a specified number of microseconds. 678 usleep is used to pause for a specified number of microseconds.
679 679
680config CONFIG_UUDECODE 680config UUDECODE
681 bool "uudecode" 681 bool "uudecode"
682 default n 682 default n
683 help 683 help
684 uudecode is used to decode a uuencoded file. 684 uudecode is used to decode a uuencoded file.
685 685
686config CONFIG_UUENCODE 686config UUENCODE
687 bool "uuencode" 687 bool "uuencode"
688 default n 688 default n
689 help 689 help
690 uuencode is used to uuencode a file. 690 uuencode is used to uuencode a file.
691 691
692config CONFIG_WATCH 692config WATCH
693 bool "watch" 693 bool "watch"
694 default n 694 default n
695 select CONFIG_DATE 695 select DATE
696 help 696 help
697 watch is used to execute a program periodically, showing 697 watch is used to execute a program periodically, showing
698 output to the screen. 698 output to the screen.
699 699
700config CONFIG_WC 700config WC
701 bool "wc" 701 bool "wc"
702 default n 702 default n
703 help 703 help
704 wc is used to print the number of bytes, words, and lines, 704 wc is used to print the number of bytes, words, and lines,
705 in specified files. 705 in specified files.
706 706
707config CONFIG_FEATURE_WC_LARGE 707config FEATURE_WC_LARGE
708 bool "Support very large files in wc" 708 bool "Support very large files in wc"
709 default n 709 default n
710 depends on CONFIG_WC 710 depends on WC
711 help 711 help
712 Use "unsigned long long" in wc for count variables 712 Use "unsigned long long" in wc for count variables
713 713
714config CONFIG_WHO 714config WHO
715 bool "who" 715 bool "who"
716 default n 716 default n
717 select CONFIG_FEATURE_UTMP 717 select FEATURE_UTMP
718 help 718 help
719 who is used to show who is logged on. 719 who is used to show who is logged on.
720 720
721config CONFIG_WHOAMI 721config WHOAMI
722 bool "whoami" 722 bool "whoami"
723 default n 723 default n
724 help 724 help
725 whoami is used to print the username of the current 725 whoami is used to print the username of the current
726 user id (same as id -un). 726 user id (same as id -un).
727 727
728config CONFIG_YES 728config YES
729 bool "yes" 729 bool "yes"
730 default n 730 default n
731 help 731 help
@@ -733,22 +733,22 @@ config CONFIG_YES
733 the default string `y'. 733 the default string `y'.
734 734
735comment "Common options for cp and mv" 735comment "Common options for cp and mv"
736 depends on CONFIG_CP || CONFIG_MV 736 depends on CP || MV
737 737
738config CONFIG_FEATURE_PRESERVE_HARDLINKS 738config FEATURE_PRESERVE_HARDLINKS
739 bool "Preserve hard links" 739 bool "Preserve hard links"
740 default n 740 default n
741 depends on CONFIG_CP || CONFIG_MV 741 depends on CP || MV
742 help 742 help
743 Allow cp and mv to preserve hard links. 743 Allow cp and mv to preserve hard links.
744 744
745comment "Common options for ls, more and telnet" 745comment "Common options for ls, more and telnet"
746 depends on CONFIG_LS || CONFIG_MORE || CONFIG_TELNET 746 depends on LS || MORE || TELNET
747 747
748config CONFIG_FEATURE_AUTOWIDTH 748config FEATURE_AUTOWIDTH
749 bool "Calculate terminal & column widths" 749 bool "Calculate terminal & column widths"
750 default y 750 default y
751 depends on CONFIG_LS || CONFIG_MORE || CONFIG_TELNET 751 depends on LS || MORE || TELNET
752 help 752 help
753 This option allows utilities such as 'ls', 'more' and 'telnet' 753 This option allows utilities such as 'ls', 'more' and 'telnet'
754 to determine the width of the screen, which can allow them to 754 to determine the width of the screen, which can allow them to
@@ -757,22 +757,22 @@ config CONFIG_FEATURE_AUTOWIDTH
757 primitive and will be unable to determine the current screen width. 757 primitive and will be unable to determine the current screen width.
758 758
759comment "Common options for df, du, ls" 759comment "Common options for df, du, ls"
760 depends on CONFIG_DF || CONFIG_DU || CONFIG_LS 760 depends on DF || DU || LS
761 761
762config CONFIG_FEATURE_HUMAN_READABLE 762config FEATURE_HUMAN_READABLE
763 bool "Support for human readable output (example 13k, 23M, 235G)" 763 bool "Support for human readable output (example 13k, 23M, 235G)"
764 default n 764 default n
765 depends on CONFIG_DF || CONFIG_DU || CONFIG_LS 765 depends on DF || DU || LS
766 help 766 help
767 Allow df, du, and ls to have human readable output. 767 Allow df, du, and ls to have human readable output.
768 768
769comment "Common options for md5sum, sha1sum" 769comment "Common options for md5sum, sha1sum"
770 depends on CONFIG_MD5SUM || CONFIG_SHA1SUM 770 depends on MD5SUM || SHA1SUM
771 771
772config CONFIG_FEATURE_MD5_SHA1_SUM_CHECK 772config FEATURE_MD5_SHA1_SUM_CHECK
773 bool "Enable -c, -s and -w options" 773 bool "Enable -c, -s and -w options"
774 default n 774 default n
775 depends on CONFIG_MD5SUM || CONFIG_SHA1SUM 775 depends on MD5SUM || SHA1SUM
776 help 776 help
777 Enabling the -c options allows files to be checked 777 Enabling the -c options allows files to be checked
778 against pre-calculated hash values. 778 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 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7libs-y += libcoreutils/
8
9lib-y:=
10lib-$(CONFIG_BASENAME) += basename.o
11lib-$(CONFIG_CAL) += cal.o
12lib-$(CONFIG_CAT) += cat.o
13lib-$(CONFIG_CATV) += catv.o
14lib-$(CONFIG_CHGRP) += chgrp.o
15lib-$(CONFIG_CHMOD) += chmod.o
16lib-$(CONFIG_CHOWN) += chown.o
17lib-$(CONFIG_CHROOT) += chroot.o
18lib-$(CONFIG_CKSUM) += cksum.o
19lib-$(CONFIG_CMP) += cmp.o
20lib-$(CONFIG_COMM) += comm.o
21lib-$(CONFIG_CP) += cp.o
22lib-$(CONFIG_CUT) += cut.o
23lib-$(CONFIG_DATE) += date.o
24lib-$(CONFIG_DD) += dd.o
25lib-$(CONFIG_DF) += df.o
26lib-$(CONFIG_DIFF) += diff.o
27lib-$(CONFIG_DIRNAME) += dirname.o
28lib-$(CONFIG_DOS2UNIX) += dos2unix.o
29lib-$(CONFIG_DU) += du.o
30lib-$(CONFIG_ECHO) += echo.o
31lib-$(CONFIG_ENV) += env.o
32lib-$(CONFIG_EXPR) += expr.o
33lib-$(CONFIG_FALSE) += false.o
34lib-$(CONFIG_FOLD) += fold.o
35lib-$(CONFIG_HEAD) += head.o
36lib-$(CONFIG_HOSTID) += hostid.o
37lib-$(CONFIG_ID) += id.o
38lib-$(CONFIG_INSTALL) += install.o
39lib-$(CONFIG_LENGTH) += length.o
40lib-$(CONFIG_LN) += ln.o
41lib-$(CONFIG_LOGNAME) += logname.o
42lib-$(CONFIG_LS) += ls.o
43lib-$(CONFIG_MD5SUM) += md5_sha1_sum.o
44lib-$(CONFIG_MKDIR) += mkdir.o
45lib-$(CONFIG_MKFIFO) += mkfifo.o
46lib-$(CONFIG_MKNOD) += mknod.o
47lib-$(CONFIG_MV) += mv.o
48lib-$(CONFIG_NICE) += nice.o
49lib-$(CONFIG_NOHUP) += nohup.o
50lib-$(CONFIG_OD) += od.o
51lib-$(CONFIG_PRINTENV) += printenv.o
52lib-$(CONFIG_PRINTF) += printf.o
53lib-$(CONFIG_PWD) += pwd.o
54lib-$(CONFIG_REALPATH) += realpath.o
55lib-$(CONFIG_RM) += rm.o
56lib-$(CONFIG_RMDIR) += rmdir.o
57lib-$(CONFIG_SEQ) += seq.o
58lib-$(CONFIG_SHA1SUM) += md5_sha1_sum.o
59lib-$(CONFIG_SLEEP) += sleep.o
60lib-$(CONFIG_SORT) += sort.o
61lib-$(CONFIG_STAT) += stat.o
62lib-$(CONFIG_STTY) += stty.o
63lib-$(CONFIG_SUM) += sum.o
64lib-$(CONFIG_SYNC) += sync.o
65lib-$(CONFIG_TAIL) += tail.o
66lib-$(CONFIG_TEE) += tee.o
67lib-$(CONFIG_TEST) += test.o
68lib-$(CONFIG_TOUCH) += touch.o
69lib-$(CONFIG_TR) += tr.o
70lib-$(CONFIG_TRUE) += true.o
71lib-$(CONFIG_TTY) += tty.o
72lib-$(CONFIG_UNAME) += uname.o
73lib-$(CONFIG_UNIQ) += uniq.o
74lib-$(CONFIG_USLEEP) += usleep.o
75lib-$(CONFIG_UUDECODE) += uudecode.o
76lib-$(CONFIG_UUENCODE) += uuencode.o
77lib-$(CONFIG_WATCH) += watch.o
78lib-$(CONFIG_WC) += wc.o
79lib-$(CONFIG_WHO) += who.o
80lib-$(CONFIG_WHOAMI) += whoami.o
81lib-$(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 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7ifndef top_srcdir
8top_srcdir=..
9endif
10ifndef top_builddir
11top_builddir=..
12endif
13srcdir=$(top_srcdir)/coreutils
14SHELLUTILS_DIR:=./
15include $(top_srcdir)/Rules.mak
16include $(top_builddir)/.config
17include $(srcdir)/Makefile.in
18all: $(libraries-y)
19-include $(top_builddir)/.depend
20
21clean:
22 rm -f *.o *.a $(AR_TARGET)
23
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 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6
7COREUTILS_AR:=coreutils.a
8ifndef $(COREUTILS_DIR)
9COREUTILS_DIR:=$(top_builddir)/coreutils/
10endif
11srcdir=$(top_srcdir)/coreutils
12
13COREUTILS-y:=
14COREUTILS-$(CONFIG_BASENAME) += basename.o
15COREUTILS-$(CONFIG_CAL) += cal.o
16COREUTILS-$(CONFIG_CAT) += cat.o
17COREUTILS-$(CONFIG_CATV) += catv.o
18COREUTILS-$(CONFIG_CHGRP) += chgrp.o
19COREUTILS-$(CONFIG_CHMOD) += chmod.o
20COREUTILS-$(CONFIG_CHOWN) += chown.o
21COREUTILS-$(CONFIG_CHROOT) += chroot.o
22COREUTILS-$(CONFIG_CKSUM) += cksum.o
23COREUTILS-$(CONFIG_CMP) += cmp.o
24COREUTILS-$(CONFIG_COMM) += comm.o
25COREUTILS-$(CONFIG_CP) += cp.o
26COREUTILS-$(CONFIG_CUT) += cut.o
27COREUTILS-$(CONFIG_DATE) += date.o
28COREUTILS-$(CONFIG_DD) += dd.o
29COREUTILS-$(CONFIG_DF) += df.o
30COREUTILS-$(CONFIG_DIFF) += diff.o
31COREUTILS-$(CONFIG_DIRNAME) += dirname.o
32COREUTILS-$(CONFIG_DOS2UNIX) += dos2unix.o
33COREUTILS-$(CONFIG_DU) += du.o
34COREUTILS-$(CONFIG_ECHO) += echo.o
35COREUTILS-$(CONFIG_ENV) += env.o
36COREUTILS-$(CONFIG_EXPR) += expr.o
37COREUTILS-$(CONFIG_FALSE) += false.o
38COREUTILS-$(CONFIG_FOLD) += fold.o
39COREUTILS-$(CONFIG_HEAD) += head.o
40COREUTILS-$(CONFIG_HOSTID) += hostid.o
41COREUTILS-$(CONFIG_ID) += id.o
42COREUTILS-$(CONFIG_INSTALL) += install.o
43COREUTILS-$(CONFIG_LENGTH) += length.o
44COREUTILS-$(CONFIG_LN) += ln.o
45COREUTILS-$(CONFIG_LOGNAME) += logname.o
46COREUTILS-$(CONFIG_LS) += ls.o
47COREUTILS-$(CONFIG_MD5SUM) += md5_sha1_sum.o
48COREUTILS-$(CONFIG_MKDIR) += mkdir.o
49COREUTILS-$(CONFIG_MKFIFO) += mkfifo.o
50COREUTILS-$(CONFIG_MKNOD) += mknod.o
51COREUTILS-$(CONFIG_MV) += mv.o
52COREUTILS-$(CONFIG_NICE) += nice.o
53COREUTILS-$(CONFIG_NOHUP) += nohup.o
54COREUTILS-$(CONFIG_OD) += od.o
55COREUTILS-$(CONFIG_PRINTENV) += printenv.o
56COREUTILS-$(CONFIG_PRINTF) += printf.o
57COREUTILS-$(CONFIG_PWD) += pwd.o
58COREUTILS-$(CONFIG_REALPATH) += realpath.o
59COREUTILS-$(CONFIG_RM) += rm.o
60COREUTILS-$(CONFIG_RMDIR) += rmdir.o
61COREUTILS-$(CONFIG_SEQ) += seq.o
62COREUTILS-$(CONFIG_SHA1SUM) += md5_sha1_sum.o
63COREUTILS-$(CONFIG_SLEEP) += sleep.o
64COREUTILS-$(CONFIG_SORT) += sort.o
65COREUTILS-$(CONFIG_STAT) += stat.o
66COREUTILS-$(CONFIG_STTY) += stty.o
67COREUTILS-$(CONFIG_SUM) += sum.o
68COREUTILS-$(CONFIG_SYNC) += sync.o
69COREUTILS-$(CONFIG_TAIL) += tail.o
70COREUTILS-$(CONFIG_TEE) += tee.o
71COREUTILS-$(CONFIG_TEST) += test.o
72COREUTILS-$(CONFIG_TOUCH) += touch.o
73COREUTILS-$(CONFIG_TR) += tr.o
74COREUTILS-$(CONFIG_TRUE) += true.o
75COREUTILS-$(CONFIG_TTY) += tty.o
76COREUTILS-$(CONFIG_UNAME) += uname.o
77COREUTILS-$(CONFIG_UNIQ) += uniq.o
78COREUTILS-$(CONFIG_USLEEP) += usleep.o
79COREUTILS-$(CONFIG_UUDECODE) += uudecode.o
80COREUTILS-$(CONFIG_UUENCODE) += uuencode.o
81COREUTILS-$(CONFIG_WATCH) += watch.o
82COREUTILS-$(CONFIG_WC) += wc.o
83COREUTILS-$(CONFIG_WHO) += who.o
84COREUTILS-$(CONFIG_WHOAMI) += whoami.o
85COREUTILS-$(CONFIG_YES) += yes.o
86
87COREUTILS-y:=$(sort $(COREUTILS-y))
88
89ifneq ($(strip $(COREUTILS-y)),)
90libraries-y+=$(COREUTILS_DIR)$(COREUTILS_AR)
91endif
92
93COREUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(COREUTILS-y))
94COREUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
95APPLET_SRC-y+=$(COREUTILS_SRC-y)
96APPLET_SRC-a+=$(COREUTILS_SRC-a)
97
98$(COREUTILS_DIR)$(COREUTILS_AR): $(patsubst %,$(COREUTILS_DIR)%, $(COREUTILS-y))
99 $(do_ar)
100
101$(COREUTILS_DIR)%.o: $(srcdir)/%.c
102 $(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)
1165 llist_t *L_arg = NULL; 1165 llist_t *L_arg = NULL;
1166 1166
1167 opt_complementary = "L::"; 1167 opt_complementary = "L::";
1168 cmd_flags = 1168 cmd_flags = getopt32(argc, argv, "abdiL:NqrsS:tTU:wu",
1169 getopt32(argc, argv, "abdiL:NqrsS:tTU:wu", &L_arg, &start, 1169 &L_arg, &start, &U_opt);
1170 &U_opt);
1171 1170
1172 if (cmd_flags & FLAG_L) { 1171 if (cmd_flags & FLAG_L) {
1173 while (L_arg) { 1172 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 @@
13 */ 13 */
14 14
15#include "busybox.h" 15#include "busybox.h"
16#include "pwd_.h"
17#include <stdio.h> 16#include <stdio.h>
18#include <unistd.h> 17#include <unistd.h>
19#include <sys/types.h> 18#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 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
6
7lib-y:=
8lib-$(CONFIG_MKFIFO) += getopt_mk_fifo_nod.o
9lib-$(CONFIG_MKNOD) += getopt_mk_fifo_nod.o
10lib-$(CONFIG_INSTALL) += cp_mv_stat.o
11lib-$(CONFIG_CP) += cp_mv_stat.o
12lib-$(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 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18#
19
20ifndef top_srcdir
21top_srcdir=../..
22endif
23ifndef top_builddir
24top_builddir=../..
25endif
26srcdir=$(top_srcdir)/coreutils/libcoreutils
27LIBCOREUTILS_DIR:=./
28include $(top_srcdir)/Rules.mak
29include $(top_builddir)/.config
30include $(srcdir)/Makefile.in
31
32all: $(libraries-y)
33-include $(top_builddir)/.depend
34
35clean:
36 rm -f *.o *.a $(AR_TARGET)
37
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 @@
1# Makefile for busybox
2#
3# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
4#
5# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
6
7LIBCOREUTILS_AR:=libcoreutils.a
8ifndef $(LIBCOREUTILS_DIR)
9LIBCOREUTILS_DIR:=$(top_builddir)/coreutils/libcoreutils
10endif
11srcdir=$(top_srcdir)/coreutils/libcoreutils
12
13LIBCOREUTILS_ALL_SRC:= cp_mv_stat.c getopt_mk_fifo_nod.c
14
15LIBCOREUTILS-y:=
16LIBCOREUTILS-$(CONFIG_MKFIFO) += getopt_mk_fifo_nod.o
17LIBCOREUTILS-$(CONFIG_MKNOD) += getopt_mk_fifo_nod.o
18LIBCOREUTILS-$(CONFIG_INSTALL) += cp_mv_stat.o
19LIBCOREUTILS-$(CONFIG_CP) += cp_mv_stat.o
20LIBCOREUTILS-$(CONFIG_MV) += cp_mv_stat.o
21
22LIBCOREUTILS-y:=$(sort $(LIBCOREUTILS-y))
23
24LIBCOREUTILS_SRC-y:=$(patsubst %,$(srcdir)/%,$(subst .o,.c,$(LIBCOREUTILS-y)))
25LIBCOREUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
26LIBRARY_SRC-y+=$(LIBCOREUTILS_SRC-y)
27LIBRARY_SRC-a+=$(LIBCOREUTILS_SRC-a)
28
29ifneq ($(strip $(LIBCOREUTILS-y)),)
30libraries-y+=$(LIBCOREUTILS_DIR)/$(LIBCOREUTILS_AR)
31endif
32
33LIBCOREUTILS_OBJS=$(patsubst %,$(LIBCOREUTILS_DIR)/%, $(LIBCOREUTILS-y))
34
35$(LIBCOREUTILS_DIR)/$(LIBCOREUTILS_AR): $(patsubst %,$(LIBCOREUTILS_DIR)/%,$(LIBCOREUTILS-y))
36 $(do_ar)
37
38$(LIBCOREUTILS_DIR)/%.o: $(srcdir)/%.c
39 $(compile.c)