diff options
| -rw-r--r-- | Makefile | 21 | ||||
| -rw-r--r-- | Rules.mak | 1 | ||||
| -rw-r--r-- | scripts/config/Makefile | 48 | ||||
| -rw-r--r-- | sysdeps/linux/Config.in | 4 |
4 files changed, 38 insertions, 36 deletions
| @@ -31,7 +31,7 @@ DIRS:=applets archival archival/libunarchive console-tools debianutils \ | |||
| 31 | networking/libiproute networking/udhcp procps loginutils shell \ | 31 | networking/libiproute networking/udhcp procps loginutils shell \ |
| 32 | shellutils sysklogd textutils util-linux libbb libpwdgrp | 32 | shellutils sysklogd textutils util-linux libbb libpwdgrp |
| 33 | 33 | ||
| 34 | ifdef include_config | 34 | ifeq ($(strip $(HAVE_DOT_CONFIG)),y) |
| 35 | 35 | ||
| 36 | all: busybox busybox.links #doc | 36 | all: busybox busybox.links #doc |
| 37 | 37 | ||
| @@ -142,7 +142,7 @@ include/config/MARKER: depend scripts/split-include | |||
| 142 | 142 | ||
| 143 | include/config.h: .config | 143 | include/config.h: .config |
| 144 | @if [ ! -x ./scripts/config/conf ] ; then \ | 144 | @if [ ! -x ./scripts/config/conf ] ; then \ |
| 145 | make -C scripts/config; \ | 145 | make -C scripts/config conf; \ |
| 146 | fi; | 146 | fi; |
| 147 | @./scripts/config/conf -o sysdeps/$(TARGET_OS)/Config.in | 147 | @./scripts/config/conf -o sysdeps/$(TARGET_OS)/Config.in |
| 148 | 148 | ||
| @@ -154,18 +154,20 @@ finished2: | |||
| 154 | @echo Finished installing... | 154 | @echo Finished installing... |
| 155 | @echo | 155 | @echo |
| 156 | 156 | ||
| 157 | else # ifdef include_config | 157 | else # ifeq ($(strip $(HAVE_DOT_CONFIG)),y) |
| 158 | 158 | ||
| 159 | all: menuconfig | 159 | all: menuconfig |
| 160 | 160 | ||
| 161 | ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),) | ||
| 162 | # Targets which don't need .config | ||
| 163 | |||
| 164 | # configuration | 161 | # configuration |
| 165 | # --------------------------------------------------------------------------- | 162 | # --------------------------------------------------------------------------- |
| 166 | 163 | ||
| 167 | scripts/config/conf scripts/config/mconf: | 164 | scripts/config/conf: |
| 168 | make -C scripts/config | 165 | make -C scripts/config conf |
| 166 | -@if [ ! -f .config ] ; then \ | ||
| 167 | cp sysdeps/$(TARGET_OS)/defconfig .config; \ | ||
| 168 | fi | ||
| 169 | scripts/config/mconf: | ||
| 170 | make -C scripts/config ncurses conf mconf | ||
| 169 | -@if [ ! -f .config ] ; then \ | 171 | -@if [ ! -f .config ] ; then \ |
| 170 | cp sysdeps/$(TARGET_OS)/defconfig .config; \ | 172 | cp sysdeps/$(TARGET_OS)/defconfig .config; \ |
| 171 | fi | 173 | fi |
| @@ -239,8 +241,7 @@ tags: | |||
| 239 | ctags -R . | 241 | ctags -R . |
| 240 | 242 | ||
| 241 | 243 | ||
| 242 | endif # ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),) | 244 | endif # ifeq ($(strip $(HAVE_DOT_CONFIG)),y) |
| 243 | endif # ifdef include_config | ||
| 244 | 245 | ||
| 245 | .PHONY: dummy subdirs release distclean clean config oldconfig \ | 246 | .PHONY: dummy subdirs release distclean clean config oldconfig \ |
| 246 | menuconfig tags check test tests depend | 247 | menuconfig tags check test tests depend |
| @@ -103,7 +103,6 @@ endif | |||
| 103 | 103 | ||
| 104 | # Pull in the user's uClibc configuration | 104 | # Pull in the user's uClibc configuration |
| 105 | ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) | 105 | ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) |
| 106 | include_config := 1 | ||
| 107 | -include $(TOPDIR).config | 106 | -include $(TOPDIR).config |
| 108 | endif | 107 | endif |
| 109 | 108 | ||
diff --git a/scripts/config/Makefile b/scripts/config/Makefile index d43c8b14f..002b8d547 100644 --- a/scripts/config/Makefile +++ b/scripts/config/Makefile | |||
| @@ -5,52 +5,44 @@ | |||
| 5 | TOPDIR=../../ | 5 | TOPDIR=../../ |
| 6 | include $(TOPDIR)Rules.mak | 6 | include $(TOPDIR)Rules.mak |
| 7 | 7 | ||
| 8 | |||
| 9 | all: ncurses conf mconf | 8 | all: ncurses conf mconf |
| 10 | 9 | ||
| 11 | #HOSTCFLAGS=-Wall -g -O0 | ||
| 12 | LIBS = -lncurses | 10 | LIBS = -lncurses |
| 13 | ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) | 11 | ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) |
| 14 | HOSTCFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>" | 12 | HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>" |
| 15 | else | 13 | else |
| 16 | ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) | 14 | ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) |
| 17 | HOSTCFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>" | 15 | HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>" |
| 18 | else | 16 | else |
| 19 | ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) | 17 | ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) |
| 20 | HOSTCFLAGS += -DCURSES_LOC="<ncurses.h>" | 18 | HOSTNCURSES += -DCURSES_LOC="<ncurses.h>" |
| 21 | else | 19 | else |
| 22 | HOSTCFLAGS += -DCURSES_LOC="<curses.h>" | 20 | HOSTNCURSES += -DCURSES_LOC="<curses.h>" |
| 23 | endif | 21 | endif |
| 24 | endif | 22 | endif |
| 25 | endif | 23 | endif |
| 26 | 24 | ||
| 27 | 25 | ||
| 28 | CONF_SRC =conf.c zconf.tab.c | 26 | CONF_SRC =conf.c |
| 29 | MCONF_SRC =mconf.c zconf.tab.c | 27 | MCONF_SRC =mconf.c checklist.c menubox.c textbox.c yesno.c inputbox.c util.c msgbox.c |
| 30 | LXDLG_SRC =checklist.c menubox.c textbox.c yesno.c inputbox.c util.c msgbox.c | 28 | SHARED_SRC=zconf.tab.c |
| 29 | SHARED_DEPS:=lkc.h lkc_proto.h lkc_defs.h expr.h zconf.tab.h | ||
| 31 | CONF_OBJS =$(patsubst %.c,%.o, $(CONF_SRC)) | 30 | CONF_OBJS =$(patsubst %.c,%.o, $(CONF_SRC)) |
| 32 | MCONF_OBJS=$(patsubst %.c,%.o, $(MCONF_SRC)) | 31 | MCONF_OBJS=$(patsubst %.c,%.o, $(MCONF_SRC)) |
| 33 | LXDLG_OBJS=$(patsubst %.c,%.o, $(LXDLG_SRC)) | 32 | SHARED_OBJS=$(patsubst %.c,%.o, $(SHARED_SRC)) |
| 34 | |||
| 35 | conf: $(CONF_OBJS) | ||
| 36 | $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) $^ -o $@ | ||
| 37 | |||
| 38 | mconf: $(MCONF_OBJS) $(LXDLG_OBJS) | ||
| 39 | $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS) | ||
| 40 | |||
| 41 | lkc_deps:=lkc.h lkc_proto.h lkc_defs.h expr.h zconf.tab.h | ||
| 42 | |||
| 43 | conf.o: conf.c $(lkc_deps) | ||
| 44 | |||
| 45 | mconf.o: mconf.c $(lkc_deps) | ||
| 46 | 33 | ||
| 47 | zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(lkc_deps) | 34 | conf: $(CONF_OBJS) $(SHARED_OBJS) |
| 35 | $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ | ||
| 48 | 36 | ||
| 49 | lex.zconf.o: lex.zconf.c $(lkc_deps) | 37 | mconf: $(MCONF_OBJS) $(SHARED_OBJS) |
| 38 | $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS) | ||
| 50 | 39 | ||
| 51 | %.o : %.c | 40 | $(CONF_OBJS): %.o : %.c $(SHARED_DEPS) |
| 52 | $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ | 41 | $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ |
| 53 | 42 | ||
| 43 | $(MCONF_OBJS): %.o : %.c $(SHARED_DEPS) | ||
| 44 | $(HOSTCC) $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@ | ||
| 45 | |||
| 54 | lkc_defs.h: lkc_proto.h | 46 | lkc_defs.h: lkc_proto.h |
| 55 | @sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' | 47 | @sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' |
| 56 | 48 | ||
| @@ -69,9 +61,15 @@ lex.%.c: %.l | |||
| 69 | flex -P$(notdir $*) -o$@ $< | 61 | flex -P$(notdir $*) -o$@ $< |
| 70 | else | 62 | else |
| 71 | 63 | ||
| 64 | lex.zconf.o: lex.zconf.c $(SHARED_DEPS) | ||
| 65 | $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ | ||
| 66 | |||
| 72 | lex.zconf.c: lex.zconf.c_shipped | 67 | lex.zconf.c: lex.zconf.c_shipped |
| 73 | cp lex.zconf.c_shipped lex.zconf.c | 68 | cp lex.zconf.c_shipped lex.zconf.c |
| 74 | 69 | ||
| 70 | zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(SHARED_DEPS) | ||
| 71 | $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ | ||
| 72 | |||
| 75 | zconf.tab.c: zconf.tab.c_shipped | 73 | zconf.tab.c: zconf.tab.c_shipped |
| 76 | cp zconf.tab.c_shipped zconf.tab.c | 74 | cp zconf.tab.c_shipped zconf.tab.c |
| 77 | 75 | ||
diff --git a/sysdeps/linux/Config.in b/sysdeps/linux/Config.in index 747cc9b71..8648e1489 100644 --- a/sysdeps/linux/Config.in +++ b/sysdeps/linux/Config.in | |||
| @@ -5,6 +5,10 @@ | |||
| 5 | 5 | ||
| 6 | mainmenu "BusyBox Configuration" | 6 | mainmenu "BusyBox Configuration" |
| 7 | 7 | ||
| 8 | config HAVE_DOT_CONFIG | ||
| 9 | bool | ||
| 10 | default y | ||
| 11 | |||
| 8 | menu "General Configuration" | 12 | menu "General Configuration" |
| 9 | 13 | ||
| 10 | choice | 14 | choice |
