From e4070cb0d7586037c6fcf0f0f00d8d5b97f649d3 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 4 Jun 2010 19:59:49 +0200 Subject: partially migrate coreutils to Config.src and Kbuild.src Signed-off-by: Denys Vlasenko --- coreutils/Config.in | 900 --------------------------------------------------- coreutils/Config.src | 808 +++++++++++++++++++++++++++++++++++++++++++++ coreutils/Kbuild | 98 ------ coreutils/Kbuild.src | 88 +++++ coreutils/basename.c | 10 + coreutils/cat.c | 12 + coreutils/date.c | 41 +++ coreutils/test.c | 20 ++ coreutils/tr.c | 29 ++ 9 files changed, 1008 insertions(+), 998 deletions(-) delete mode 100644 coreutils/Config.in create mode 100644 coreutils/Config.src delete mode 100644 coreutils/Kbuild create mode 100644 coreutils/Kbuild.src (limited to 'coreutils') diff --git a/coreutils/Config.in b/coreutils/Config.in deleted file mode 100644 index 37e885c1c..000000000 --- a/coreutils/Config.in +++ /dev/null @@ -1,900 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see scripts/kbuild/config-language.txt. -# - -menu "Coreutils" - -config BASENAME - bool "basename" - default n - help - basename is used to strip the directory and suffix from filenames, - leaving just the filename itself. Enable this option if you wish - to enable the 'basename' utility. - -config CAL - bool "cal" - default n - help - cal is used to display a monthly calender. - -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 CATV - bool "catv" - default n - help - Display nonprinting characters as escape sequences (like some - implementations' cat -v option). - -config CHGRP - bool "chgrp" - default n - help - chgrp is used to change the group ownership of files. - -config CHMOD - bool "chmod" - default n - help - chmod is used to change the access permission of files. - -config CHOWN - bool "chown" - default n - help - chown is used to change the user and/or group ownership - of files. - -config FEATURE_CHOWN_LONG_OPTIONS - bool "Enable long options" - default n - depends on CHOWN && LONG_OPTS - help - Enable use of long options - -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 CKSUM - bool "cksum" - default n - help - cksum is used to calculate the CRC32 checksum of a file. - -config COMM - bool "comm" - default n - help - comm is used to compare two files line by line and return - a three-column output. - -config CP - bool "cp" - default n - help - cp is used to copy files and directories. - -config FEATURE_CP_LONG_OPTIONS - bool "Enable long options for cp" - default n - depends on CP && LONG_OPTS - help - Enable long options for cp. - Also add support for --parents option. - -config CUT - bool "cut" - default n - help - cut is used to print selected parts of lines from - each file to stdout. - -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 FEATURE_DATE_ISOFMT - bool "Enable ISO date format output (-I)" - default y - depends on DATE - help - Enable option (-I) to output an ISO-8601 compliant - date/time string. - -config FEATURE_DATE_NANO - bool "Support %[num]N nanosecond format specifier" - default y - depends on DATE - help - Support %[num]N format specifier. Adds ~250 bytes of code. - -config FEATURE_DATE_COMPAT - bool "Support weird 'date MMDDhhmm[[YY]YY][.ss]' format" - default y - depends on DATE - help - System time can be set by 'date -s DATE' and simply 'date DATE', - but formats of DATE string are different. 'date DATE' accepts - a rather weird MMDDhhmm[[YY]YY][.ss] format with completely - unnatural placement of year between minutes and seconds. - date -s (and other commands like touch -d) use more sensible - formats (for one, ISO format YYYY-MM-DD hh:mm:ss.ssssss). - - With this option off, 'date DATE' is 'date -s DATE' support - the same format. With it on, 'date DATE' additionally supports - MMDDhhmm[[YY]YY][.ss] format. - -config DD - bool "dd" - default n - help - dd copies a file (from standard input to standard output, - by default) using specific input and output blocksizes, - while optionally performing conversions on it. - -config FEATURE_DD_SIGNAL_HANDLING - bool "Enable DD signal handling for status reporting" - default y - 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 - so far, then to resume copying. - - $ dd if=/dev/zero of=/dev/null& - $ pid=$! kill -USR1 $pid; sleep 1; kill $pid - 10899206+0 records in - 10899206+0 records out - -config FEATURE_DD_THIRD_STATUS_LINE - bool "Enable the third status line upon signal" - default n - depends on DD && FEATURE_DD_SIGNAL_HANDLING - help - Displays a coreutils-like third status line with transferred bytes, - elapsed time and speed. - -config FEATURE_DD_IBS_OBS - bool "Enable ibs, obs and conv options" - default n - 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 DF - bool "df" - default n - help - df reports the amount of disk space used and available - on filesystems. - -config FEATURE_DF_FANCY - bool "Enable -a, -i, -B" - default n - depends on DF - help - This option enables -a, -i and -B. - - -a Show all filesystems - -i Inodes - -B Blocksize - -config DIRNAME - bool "dirname" - default n - help - dirname is used to strip a non-directory suffix from - a file name. - -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 UNIX2DOS - bool - default y - depends on DOS2UNIX - help - unix2dos is used to convert a text file from UNIX format to - DOS format, and vice versa. - -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 FEATURE_DU_DEFAULT_BLOCKSIZE_1K - bool "Use a default blocksize of 1024 bytes (1K)" - default y - depends on DU - help - Use a blocksize of (1K) instead of the default 512b. - -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 FEATURE_FANCY_ECHO - bool "Enable echo options (-n and -e)" - default y - depends on ECHO || ASH_BUILTIN_ECHO || HUSH - help - This adds options (-n and -e) to echo. - -config ENV - bool "env" - default n - help - env is used to set an environment variable and run - a command; without options it displays the current - environment. - -config FEATURE_ENV_LONG_OPTIONS - bool "Enable long options" - default n - depends on ENV && LONG_OPTS - help - Support long options for the env applet. - -config EXPAND - bool "expand" - default n - help - By default, convert all tabs to spaces. - -config FEATURE_EXPAND_LONG_OPTIONS - bool "Enable long options" - default n - depends on EXPAND && LONG_OPTS - help - Support long options for the expand applet. - -config EXPR - bool "expr" - default n - help - expr is used to calculate numbers and print the result - to standard output. - -config EXPR_MATH_SUPPORT_64 - bool "Extend Posix numbers support to 64 bit" - default n - 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 FALSE - bool "false" - default n - help - false returns an exit code of FALSE (1). - -config FOLD - bool "fold" - default n - help - Wrap text to fit a specific width. - -config FSYNC - bool "fsync" - default n - help - fsync is used to flush file-related cached blocks to disk. - -config HEAD - bool "head" - default n - help - head is used to print the first specified number of lines - from files. - -config FEATURE_FANCY_HEAD - bool "Enable head options (-c, -q, and -v)" - default n - depends on HEAD - help - This enables the head options (-c, -q, and -v). - -config HOSTID - bool "hostid" - default n - help - hostid prints the numeric identifier (in hexadecimal) for - the current host. - -config ID - bool "id" - default n - help - id displays the current user and group ID names. - -config INSTALL - bool "install" - default n - help - Copy files and set attributes. - -config FEATURE_INSTALL_LONG_OPTIONS - bool "Enable long options" - default n - depends on INSTALL && LONG_OPTS - help - Support long options for the install applet. - -config LENGTH - bool "length" - default n - help - length is used to print out the length of a specified string. - -config LN - bool "ln" - default n - help - ln is used to create hard or soft links between files. - -config LOGNAME - bool "logname" - default n - help - logname is used to print the current user's login name. - -config LS - bool "ls" - default n - help - ls is used to list the contents of directories. - -config FEATURE_LS_FILETYPES - bool "Enable filetyping options (-p and -F)" - default y - depends on LS - help - Enable the ls options (-p and -F). - -config FEATURE_LS_FOLLOWLINKS - bool "Enable symlinks dereferencing (-L)" - default y - depends on LS - help - Enable the ls option (-L). - -config FEATURE_LS_RECURSIVE - bool "Enable recursion (-R)" - default y - depends on LS - help - Enable the ls option (-R). - -config FEATURE_LS_SORTFILES - bool "Sort the file names" - default y - depends on LS - help - Allow ls to sort file names alphabetically. - -config FEATURE_LS_TIMESTAMPS - bool "Show file timestamps" - default y - depends on LS - help - Allow ls to display timestamps for files. - -config FEATURE_LS_USERNAME - bool "Show username/groupnames" - default y - depends on LS - help - Allow ls to display username/groupname for files. - -config FEATURE_LS_COLOR - bool "Allow use of color to identify file types" - default y - depends on LS && LONG_OPTS - help - This enables the --color option to ls. - -config FEATURE_LS_COLOR_IS_DEFAULT - bool "Produce colored ls output by default" - default n - 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. - This is not recommended, since the colors are not - configurable, and the output may not be legible on - many output screens. - -config MD5SUM - bool "md5sum" - default n - help - md5sum is used to print or check MD5 checksums. - -config MKDIR - bool "mkdir" - default n - help - mkdir is used to create directories with the specified names. - -config FEATURE_MKDIR_LONG_OPTIONS - bool "Enable long options" - default n - depends on MKDIR && LONG_OPTS - help - Support long options for the mkdir applet. - -config MKFIFO - bool "mkfifo" - default n - help - mkfifo is used to create FIFOs (named pipes). - The `mknod' program can also create FIFOs. - -config MKNOD - bool "mknod" - default n - help - mknod is used to create FIFOs or block/character special - files with the specified names. - -config MV - bool "mv" - default n - help - mv is used to move or rename files or directories. - -config FEATURE_MV_LONG_OPTIONS - bool "Enable long options" - default n - depends on MV && LONG_OPTS - help - Support long options for the mv applet. - -config NICE - bool "nice" - default n - help - nice runs a program with modified scheduling priority. - -config NOHUP - bool "nohup" - default n - help - run a command immune to hangups, with output to a non-tty. - -config OD - bool "od" - default n - help - od is used to dump binary files in octal and other formats. - -config PRINTENV - bool "printenv" - default n - help - printenv is used to print all or part of environment. - -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 PWD - bool "pwd" - default n - help - pwd is used to print the current directory. - -config READLINK - bool "readlink" - default n - help - This program reads a symbolic link and returns the name - of the file it points to - -config FEATURE_READLINK_FOLLOW - bool "Enable canonicalization by following all symlinks (-f)" - default n - depends on READLINK - help - Enable the readlink option (-f). - -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 RM - bool "rm" - default n - help - rm is used to remove files or directories. - -config RMDIR - bool "rmdir" - default n - help - rmdir is used to remove empty directories. - -config FEATURE_RMDIR_LONG_OPTIONS - bool "Enable long options" - default n - depends on RMDIR && LONG_OPTS - help - Support long options for the rmdir applet, including - --ignore-fail-on-non-empty for compatibility with GNU rmdir. - -config SEQ - bool "seq" - default n - help - print a sequence of numbers - -config SHA1SUM - bool "sha1sum" - default n - help - Compute and check SHA1 message digest - -config SHA256SUM - bool "sha256sum" - default n - help - Compute and check SHA256 message digest - -config SHA512SUM - bool "sha512sum" - default n - help - Compute and check SHA512 message digest - -config SLEEP - bool "sleep" - default n - help - sleep is used to pause for a specified number of seconds. - It comes in 3 versions: - - small: takes one integer parameter - - fancy: takes multiple integer arguments with suffixes: - sleep 1d 2h 3m 15s - - fancy with fractional numbers: - sleep 2.3s 4.5h sleeps for 16202.3 seconds - Last one is "the most compatible" with coreutils sleep, - but it adds around 1k of code. - -config FEATURE_FANCY_SLEEP - bool "Enable multiple arguments and s/m/h/d suffixes" - default n - depends on SLEEP - help - Allow sleep to pause for specified minutes, hours, and days. - -config FEATURE_FLOAT_SLEEP - bool "Enable fractional arguments" - default n - depends on FEATURE_FANCY_SLEEP - help - Allow for fractional numeric parameters. - -config SORT - bool "sort" - default n - help - sort is used to sort lines of text in specified files. - -config FEATURE_SORT_BIG - bool "Full SuSv3 compliant sort (support -ktcsbdfiozgM)" - default y - 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 - more. This adds a little over 3k to a nonstatic build on x86. - - The SuSv3 sort standard is available at: - http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html - -config SPLIT - bool "split" - default n - help - split a file into pieces. - -config FEATURE_SPLIT_FANCY - bool "Fancy extensions" - default n - depends on SPLIT - help - Add support for features not required by SUSv3. - Supports additional suffixes 'b' for 512 bytes, - 'g' for 1GiB for the -b option. - -config STAT - bool "stat" - default n - help - display file or filesystem status. - -config FEATURE_STAT_FORMAT - bool "Enable custom formats (-c)" - default n - 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 STTY - bool "stty" - default n - help - stty is used to change and print terminal line settings. - -config SUM - bool "sum" - default n - help - checksum and count the blocks in a file - -config SYNC - bool "sync" - default n - help - sync is used to flush filesystem buffers. - -config TAC - bool "tac" - default n - help - tac is used to concatenate and print files in reverse. - -config TAIL - bool "tail" - default n - help - tail is used to print the last specified number of lines - from files. - -config FEATURE_FANCY_TAIL - bool "Enable extra tail options (-q, -s, -v, and -F)" - default y - depends on TAIL - help - The options (-q, -s, and -v) are provided by GNU tail, but - are not specific in the SUSv3 standard. - - -q Never output headers giving file names - -s SEC Wait SEC seconds between reads with -f - -v Always output headers giving file names - -config TEE - bool "tee" - default n - help - tee is used to read from standard input and write - to standard output and files. - -config FEATURE_TEE_USE_BLOCK_IO - bool "Enable block I/O (larger/faster) instead of byte I/O" - default n - depends on TEE - help - Enable this option for a faster tee, at expense of size. - -config TEST - bool "test" - default n - help - test is used to check file types and compare values, - returning an appropriate exit code. The bash shell - has test built in, ash can build it in optionally. - -config FEATURE_TEST_64 - bool "Extend test to 64 bit" - default n - depends on TEST || ASH_BUILTIN_TEST || HUSH - help - Enable 64-bit support in test. - -config TOUCH - bool "touch" - default n - help - touch is used to create or change the access and/or - modification timestamp of specified files. - -config TR - bool "tr" - default n - help - tr is used to squeeze, and/or delete characters from standard - input, writing to standard output. - -config FEATURE_TR_CLASSES - bool "Enable character classes (such as [:upper:])" - default n - depends on TR - help - Enable character classes, enabling commands such as: - tr [:upper:] [:lower:] to convert input into lowercase. - -config FEATURE_TR_EQUIV - bool "Enable equivalence classes" - default n - depends on TR - help - Enable equivalence classes, which essentially add the enclosed - character to the current set. For instance, tr [=a=] xyz would - replace all instances of 'a' with 'xyz'. This option is mainly - useful for cases when no other way of expressing a character - is possible. - -config TRUE - bool "true" - default n - help - true returns an exit code of TRUE (0). - -config TTY - bool "tty" - default n - help - tty is used to print the name of the current terminal to - standard output. - -config UNAME - bool "uname" - default n - help - uname is used to print system information. - -config UNEXPAND - bool "unexpand" - default n - help - By default, convert only leading sequences of blanks to tabs. - -config FEATURE_UNEXPAND_LONG_OPTIONS - bool "Enable long options" - default n - depends on UNEXPAND && LONG_OPTS - help - Support long options for the unexpand applet. - -config UNIQ - bool "uniq" - default n - help - uniq is used to remove duplicate lines from a sorted file. - -config USLEEP - bool "usleep" - default n - help - usleep is used to pause for a specified number of microseconds. - -config UUDECODE - bool "uudecode" - default n - help - uudecode is used to decode a uuencoded file. - -config UUENCODE - bool "uuencode" - default n - help - uuencode is used to uuencode a file. - -config WC - bool "wc" - default n - help - wc is used to print the number of bytes, words, and lines, - in specified files. - -config FEATURE_WC_LARGE - bool "Support very large files in wc" - default n - depends on WC - help - Use "unsigned long long" in wc for counter variables. - -config WHO - bool "who" - default n - depends on FEATURE_UTMP - help - who is used to show who is logged on. - -config WHOAMI - bool "whoami" - default n - help - whoami is used to print the username of the current - user id (same as id -un). - -config YES - bool "yes" - default n - help - yes is used to repeatedly output a specific string, or - the default string `y'. - -comment "Common options for cp and mv" - depends on CP || MV - -config FEATURE_PRESERVE_HARDLINKS - bool "Preserve hard links" - default n - depends on CP || MV - help - Allow cp and mv to preserve hard links. - -comment "Common options for ls, more and telnet" - depends on LS || MORE || TELNET - -config FEATURE_AUTOWIDTH - bool "Calculate terminal & column widths" - default y - 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 - display additional text or avoid wrapping text onto the next line. - If you leave this disabled, your utilities will be especially - primitive and will be unable to determine the current screen width. - -comment "Common options for df, du, ls" - depends on DF || DU || LS - -config FEATURE_HUMAN_READABLE - bool "Support for human readable output (example 13k, 23M, 235G)" - default n - depends on DF || DU || LS - help - Allow df, du, and ls to have human readable output. - -comment "Common options for md5sum, sha1sum, sha256sum, sha512sum" - depends on MD5SUM || SHA1SUM || SHA256SUM || SHA512SUM - -config FEATURE_MD5_SHA1_SUM_CHECK - bool "Enable -c, -s and -w options" - default n - depends on MD5SUM || SHA1SUM || SHA256SUM || SHA512SUM - help - Enabling the -c options allows files to be checked - against pre-calculated hash values. - - -s and -w are useful options when verifying checksums. - -endmenu diff --git a/coreutils/Config.src b/coreutils/Config.src new file mode 100644 index 000000000..99384e300 --- /dev/null +++ b/coreutils/Config.src @@ -0,0 +1,808 @@ +# +# For a description of the syntax of this configuration file, +# see scripts/kbuild/config-language.txt. +# + +menu "Coreutils" + +INSERT + +config CAL + bool "cal" + default n + help + cal is used to display a monthly calender. + +config CATV + bool "catv" + default n + help + Display nonprinting characters as escape sequences (like some + implementations' cat -v option). + +config CHGRP + bool "chgrp" + default n + help + chgrp is used to change the group ownership of files. + +config CHMOD + bool "chmod" + default n + help + chmod is used to change the access permission of files. + +config CHOWN + bool "chown" + default n + help + chown is used to change the user and/or group ownership + of files. + +config FEATURE_CHOWN_LONG_OPTIONS + bool "Enable long options" + default n + depends on CHOWN && LONG_OPTS + help + Enable use of long options + +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 CKSUM + bool "cksum" + default n + help + cksum is used to calculate the CRC32 checksum of a file. + +config COMM + bool "comm" + default n + help + comm is used to compare two files line by line and return + a three-column output. + +config CP + bool "cp" + default n + help + cp is used to copy files and directories. + +config FEATURE_CP_LONG_OPTIONS + bool "Enable long options for cp" + default n + depends on CP && LONG_OPTS + help + Enable long options for cp. + Also add support for --parents option. + +config CUT + bool "cut" + default n + help + cut is used to print selected parts of lines from + each file to stdout. + +config DD + bool "dd" + default n + help + dd copies a file (from standard input to standard output, + by default) using specific input and output blocksizes, + while optionally performing conversions on it. + +config FEATURE_DD_SIGNAL_HANDLING + bool "Enable DD signal handling for status reporting" + default y + 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 + so far, then to resume copying. + + $ dd if=/dev/zero of=/dev/null& + $ pid=$! kill -USR1 $pid; sleep 1; kill $pid + 10899206+0 records in + 10899206+0 records out + +config FEATURE_DD_THIRD_STATUS_LINE + bool "Enable the third status line upon signal" + default n + depends on DD && FEATURE_DD_SIGNAL_HANDLING + help + Displays a coreutils-like third status line with transferred bytes, + elapsed time and speed. + +config FEATURE_DD_IBS_OBS + bool "Enable ibs, obs and conv options" + default n + 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 DF + bool "df" + default n + help + df reports the amount of disk space used and available + on filesystems. + +config FEATURE_DF_FANCY + bool "Enable -a, -i, -B" + default n + depends on DF + help + This option enables -a, -i and -B. + + -a Show all filesystems + -i Inodes + -B Blocksize + +config DIRNAME + bool "dirname" + default n + help + dirname is used to strip a non-directory suffix from + a file name. + +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 UNIX2DOS + bool + default y + depends on DOS2UNIX + help + unix2dos is used to convert a text file from UNIX format to + DOS format, and vice versa. + +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 FEATURE_DU_DEFAULT_BLOCKSIZE_1K + bool "Use a default blocksize of 1024 bytes (1K)" + default y + depends on DU + help + Use a blocksize of (1K) instead of the default 512b. + +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 FEATURE_FANCY_ECHO + bool "Enable echo options (-n and -e)" + default y + depends on ECHO || ASH_BUILTIN_ECHO || HUSH + help + This adds options (-n and -e) to echo. + +config ENV + bool "env" + default n + help + env is used to set an environment variable and run + a command; without options it displays the current + environment. + +config FEATURE_ENV_LONG_OPTIONS + bool "Enable long options" + default n + depends on ENV && LONG_OPTS + help + Support long options for the env applet. + +config EXPAND + bool "expand" + default n + help + By default, convert all tabs to spaces. + +config FEATURE_EXPAND_LONG_OPTIONS + bool "Enable long options" + default n + depends on EXPAND && LONG_OPTS + help + Support long options for the expand applet. + +config EXPR + bool "expr" + default n + help + expr is used to calculate numbers and print the result + to standard output. + +config EXPR_MATH_SUPPORT_64 + bool "Extend Posix numbers support to 64 bit" + default n + 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 FALSE + bool "false" + default n + help + false returns an exit code of FALSE (1). + +config FOLD + bool "fold" + default n + help + Wrap text to fit a specific width. + +config FSYNC + bool "fsync" + default n + help + fsync is used to flush file-related cached blocks to disk. + +config HEAD + bool "head" + default n + help + head is used to print the first specified number of lines + from files. + +config FEATURE_FANCY_HEAD + bool "Enable head options (-c, -q, and -v)" + default n + depends on HEAD + help + This enables the head options (-c, -q, and -v). + +config HOSTID + bool "hostid" + default n + help + hostid prints the numeric identifier (in hexadecimal) for + the current host. + +config ID + bool "id" + default n + help + id displays the current user and group ID names. + +config INSTALL + bool "install" + default n + help + Copy files and set attributes. + +config FEATURE_INSTALL_LONG_OPTIONS + bool "Enable long options" + default n + depends on INSTALL && LONG_OPTS + help + Support long options for the install applet. + +config LENGTH + bool "length" + default n + help + length is used to print out the length of a specified string. + +config LN + bool "ln" + default n + help + ln is used to create hard or soft links between files. + +config LOGNAME + bool "logname" + default n + help + logname is used to print the current user's login name. + +config LS + bool "ls" + default n + help + ls is used to list the contents of directories. + +config FEATURE_LS_FILETYPES + bool "Enable filetyping options (-p and -F)" + default y + depends on LS + help + Enable the ls options (-p and -F). + +config FEATURE_LS_FOLLOWLINKS + bool "Enable symlinks dereferencing (-L)" + default y + depends on LS + help + Enable the ls option (-L). + +config FEATURE_LS_RECURSIVE + bool "Enable recursion (-R)" + default y + depends on LS + help + Enable the ls option (-R). + +config FEATURE_LS_SORTFILES + bool "Sort the file names" + default y + depends on LS + help + Allow ls to sort file names alphabetically. + +config FEATURE_LS_TIMESTAMPS + bool "Show file timestamps" + default y + depends on LS + help + Allow ls to display timestamps for files. + +config FEATURE_LS_USERNAME + bool "Show username/groupnames" + default y + depends on LS + help + Allow ls to display username/groupname for files. + +config FEATURE_LS_COLOR + bool "Allow use of color to identify file types" + default y + depends on LS && LONG_OPTS + help + This enables the --color option to ls. + +config FEATURE_LS_COLOR_IS_DEFAULT + bool "Produce colored ls output by default" + default n + 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. + This is not recommended, since the colors are not + configurable, and the output may not be legible on + many output screens. + +config MD5SUM + bool "md5sum" + default n + help + md5sum is used to print or check MD5 checksums. + +config MKDIR + bool "mkdir" + default n + help + mkdir is used to create directories with the specified names. + +config FEATURE_MKDIR_LONG_OPTIONS + bool "Enable long options" + default n + depends on MKDIR && LONG_OPTS + help + Support long options for the mkdir applet. + +config MKFIFO + bool "mkfifo" + default n + help + mkfifo is used to create FIFOs (named pipes). + The `mknod' program can also create FIFOs. + +config MKNOD + bool "mknod" + default n + help + mknod is used to create FIFOs or block/character special + files with the specified names. + +config MV + bool "mv" + default n + help + mv is used to move or rename files or directories. + +config FEATURE_MV_LONG_OPTIONS + bool "Enable long options" + default n + depends on MV && LONG_OPTS + help + Support long options for the mv applet. + +config NICE + bool "nice" + default n + help + nice runs a program with modified scheduling priority. + +config NOHUP + bool "nohup" + default n + help + run a command immune to hangups, with output to a non-tty. + +config OD + bool "od" + default n + help + od is used to dump binary files in octal and other formats. + +config PRINTENV + bool "printenv" + default n + help + printenv is used to print all or part of environment. + +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 PWD + bool "pwd" + default n + help + pwd is used to print the current directory. + +config READLINK + bool "readlink" + default n + help + This program reads a symbolic link and returns the name + of the file it points to + +config FEATURE_READLINK_FOLLOW + bool "Enable canonicalization by following all symlinks (-f)" + default n + depends on READLINK + help + Enable the readlink option (-f). + +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 RM + bool "rm" + default n + help + rm is used to remove files or directories. + +config RMDIR + bool "rmdir" + default n + help + rmdir is used to remove empty directories. + +config FEATURE_RMDIR_LONG_OPTIONS + bool "Enable long options" + default n + depends on RMDIR && LONG_OPTS + help + Support long options for the rmdir applet, including + --ignore-fail-on-non-empty for compatibility with GNU rmdir. + +config SEQ + bool "seq" + default n + help + print a sequence of numbers + +config SHA1SUM + bool "sha1sum" + default n + help + Compute and check SHA1 message digest + +config SHA256SUM + bool "sha256sum" + default n + help + Compute and check SHA256 message digest + +config SHA512SUM + bool "sha512sum" + default n + help + Compute and check SHA512 message digest + +config SLEEP + bool "sleep" + default n + help + sleep is used to pause for a specified number of seconds. + It comes in 3 versions: + - small: takes one integer parameter + - fancy: takes multiple integer arguments with suffixes: + sleep 1d 2h 3m 15s + - fancy with fractional numbers: + sleep 2.3s 4.5h sleeps for 16202.3 seconds + Last one is "the most compatible" with coreutils sleep, + but it adds around 1k of code. + +config FEATURE_FANCY_SLEEP + bool "Enable multiple arguments and s/m/h/d suffixes" + default n + depends on SLEEP + help + Allow sleep to pause for specified minutes, hours, and days. + +config FEATURE_FLOAT_SLEEP + bool "Enable fractional arguments" + default n + depends on FEATURE_FANCY_SLEEP + help + Allow for fractional numeric parameters. + +config SORT + bool "sort" + default n + help + sort is used to sort lines of text in specified files. + +config FEATURE_SORT_BIG + bool "Full SuSv3 compliant sort (support -ktcsbdfiozgM)" + default y + 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 + more. This adds a little over 3k to a nonstatic build on x86. + + The SuSv3 sort standard is available at: + http://www.opengroup.org/onlinepubs/007904975/utilities/sort.html + +config SPLIT + bool "split" + default n + help + split a file into pieces. + +config FEATURE_SPLIT_FANCY + bool "Fancy extensions" + default n + depends on SPLIT + help + Add support for features not required by SUSv3. + Supports additional suffixes 'b' for 512 bytes, + 'g' for 1GiB for the -b option. + +config STAT + bool "stat" + default n + help + display file or filesystem status. + +config FEATURE_STAT_FORMAT + bool "Enable custom formats (-c)" + default n + 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 STTY + bool "stty" + default n + help + stty is used to change and print terminal line settings. + +config SUM + bool "sum" + default n + help + checksum and count the blocks in a file + +config SYNC + bool "sync" + default n + help + sync is used to flush filesystem buffers. + +config TAC + bool "tac" + default n + help + tac is used to concatenate and print files in reverse. + +config TAIL + bool "tail" + default n + help + tail is used to print the last specified number of lines + from files. + +config FEATURE_FANCY_TAIL + bool "Enable extra tail options (-q, -s, -v, and -F)" + default y + depends on TAIL + help + The options (-q, -s, and -v) are provided by GNU tail, but + are not specific in the SUSv3 standard. + + -q Never output headers giving file names + -s SEC Wait SEC seconds between reads with -f + -v Always output headers giving file names + +config TEE + bool "tee" + default n + help + tee is used to read from standard input and write + to standard output and files. + +config FEATURE_TEE_USE_BLOCK_IO + bool "Enable block I/O (larger/faster) instead of byte I/O" + default n + depends on TEE + help + Enable this option for a faster tee, at expense of size. + +config TOUCH + bool "touch" + default n + help + touch is used to create or change the access and/or + modification timestamp of specified files. + +config TRUE + bool "true" + default n + help + true returns an exit code of TRUE (0). + +config TTY + bool "tty" + default n + help + tty is used to print the name of the current terminal to + standard output. + +config UNAME + bool "uname" + default n + help + uname is used to print system information. + +config UNEXPAND + bool "unexpand" + default n + help + By default, convert only leading sequences of blanks to tabs. + +config FEATURE_UNEXPAND_LONG_OPTIONS + bool "Enable long options" + default n + depends on UNEXPAND && LONG_OPTS + help + Support long options for the unexpand applet. + +config UNIQ + bool "uniq" + default n + help + uniq is used to remove duplicate lines from a sorted file. + +config USLEEP + bool "usleep" + default n + help + usleep is used to pause for a specified number of microseconds. + +config UUDECODE + bool "uudecode" + default n + help + uudecode is used to decode a uuencoded file. + +config UUENCODE + bool "uuencode" + default n + help + uuencode is used to uuencode a file. + +config WC + bool "wc" + default n + help + wc is used to print the number of bytes, words, and lines, + in specified files. + +config FEATURE_WC_LARGE + bool "Support very large files in wc" + default n + depends on WC + help + Use "unsigned long long" in wc for counter variables. + +config WHO + bool "who" + default n + depends on FEATURE_UTMP + help + who is used to show who is logged on. + +config WHOAMI + bool "whoami" + default n + help + whoami is used to print the username of the current + user id (same as id -un). + +config YES + bool "yes" + default n + help + yes is used to repeatedly output a specific string, or + the default string `y'. + +comment "Common options for cp and mv" + depends on CP || MV + +config FEATURE_PRESERVE_HARDLINKS + bool "Preserve hard links" + default n + depends on CP || MV + help + Allow cp and mv to preserve hard links. + +comment "Common options for ls, more and telnet" + depends on LS || MORE || TELNET + +config FEATURE_AUTOWIDTH + bool "Calculate terminal & column widths" + default y + 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 + display additional text or avoid wrapping text onto the next line. + If you leave this disabled, your utilities will be especially + primitive and will be unable to determine the current screen width. + +comment "Common options for df, du, ls" + depends on DF || DU || LS + +config FEATURE_HUMAN_READABLE + bool "Support for human readable output (example 13k, 23M, 235G)" + default n + depends on DF || DU || LS + help + Allow df, du, and ls to have human readable output. + +comment "Common options for md5sum, sha1sum, sha256sum, sha512sum" + depends on MD5SUM || SHA1SUM || SHA256SUM || SHA512SUM + +config FEATURE_MD5_SHA1_SUM_CHECK + bool "Enable -c, -s and -w options" + default n + depends on MD5SUM || SHA1SUM || SHA256SUM || SHA512SUM + help + Enabling the -c options allows files to be checked + against pre-calculated hash values. + + -s and -w are useful options when verifying checksums. + +endmenu diff --git a/coreutils/Kbuild b/coreutils/Kbuild deleted file mode 100644 index ee22a3f7b..000000000 --- a/coreutils/Kbuild +++ /dev/null @@ -1,98 +0,0 @@ -# Makefile for busybox -# -# Copyright (C) 1999-2005 by Erik Andersen -# -# 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_MORE) += cat.o # more uses it if stdout isn't a tty -lib-$(CONFIG_LESS) += cat.o # less too -lib-$(CONFIG_CRONTAB) += cat.o # crontab -l -lib-$(CONFIG_CATV) += catv.o -lib-$(CONFIG_CHGRP) += chgrp.o chown.o -lib-$(CONFIG_CHMOD) += chmod.o -lib-$(CONFIG_CHOWN) += chown.o -lib-$(CONFIG_ADDUSER) += chown.o # used by adduser -lib-$(CONFIG_ADDGROUP) += chown.o # used by adduser -lib-$(CONFIG_CHROOT) += chroot.o -lib-$(CONFIG_CKSUM) += cksum.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_DIRNAME) += dirname.o -lib-$(CONFIG_DOS2UNIX) += dos2unix.o -lib-$(CONFIG_DU) += du.o -lib-$(CONFIG_ECHO) += echo.o -lib-$(CONFIG_ASH) += echo.o # used by ash -lib-$(CONFIG_HUSH) += echo.o # used by hush -lib-$(CONFIG_ENV) += env.o -lib-$(CONFIG_EXPR) += expr.o -lib-$(CONFIG_EXPAND) += expand.o -lib-$(CONFIG_FALSE) += false.o -lib-$(CONFIG_FOLD) += fold.o -lib-$(CONFIG_FSYNC) += fsync.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_FTPD) += 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_ASH_BUILTIN_PRINTF) += printf.o -lib-$(CONFIG_PWD) += pwd.o -lib-$(CONFIG_READLINK) += readlink.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_SHA256SUM) += md5_sha1_sum.o -lib-$(CONFIG_SHA512SUM) += md5_sha1_sum.o -lib-$(CONFIG_SLEEP) += sleep.o -lib-$(CONFIG_SPLIT) += split.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_TAC) += tac.o -lib-$(CONFIG_TAIL) += tail.o -lib-$(CONFIG_TEE) += tee.o -lib-$(CONFIG_TEST) += test.o test_ptr_hack.o -lib-$(CONFIG_ASH) += test.o test_ptr_hack.o # used by ash -lib-$(CONFIG_HUSH) += test.o test_ptr_hack.o # used by hush -lib-$(CONFIG_MSH) += test.o test_ptr_hack.o # used by msh -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_UNEXPAND) += expand.o -lib-$(CONFIG_UNIQ) += uniq.o -lib-$(CONFIG_USLEEP) += usleep.o -lib-$(CONFIG_UUDECODE) += uudecode.o -lib-$(CONFIG_UUENCODE) += uuencode.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/Kbuild.src b/coreutils/Kbuild.src new file mode 100644 index 000000000..57ea7d6c4 --- /dev/null +++ b/coreutils/Kbuild.src @@ -0,0 +1,88 @@ +# Makefile for busybox +# +# Copyright (C) 1999-2005 by Erik Andersen +# +# Licensed under the GPL v2, see the file LICENSE in this tarball. + +libs-y += libcoreutils/ + +lib-y:= +INSERT +lib-$(CONFIG_CAL) += cal.o +lib-$(CONFIG_CATV) += catv.o +lib-$(CONFIG_CHGRP) += chgrp.o chown.o +lib-$(CONFIG_CHMOD) += chmod.o +lib-$(CONFIG_CHOWN) += chown.o +lib-$(CONFIG_ADDUSER) += chown.o # used by adduser +lib-$(CONFIG_ADDGROUP) += chown.o # used by adduser +lib-$(CONFIG_CHROOT) += chroot.o +lib-$(CONFIG_CKSUM) += cksum.o +lib-$(CONFIG_COMM) += comm.o +lib-$(CONFIG_CP) += cp.o +lib-$(CONFIG_CUT) += cut.o +lib-$(CONFIG_DD) += dd.o +lib-$(CONFIG_DF) += df.o +lib-$(CONFIG_DIRNAME) += dirname.o +lib-$(CONFIG_DOS2UNIX) += dos2unix.o +lib-$(CONFIG_DU) += du.o +lib-$(CONFIG_ECHO) += echo.o +lib-$(CONFIG_ASH) += echo.o # used by ash +lib-$(CONFIG_HUSH) += echo.o # used by hush +lib-$(CONFIG_ENV) += env.o +lib-$(CONFIG_EXPR) += expr.o +lib-$(CONFIG_EXPAND) += expand.o +lib-$(CONFIG_FALSE) += false.o +lib-$(CONFIG_FOLD) += fold.o +lib-$(CONFIG_FSYNC) += fsync.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_FTPD) += 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_ASH_BUILTIN_PRINTF) += printf.o +lib-$(CONFIG_PWD) += pwd.o +lib-$(CONFIG_READLINK) += readlink.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_SHA256SUM) += md5_sha1_sum.o +lib-$(CONFIG_SHA512SUM) += md5_sha1_sum.o +lib-$(CONFIG_SLEEP) += sleep.o +lib-$(CONFIG_SPLIT) += split.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_TAC) += tac.o +lib-$(CONFIG_TAIL) += tail.o +lib-$(CONFIG_TEE) += tee.o +lib-$(CONFIG_TOUCH) += touch.o +lib-$(CONFIG_TRUE) += true.o +lib-$(CONFIG_TTY) += tty.o +lib-$(CONFIG_UNAME) += uname.o +lib-$(CONFIG_UNEXPAND) += expand.o +lib-$(CONFIG_UNIQ) += uniq.o +lib-$(CONFIG_USLEEP) += usleep.o +lib-$(CONFIG_UUDECODE) += uudecode.o +lib-$(CONFIG_UUENCODE) += uuencode.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/basename.c b/coreutils/basename.c index 8a5597e65..f35bdf08e 100644 --- a/coreutils/basename.c +++ b/coreutils/basename.c @@ -20,6 +20,16 @@ * 3) Save some space by using strcmp(). Calling strncmp() here was silly. */ +//kbuild:lib-$(CONFIG_BASENAME) += basename.o + +//config:config BASENAME +//config: bool "basename" +//config: default n +//config: help +//config: basename is used to strip the directory and suffix from filenames, +//config: leaving just the filename itself. Enable this option if you wish +//config: to enable the 'basename' utility. + #include "libbb.h" /* This is a NOFORK applet. Be very careful! */ diff --git a/coreutils/cat.c b/coreutils/cat.c index 0024eb8d5..dbb6246ba 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c @@ -10,6 +10,18 @@ /* BB_AUDIT SUSv3 compliant */ /* http://www.opengroup.org/onlinepubs/007904975/utilities/cat.html */ +//kbuild:lib-$(CONFIG_CAT) += cat.o +//kbuild:lib-$(CONFIG_MORE) += cat.o # more uses it if stdout isn't a tty +//kbuild:lib-$(CONFIG_LESS) += cat.o # less too +//kbuild:lib-$(CONFIG_CRONTAB) += cat.o # crontab -l + +//config:config CAT +//config: bool "cat" +//config: default n +//config: help +//config: cat is used to concatenate files and print them to the standard +//config: output. Enable this option if you wish to enable the 'cat' utility. + #include "libbb.h" /* This is a NOFORK applet. Be very careful! */ diff --git a/coreutils/date.c b/coreutils/date.c index c1390be76..2720a3507 100644 --- a/coreutils/date.c +++ b/coreutils/date.c @@ -51,6 +51,47 @@ * and does not support -Ins * -D FMT is a bbox extension for _input_ conversion of -d DATE */ + +//kbuild:lib-$(CONFIG_DATE) += date.o + +//config:config DATE +//config: bool "date" +//config: default n +//config: help +//config: date is used to set the system date or display the +//config: current time in the given format. +//config: +//config:config FEATURE_DATE_ISOFMT +//config: bool "Enable ISO date format output (-I)" +//config: default y +//config: depends on DATE +//config: help +//config: Enable option (-I) to output an ISO-8601 compliant +//config: date/time string. +//config: +//config:config FEATURE_DATE_NANO +//config: bool "Support %[num]N nanosecond format specifier" +//config: default y +//config: depends on DATE +//config: help +//config: Support %[num]N format specifier. Adds ~250 bytes of code. +//config: +//config:config FEATURE_DATE_COMPAT +//config: bool "Support weird 'date MMDDhhmm[[YY]YY][.ss]' format" +//config: default y +//config: depends on DATE +//config: help +//config: System time can be set by 'date -s DATE' and simply 'date DATE', +//config: but formats of DATE string are different. 'date DATE' accepts +//config: a rather weird MMDDhhmm[[YY]YY][.ss] format with completely +//config: unnatural placement of year between minutes and seconds. +//config: date -s (and other commands like touch -d) use more sensible +//config: formats (for one, ISO format YYYY-MM-DD hh:mm:ss.ssssss). +//config: +//config: With this option off, 'date DATE' is 'date -s DATE' support +//config: the same format. With it on, 'date DATE' additionally supports +//config: MMDDhhmm[[YY]YY][.ss] format. + #include "libbb.h" enum { diff --git a/coreutils/test.c b/coreutils/test.c index a1d164574..cc4a132a7 100644 --- a/coreutils/test.c +++ b/coreutils/test.c @@ -19,6 +19,26 @@ * Original copyright notice states: * "This program is in the Public Domain." */ + +//kbuild:lib-$(CONFIG_TEST) += test.o test_ptr_hack.o +//kbuild:lib-$(CONFIG_ASH) += test.o test_ptr_hack.o +//kbuild:lib-$(CONFIG_HUSH) += test.o test_ptr_hack.o + +//config:config TEST +//config: bool "test" +//config: default n +//config: help +//config: test is used to check file types and compare values, +//config: returning an appropriate exit code. The bash shell +//config: has test built in, ash can build it in optionally. +//config: +//config:config FEATURE_TEST_64 +//config: bool "Extend test to 64 bit" +//config: default n +//config: depends on TEST || ASH_BUILTIN_TEST || HUSH +//config: help +//config: Enable 64-bit support in test. + #include "libbb.h" #include diff --git a/coreutils/tr.c b/coreutils/tr.c index 6d4cb4a14..12d07152b 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c @@ -18,6 +18,35 @@ /* http://www.opengroup.org/onlinepubs/009695399/utilities/tr.html * TODO: graph, print */ + +//kbuild:lib-$(CONFIG_TR) += tr.o + +//config:config TR +//config: bool "tr" +//config: default n +//config: help +//config: tr is used to squeeze, and/or delete characters from standard +//config: input, writing to standard output. + +config FEATURE_TR_CLASSES + bool "Enable character classes (such as [:upper:])" + default n + depends on TR + help + Enable character classes, enabling commands such as: + tr [:upper:] [:lower:] to convert input into lowercase. + +config FEATURE_TR_EQUIV + bool "Enable equivalence classes" + default n + depends on TR + help + Enable equivalence classes, which essentially add the enclosed + character to the current set. For instance, tr [=a=] xyz would + replace all instances of 'a' with 'xyz'. This option is mainly + useful for cases when no other way of expressing a character + is possible. + #include "libbb.h" enum { -- cgit v1.2.3