diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-05 10:17:08 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-05 10:17:08 +0000 |
commit | 7d219aab70e6951ab82c27c202cac05016696723 (patch) | |
tree | 4c0679bfa391f71aee9b51505a5d3dc8f60a0cf7 /init | |
parent | 8f8f268cfdecb4cabeb2e649a73afc7a485aeff5 (diff) | |
download | busybox-w32-7d219aab70e6951ab82c27c202cac05016696723.tar.gz busybox-w32-7d219aab70e6951ab82c27c202cac05016696723.tar.bz2 busybox-w32-7d219aab70e6951ab82c27c202cac05016696723.zip |
build system overhaul
Diffstat (limited to 'init')
-rw-r--r-- | init/Config.in | 32 | ||||
-rw-r--r-- | init/Kbuild | 12 | ||||
-rw-r--r-- | init/Makefile | 23 | ||||
-rw-r--r-- | init/Makefile.in | 43 |
4 files changed, 28 insertions, 82 deletions
diff --git a/init/Config.in b/init/Config.in index 2a39d50e5..c0ad5263d 100644 --- a/init/Config.in +++ b/init/Config.in | |||
@@ -5,32 +5,32 @@ | |||
5 | 5 | ||
6 | menu "Init Utilities" | 6 | menu "Init Utilities" |
7 | 7 | ||
8 | config CONFIG_INIT | 8 | config INIT |
9 | bool "init" | 9 | bool "init" |
10 | default n | 10 | default n |
11 | select CONFIG_FEATURE_SYSLOG | 11 | select FEATURE_SYSLOG |
12 | help | 12 | help |
13 | init is the first program run when the system boots. | 13 | init is the first program run when the system boots. |
14 | 14 | ||
15 | config CONFIG_DEBUG_INIT | 15 | config DEBUG_INIT |
16 | bool "debugging aid" | 16 | bool "debugging aid" |
17 | default n | 17 | default n |
18 | depends on CONFIG_INIT | 18 | depends on INIT |
19 | help | 19 | help |
20 | Turn this on to disable all the dangerous | 20 | Turn this on to disable all the dangerous |
21 | rebooting stuff when debugging. | 21 | rebooting stuff when debugging. |
22 | 22 | ||
23 | config CONFIG_FEATURE_USE_INITTAB | 23 | config FEATURE_USE_INITTAB |
24 | bool "Support reading an inittab file" | 24 | bool "Support reading an inittab file" |
25 | default y | 25 | default y |
26 | depends on CONFIG_INIT | 26 | depends on INIT |
27 | help | 27 | help |
28 | Allow init to read an inittab file when the system boot. | 28 | Allow init to read an inittab file when the system boot. |
29 | 29 | ||
30 | config CONFIG_FEATURE_INIT_SCTTY | 30 | config FEATURE_INIT_SCTTY |
31 | bool "Support running commands with a controlling-tty" | 31 | bool "Support running commands with a controlling-tty" |
32 | default n | 32 | default n |
33 | depends on CONFIG_INIT | 33 | depends on INIT |
34 | help | 34 | help |
35 | If this option is enabled a command starting with hyphen (-) | 35 | If this option is enabled a command starting with hyphen (-) |
36 | is run in its own session (setsid(2)) and possibly with a | 36 | is run in its own session (setsid(2)) and possibly with a |
@@ -38,17 +38,17 @@ config CONFIG_FEATURE_INIT_SCTTY | |||
38 | behavour, but is often what you want in an embedded system where | 38 | behavour, but is often what you want in an embedded system where |
39 | the console is only accessed during development or for maintenance. | 39 | the console is only accessed during development or for maintenance. |
40 | 40 | ||
41 | config CONFIG_FEATURE_EXTRA_QUIET | 41 | config FEATURE_EXTRA_QUIET |
42 | bool "Be _extra_ quiet on boot" | 42 | bool "Be _extra_ quiet on boot" |
43 | default y | 43 | default y |
44 | depends on CONFIG_INIT | 44 | depends on INIT |
45 | help | 45 | help |
46 | Prevent init from logging some messages to the console during boot. | 46 | Prevent init from logging some messages to the console during boot. |
47 | 47 | ||
48 | config CONFIG_FEATURE_INIT_COREDUMPS | 48 | config FEATURE_INIT_COREDUMPS |
49 | bool "Support dumping core for child processes (debugging only)" | 49 | bool "Support dumping core for child processes (debugging only)" |
50 | default n | 50 | default n |
51 | depends on CONFIG_INIT | 51 | depends on INIT |
52 | help | 52 | help |
53 | If this option is enabled and the file /.init_enable_core | 53 | If this option is enabled and the file /.init_enable_core |
54 | exists, then init will call setrlimit() to allow unlimited | 54 | exists, then init will call setrlimit() to allow unlimited |
@@ -57,10 +57,10 @@ config CONFIG_FEATURE_INIT_COREDUMPS | |||
57 | 57 | ||
58 | 58 | ||
59 | 59 | ||
60 | config CONFIG_FEATURE_INITRD | 60 | config FEATURE_INITRD |
61 | bool "Support running init from within an initrd (not initramfs)" | 61 | bool "Support running init from within an initrd (not initramfs)" |
62 | default y | 62 | default y |
63 | depends on CONFIG_INIT | 63 | depends on INIT |
64 | help | 64 | help |
65 | Legacy support for running init under the old-style initrd. Allows | 65 | Legacy support for running init under the old-style initrd. Allows |
66 | the name linuxrc to act as init, and it doesn't assume init is PID 1. | 66 | the name linuxrc to act as init, and it doesn't assume init is PID 1. |
@@ -68,13 +68,13 @@ config CONFIG_FEATURE_INITRD | |||
68 | This does not apply to initramfs, which runs /init as PID 1 and | 68 | This does not apply to initramfs, which runs /init as PID 1 and |
69 | requires no special support. | 69 | requires no special support. |
70 | 70 | ||
71 | config CONFIG_HALT | 71 | config HALT |
72 | bool "poweroff, halt, and reboot" | 72 | bool "poweroff, halt, and reboot" |
73 | default y | 73 | default y |
74 | help | 74 | help |
75 | Stop all processes and either halt, reboot, or power off the system. | 75 | Stop all processes and either halt, reboot, or power off the system. |
76 | 76 | ||
77 | config CONFIG_MESG | 77 | config MESG |
78 | bool "mesg" | 78 | bool "mesg" |
79 | default y | 79 | default y |
80 | help | 80 | help |
diff --git a/init/Kbuild b/init/Kbuild new file mode 100644 index 000000000..e99360241 --- /dev/null +++ b/init/Kbuild | |||
@@ -0,0 +1,12 @@ | |||
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 | |||
7 | lib-y:= | ||
8 | lib-$(CONFIG_HALT) += halt.o | ||
9 | lib-$(CONFIG_INIT) += init.o | ||
10 | lib-$(CONFIG_MESG) += mesg.o | ||
11 | lib-$(CONFIG_INIT) += init_shared.o | ||
12 | lib-$(CONFIG_HALT) += init_shared.o | ||
diff --git a/init/Makefile b/init/Makefile deleted file mode 100644 index 63816f6aa..000000000 --- a/init/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 | |||
7 | ifndef top_srcdir | ||
8 | top_srcdir=.. | ||
9 | endif | ||
10 | ifndef top_builddir | ||
11 | top_builddir=.. | ||
12 | endif | ||
13 | srcdir=$(top_srcdir)/init | ||
14 | INIT_DIR:=./ | ||
15 | include $(top_srcdir)/Rules.mak | ||
16 | include $(top_builddir)/.config | ||
17 | include $(srcdir)/Makefile.in | ||
18 | all: $(libraries-y) | ||
19 | -include $(top_builddir)/.depend | ||
20 | |||
21 | clean: | ||
22 | rm -f *.o *.a $(AR_TARGET) | ||
23 | |||
diff --git a/init/Makefile.in b/init/Makefile.in deleted file mode 100644 index a48ead446..000000000 --- a/init/Makefile.in +++ /dev/null | |||
@@ -1,43 +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 | |||
7 | INIT_AR:=init.a | ||
8 | ifndef $(INIT_DIR) | ||
9 | INIT_DIR:=$(top_builddir)/init/ | ||
10 | endif | ||
11 | srcdir=$(top_srcdir)/init | ||
12 | |||
13 | INIT-y:= | ||
14 | INIT-$(CONFIG_HALT) += halt.o | ||
15 | INIT-$(CONFIG_INIT) += init.o | ||
16 | INIT-$(CONFIG_MESG) += mesg.o | ||
17 | |||
18 | ifeq ($(strip $(CONFIG_HALT)),y) | ||
19 | CONFIG_INIT_SHARED=y | ||
20 | else | ||
21 | ifeq ($(strip $(CONFIG_INIT)),y) | ||
22 | CONFIG_INIT_SHARED=y | ||
23 | else | ||
24 | CONFIG_INIT_SHARED=n | ||
25 | endif | ||
26 | endif | ||
27 | |||
28 | INIT-$(CONFIG_INIT_SHARED) += init_shared.o | ||
29 | |||
30 | ifneq ($(strip $(INIT-y)),) | ||
31 | libraries-y+=$(INIT_DIR)$(INIT_AR) | ||
32 | endif | ||
33 | |||
34 | INIT_SRC-y:=$(patsubst %.o,$(srcdir)/%.c,$(INIT-y)) | ||
35 | INIT_SRC-a:=$(wildcard $(srcdir)/*.c) | ||
36 | APPLET_SRC-y+=$(INIT_SRC-y) | ||
37 | APPLET_SRC-a+=$(INIT_SRC-a) | ||
38 | |||
39 | $(INIT_DIR)$(INIT_AR): $(patsubst %,$(INIT_DIR)%, $(INIT-y)) | ||
40 | $(do_ar) | ||
41 | |||
42 | $(INIT_DIR)%.o: $(srcdir)/%.c | ||
43 | $(compile.c) | ||