aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-12-13 22:53:28 +0000
committerEric Andersen <andersen@codepoet.org>2002-12-13 22:53:28 +0000
commit068b6b07ff5dc2dbb513f444cb094197f28e64c5 (patch)
treeedc607d86023620d52e6dec7884aa3bb6c8d41fe
parentc118f99f7379491138babcf929fe5fe30ea5c972 (diff)
downloadbusybox-w32-068b6b07ff5dc2dbb513f444cb094197f28e64c5.tar.gz
busybox-w32-068b6b07ff5dc2dbb513f444cb094197f28e64c5.tar.bz2
busybox-w32-068b6b07ff5dc2dbb513f444cb094197f28e64c5.zip
Don't build the ncurses stuff unless it is specifically asked for
-Erik
-rw-r--r--Makefile21
-rw-r--r--Rules.mak1
-rw-r--r--scripts/config/Makefile48
-rw-r--r--sysdeps/linux/Config.in4
4 files changed, 38 insertions, 36 deletions
diff --git a/Makefile b/Makefile
index 9a87ad4bd..58e397cfd 100644
--- a/Makefile
+++ b/Makefile
@@ -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
34ifdef include_config 34ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
35 35
36all: busybox busybox.links #doc 36all: busybox busybox.links #doc
37 37
@@ -142,7 +142,7 @@ include/config/MARKER: depend scripts/split-include
142 142
143include/config.h: .config 143include/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
157else # ifdef include_config 157else # ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
158 158
159all: menuconfig 159all: menuconfig
160 160
161ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
162# Targets which don't need .config
163
164# configuration 161# configuration
165# --------------------------------------------------------------------------- 162# ---------------------------------------------------------------------------
166 163
167scripts/config/conf scripts/config/mconf: 164scripts/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
169scripts/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
242endif # ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),) 244endif # ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
243endif # 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
diff --git a/Rules.mak b/Rules.mak
index 80f273672..caf7e65e6 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -103,7 +103,6 @@ endif
103 103
104# Pull in the user's uClibc configuration 104# Pull in the user's uClibc configuration
105ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) 105ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
106include_config := 1
107-include $(TOPDIR).config 106-include $(TOPDIR).config
108endif 107endif
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 @@
5TOPDIR=../../ 5TOPDIR=../../
6include $(TOPDIR)Rules.mak 6include $(TOPDIR)Rules.mak
7 7
8
9all: ncurses conf mconf 8all: ncurses conf mconf
10 9
11#HOSTCFLAGS=-Wall -g -O0
12LIBS = -lncurses 10LIBS = -lncurses
13ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) 11ifeq (/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>"
15else 13else
16ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) 14ifeq (/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>"
18else 16else
19ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) 17ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h))
20 HOSTCFLAGS += -DCURSES_LOC="<ncurses.h>" 18 HOSTNCURSES += -DCURSES_LOC="<ncurses.h>"
21else 19else
22 HOSTCFLAGS += -DCURSES_LOC="<curses.h>" 20 HOSTNCURSES += -DCURSES_LOC="<curses.h>"
23endif 21endif
24endif 22endif
25endif 23endif
26 24
27 25
28CONF_SRC =conf.c zconf.tab.c 26CONF_SRC =conf.c
29MCONF_SRC =mconf.c zconf.tab.c 27MCONF_SRC =mconf.c checklist.c menubox.c textbox.c yesno.c inputbox.c util.c msgbox.c
30LXDLG_SRC =checklist.c menubox.c textbox.c yesno.c inputbox.c util.c msgbox.c 28SHARED_SRC=zconf.tab.c
29SHARED_DEPS:=lkc.h lkc_proto.h lkc_defs.h expr.h zconf.tab.h
31CONF_OBJS =$(patsubst %.c,%.o, $(CONF_SRC)) 30CONF_OBJS =$(patsubst %.c,%.o, $(CONF_SRC))
32MCONF_OBJS=$(patsubst %.c,%.o, $(MCONF_SRC)) 31MCONF_OBJS=$(patsubst %.c,%.o, $(MCONF_SRC))
33LXDLG_OBJS=$(patsubst %.c,%.o, $(LXDLG_SRC)) 32SHARED_OBJS=$(patsubst %.c,%.o, $(SHARED_SRC))
34
35conf: $(CONF_OBJS)
36 $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) $^ -o $@
37
38mconf: $(MCONF_OBJS) $(LXDLG_OBJS)
39 $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS)
40
41lkc_deps:=lkc.h lkc_proto.h lkc_defs.h expr.h zconf.tab.h
42
43conf.o: conf.c $(lkc_deps)
44
45mconf.o: mconf.c $(lkc_deps)
46 33
47zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(lkc_deps) 34conf: $(CONF_OBJS) $(SHARED_OBJS)
35 $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@
48 36
49lex.zconf.o: lex.zconf.c $(lkc_deps) 37mconf: $(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
54lkc_defs.h: lkc_proto.h 46lkc_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$@ $<
70else 62else
71 63
64lex.zconf.o: lex.zconf.c $(SHARED_DEPS)
65 $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
66
72lex.zconf.c: lex.zconf.c_shipped 67lex.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
70zconf.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
75zconf.tab.c: zconf.tab.c_shipped 73zconf.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
6mainmenu "BusyBox Configuration" 6mainmenu "BusyBox Configuration"
7 7
8config HAVE_DOT_CONFIG
9 bool
10 default y
11
8menu "General Configuration" 12menu "General Configuration"
9 13
10choice 14choice