summaryrefslogtreecommitdiffhomepage
path: root/miscutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-05 10:17:08 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-05 10:17:08 +0000
commit7d219aab70e6951ab82c27c202cac05016696723 (patch)
tree4c0679bfa391f71aee9b51505a5d3dc8f60a0cf7 /miscutils
parent8f8f268cfdecb4cabeb2e649a73afc7a485aeff5 (diff)
build system overhaul
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/Config.in128
-rw-r--r--miscutils/Kbuild27
-rw-r--r--miscutils/Makefile23
-rw-r--r--miscutils/Makefile.in55
-rw-r--r--miscutils/rx.c5
5 files changed, 93 insertions, 145 deletions
diff --git a/miscutils/Config.in b/miscutils/Config.in
index 50ed4df99..311c7135c 100644
--- a/miscutils/Config.in
+++ b/miscutils/Config.in
@@ -5,25 +5,25 @@
menu "Miscellaneous Utilities"
-config CONFIG_ADJTIMEX
+config ADJTIMEX
bool "adjtimex"
default n
help
Adjtimex reads and optionally sets adjustment parameters for
the Linux clock adjustment algorithm.
-config CONFIG_BBCONFIG
+config BBCONFIG
bool "bbconfig"
default n
help
The bbconfig applet will print the config file with which
busybox was built.
-config CONFIG_CROND
+config CROND
bool "crond"
default n
- select CONFIG_FEATURE_SUID
- select CONFIG_FEATURE_SYSLOG
+ select FEATURE_SUID
+ select FEATURE_SYSLOG
help
Crond is a background daemon that parses individual crontab
files and executes commands on behalf of the users in question.
@@ -35,39 +35,39 @@ config CONFIG_CROND
Note that Busybox binary must be setuid root for this applet to
work properly.
-config CONFIG_DEBUG_CROND_OPTION
+config DEBUG_CROND_OPTION
bool "Support debug option -d"
- depends on CONFIG_CROND
+ depends on CROND
default n
help
Support option -d to enter debug mode.
-config CONFIG_FEATURE_CROND_CALL_SENDMAIL
+config FEATURE_CROND_CALL_SENDMAIL
bool "Using /usr/sbin/sendmail?"
default n
- depends on CONFIG_CROND
+ depends on CROND
help
Support calling /usr/sbin/sendmail for send cmd outputs.
-config CONFIG_CRONTAB
+config CRONTAB
bool "crontab"
default n
- select CONFIG_FEATURE_SUID
+ select FEATURE_SUID
help
Crontab manipulates the crontab for a particular user. Only
the superuser may specify a different user and/or crontab directory.
-config CONFIG_DC
+config DC
bool "dc"
default n
help
Dc is a reverse-polish desk calculator which supports unlimited
precision arithmetic.
-config CONFIG_DEVFSD
+config DEVFSD
bool "devfsd (obsolete)"
default n
- select CONFIG_FEATURE_SYSLOG
+ select FEATURE_SYSLOG
help
This is deprecated, and will be removed at the end of 2008.
@@ -80,30 +80,30 @@ config CONFIG_DEVFSD
But only if they are written UPPERCASE!!!!!!!!
-config CONFIG_DEVFSD_MODLOAD
+config DEVFSD_MODLOAD
bool "Adds support for MODLOAD keyword in devsfd.conf"
default n
- depends on CONFIG_DEVFSD
+ depends on DEVFSD
help
This actually doesn't work with busybox modutils but needs
the external modutils.
-config CONFIG_DEVFSD_FG_NP
+config DEVFSD_FG_NP
bool "Enables the -fg and -np options"
default n
- depends on CONFIG_DEVFSD
+ depends on DEVFSD
help
-fg Run the daemon in the foreground.
-np Exit after parsing the configuration file. Do not poll for events.
-config CONFIG_DEVFSD_VERBOSE
+config DEVFSD_VERBOSE
bool "Increases logging (and size)"
default n
- depends on CONFIG_DEVFSD
+ depends on DEVFSD
help
Increases logging to stderr or syslog.
-config CONFIG_FEATURE_DEVFS
+config FEATURE_DEVFS
bool " Use devfs names for all devices (obsolete)"
default n
help
@@ -113,126 +113,126 @@ config CONFIG_FEATURE_DEVFS
/dev/loop0. If your /dev directory has normal names instead of
devfs names, you don't want this.
-config CONFIG_EJECT
+config EJECT
bool "eject"
default n
help
Used to eject cdroms. (defaults to /dev/cdrom)
-config CONFIG_LAST
+config LAST
bool "last"
default n
- select CONFIG_FEATURE_WTMP
+ select FEATURE_WTMP
help
'last' displays a list of the last users that logged into the system.
-config CONFIG_LESS
+config LESS
bool "less"
default n
help
'less' is a pager, meaning that it displays text files. It possesses
a wide array of features, and is an improvement over 'more'.
-config CONFIG_FEATURE_LESS_BRACKETS
+config FEATURE_LESS_BRACKETS
bool "Enable bracket searching"
default y
- depends on CONFIG_LESS
+ depends on LESS
help
This option adds the capability to search for matching left and right
brackets, facilitating programming.
-config CONFIG_FEATURE_LESS_FLAGS
+config FEATURE_LESS_FLAGS
bool "Enable extra flags"
default y
- depends on CONFIG_LESS
+ depends on LESS
help
The extra flags provided do the following:
The -M flag enables a more sophisticated status line.
The -m flag enables a simpler status line with a percentage.
-config CONFIG_FEATURE_LESS_FLAGCS
+config FEATURE_LESS_FLAGCS
bool "Enable flag changes"
default n
- depends on CONFIG_LESS
+ depends on LESS
help
This enables the ability to change command-line flags within
less itself.
-config CONFIG_FEATURE_LESS_MARKS
+config FEATURE_LESS_MARKS
bool "Enable marks"
default n
- depends on CONFIG_LESS
+ depends on LESS
help
Marks enable positions in a file to be stored for easy reference.
-config CONFIG_FEATURE_LESS_REGEXP
+config FEATURE_LESS_REGEXP
bool "Enable regular expressions"
default n
- depends on CONFIG_LESS
+ depends on LESS
help
Enable regular expressions, allowing complex file searches.
-config CONFIG_HDPARM
+config HDPARM
bool "hdparm"
default n
help
Get/Set hard drive parameters. Primarily intended for ATA
drives. Adds about 13k (or around 30k if you enable the
- CONFIG_FEATURE_HDPARM_GET_IDENTITY option)....
+ FEATURE_HDPARM_GET_IDENTITY option)....
-config CONFIG_FEATURE_HDPARM_GET_IDENTITY
+config FEATURE_HDPARM_GET_IDENTITY
bool "Support obtaining detailed information directly from drives"
default y
- depends on CONFIG_HDPARM
+ depends on HDPARM
help
Enables the -I and -i options to obtain detailed information
directly from drives about their capabilities and supported ATA
feature set. If no device name is specified, hdparm will read
identify data from stdin. Enabling this option will add about 16k...
-config CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF
+config FEATURE_HDPARM_HDIO_SCAN_HWIF
bool "Register an IDE interface (DANGEROUS)"
default n
- depends on CONFIG_HDPARM
+ depends on HDPARM
help
Enables the 'hdparm -R' option to register an IDE interface.
This is dangerous stuff, so you should probably say N.
-config CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
+config FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
bool "Un-register an IDE interface (DANGEROUS)"
default n
- depends on CONFIG_HDPARM
+ depends on HDPARM
help
Enables the 'hdparm -U' option to un-register an IDE interface.
This is dangerous stuff, so you should probably say N.
-config CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET
+config FEATURE_HDPARM_HDIO_DRIVE_RESET
bool "perform device reset (DANGEROUS)"
default n
- depends on CONFIG_HDPARM
+ depends on HDPARM
help
Enables the 'hdparm -w' option to perform a device reset.
This is dangerous stuff, so you should probably say N.
-config CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF
+config FEATURE_HDPARM_HDIO_TRISTATE_HWIF
bool "tristate device for hotswap (DANGEROUS)"
default n
- depends on CONFIG_HDPARM
+ depends on HDPARM
help
Enables the 'hdparm -x' option to tristate device for hotswap,
and the '-b' option to get/set bus state. This is dangerous
stuff, so you should probably say N.
-config CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA
+config FEATURE_HDPARM_HDIO_GETSET_DMA
bool "get/set using_dma flag (DANGEROUS)"
default n
- depends on CONFIG_HDPARM
+ depends on HDPARM
help
Enables the 'hdparm -d' option to get/set using_dma flag.
This is dangerous stuff, so you should probably say N.
-config CONFIG_MAKEDEVS
+config MAKEDEVS
bool "makedevs"
default n
help
@@ -253,24 +253,24 @@ config CONFIG_MAKEDEVS
choice
prompt "Choose makedevs behaviour"
- depends CONFIG_MAKEDEVS
- default CONFIG_FEATURE_MAKEDEVS_TABLE
+ depends MAKEDEVS
+ default FEATURE_MAKEDEVS_TABLE
-config CONFIG_FEATURE_MAKEDEVS_LEAF
+config FEATURE_MAKEDEVS_LEAF
bool "leaf"
-config CONFIG_FEATURE_MAKEDEVS_TABLE
+config FEATURE_MAKEDEVS_TABLE
bool "table"
endchoice
-config CONFIG_MOUNTPOINT
+config MOUNTPOINT
bool "mountpoint"
default n
help
mountpoint checks if the directory is a mountpoint.
-config CONFIG_MT
+config MT
bool "mt"
default n
help
@@ -278,7 +278,7 @@ config CONFIG_MT
to advance or rewind a tape past a specified number of archive
files on the tape.
-config CONFIG_READAHEAD
+config READAHEAD
bool "readahead"
default n
help
@@ -294,7 +294,7 @@ config CONFIG_READAHEAD
As readahead(2) blocks until each file has been read, it is best to
run this applet as a background job.
-config CONFIG_RUNLEVEL
+config RUNLEVEL
bool "runlevel"
default n
help
@@ -303,32 +303,32 @@ config CONFIG_RUNLEVEL
This applet uses utmp but does not rely on busybox supporing
utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc.
-config CONFIG_RX
+config RX
bool "rx"
default n
help
Receive files using the Xmodem protocol.
-config CONFIG_STRINGS
+config STRINGS
bool "strings"
default n
help
strings prints the printable character sequences for each file
specified.
-config CONFIG_SETSID
+config SETSID
bool "setsid"
default n
help
setsid runs a program in a new session
-config CONFIG_TASKSET
+config TASKSET
bool "taskset"
default n
help
Retrieve or set a processes's CPU affinity.
-config CONFIG_TIME
+config TIME
bool "time"
default n
help
@@ -336,7 +336,7 @@ config CONFIG_TIME
When the command finishes, time writes a message to standard output
giving timing statistics about this program run.
-config CONFIG_WATCHDOG
+config WATCHDOG
bool "watchdog"
default n
help
diff --git a/miscutils/Kbuild b/miscutils/Kbuild
new file mode 100644
index 000000000..1c9e9fded
--- /dev/null
+++ b/miscutils/Kbuild
@@ -0,0 +1,27 @@
+# Makefile for busybox
+#
+# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
+#
+# Licensed under the GPL v2, see the file LICENSE in this tarball.
+
+lib-y:=
+lib-$(CONFIG_ADJTIMEX) += adjtimex.o
+lib-$(CONFIG_CROND) += crond.o
+lib-$(CONFIG_CRONTAB) += crontab.o
+lib-$(CONFIG_BBCONFIG) += bbconfig.o
+lib-$(CONFIG_DC) += dc.o
+lib-$(CONFIG_DEVFSD) += devfsd.o
+lib-$(CONFIG_EJECT) += eject.o
+lib-$(CONFIG_HDPARM) += hdparm.o
+lib-$(CONFIG_LAST) += last.o
+lib-$(CONFIG_LESS) += less.o
+lib-$(CONFIG_MAKEDEVS) += makedevs.o
+lib-$(CONFIG_MOUNTPOINT) += mountpoint.o
+lib-$(CONFIG_MT) += mt.o
+lib-$(CONFIG_READAHEAD) += readahead.o
+lib-$(CONFIG_RUNLEVEL) += runlevel.o
+lib-$(CONFIG_RX) += rx.o
+lib-$(CONFIG_SETSID) += setsid.o
+lib-$(CONFIG_STRINGS) += strings.o
+lib-$(CONFIG_TIME) += time.o
+lib-$(CONFIG_WATCHDOG) += watchdog.o
diff --git a/miscutils/Makefile b/miscutils/Makefile
deleted file mode 100644
index 91b31ec9e..000000000
--- a/miscutils/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-ifndef top_srcdir
-top_srcdir=..
-endif
-ifndef top_builddir
-top_builddir=..
-endif
-srcdir=$(top_srcdir)/miscutils
-MISCUTILS_DIR:=./
-include $(top_srcdir)/Rules.mak
-include $(top_builddir)/.config
-include Makefile.in
-all: $(libraries-y)
--include $(top_builddir)/.depend
-
-clean:
- rm -f *.o *.a $(AR_TARGET)
-
diff --git a/miscutils/Makefile.in b/miscutils/Makefile.in
deleted file mode 100644
index d32d7714e..000000000
--- a/miscutils/Makefile.in
+++ /dev/null
@@ -1,55 +0,0 @@
-# Makefile for busybox
-#
-# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
-#
-# Licensed under the GPL v2, see the file LICENSE in this tarball.
-
-MISCUTILS_AR:=miscutils.a
-ifndef $(MISCUTILS_DIR)
-MISCUTILS_DIR:=$(top_builddir)/miscutils/
-endif
-srcdir=$(top_srcdir)/miscutils
-
-MISCUTILS-y:=
-MISCUTILS-$(CONFIG_ADJTIMEX) += adjtimex.o
-MISCUTILS-$(CONFIG_CROND) += crond.o
-MISCUTILS-$(CONFIG_CRONTAB) += crontab.o
-MISCUTILS-$(CONFIG_BBCONFIG) += bbconfig.o
-MISCUTILS-$(CONFIG_DC) += dc.o
-MISCUTILS-$(CONFIG_DEVFSD) += devfsd.o
-MISCUTILS-$(CONFIG_EJECT) += eject.o
-MISCUTILS-$(CONFIG_HDPARM) += hdparm.o
-MISCUTILS-$(CONFIG_LAST) += last.o
-MISCUTILS-$(CONFIG_LESS) += less.o
-MISCUTILS-$(CONFIG_MAKEDEVS) += makedevs.o
-MISCUTILS-$(CONFIG_MOUNTPOINT) += mountpoint.o
-MISCUTILS-$(CONFIG_MT) += mt.o
-MISCUTILS-$(CONFIG_READAHEAD) += readahead.o
-MISCUTILS-$(CONFIG_RUNLEVEL) += runlevel.o
-MISCUTILS-$(CONFIG_RX) += rx.o
-MISCUTILS-$(CONFIG_SETSID) += setsid.o
-MISCUTILS-$(CONFIG_STRINGS) += strings.o
-MISCUTILS-$(CONFIG_TIME) += time.o
-MISCUTILS-$(CONFIG_WATCHDOG) += watchdog.o
-
-ifneq ($(strip $(MISCUTILS-y)),)
-libraries-y+=$(MISCUTILS_DIR)$(MISCUTILS_AR)
-endif
-
-MISCUTILS_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(MISCUTILS-y))
-MISCUTILS_SRC-a:=$(wildcard $(srcdir)/*.c)
-APPLET_SRC-y+=$(MISCUTILS_SRC-y)
-APPLET_SRC-a+=$(MISCUTILS_SRC-a)
-
-needlibm-y:=
-needlibm-$(CONFIG_DC) := y
-
-ifeq ($(needlibm-y),y)
- LIBRARIES := -lm $(filter-out -lm,$(LIBRARIES))
-endif
-
-$(MISCUTILS_DIR)$(MISCUTILS_AR): $(patsubst %,$(MISCUTILS_DIR)%, $(MISCUTILS-y))
- $(do_ar)
-
-$(MISCUTILS_DIR)%.o: $(srcdir)/%.c
- $(compile.c)
diff --git a/miscutils/rx.c b/miscutils/rx.c
index 52a76bfd9..00951b711 100644
--- a/miscutils/rx.c
+++ b/miscutils/rx.c
@@ -266,7 +266,7 @@ int rx_main(int argc, char **argv)
filefd = xopen3(fn, O_RDWR|O_CREAT|O_TRUNC, 0666);
if (tcgetattr(ttyfd, &tty) < 0)
- bb_perror_msg_and_die("%s: tcgetattr failed", argv[0]);
+ bb_perror_msg_and_die("tcgetattr");
orig_tty = tty;
@@ -284,8 +284,7 @@ int rx_main(int argc, char **argv)
tcsetattr(ttyfd, TCSAFLUSH, &orig_tty);
if (n < 0)
- bb_error_msg_and_die("\n%s: receive failed:\n %s",
- argv[0], error_buf);
+ bb_error_msg_and_die("\nreceive failed:\n %s", error_buf);
bb_fflush_stdout_and_exit(EXIT_SUCCESS);
}