aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-10-24 07:58:02 +0000
committerEric Andersen <andersen@codepoet.org>2001-10-24 07:58:02 +0000
commit3cd2760ba1b235f3ead9feaaa1d3c41def3fb3bc (patch)
treed1aa8310f145b546b4f791c09f39f953959739ff
parentb36e684fd7dc7d66f64eac9e4215029823586999 (diff)
downloadbusybox-w32-3cd2760ba1b235f3ead9feaaa1d3c41def3fb3bc.tar.gz
busybox-w32-3cd2760ba1b235f3ead9feaaa1d3c41def3fb3bc.tar.bz2
busybox-w32-3cd2760ba1b235f3ead9feaaa1d3c41def3fb3bc.zip
Fixup the new buildsystem a bit.
-rw-r--r--Makefile29
-rwxr-xr-xapplets/busybox.mkll4
-rwxr-xr-xapplets/busybox.sh16
3 files changed, 24 insertions, 25 deletions
diff --git a/Makefile b/Makefile
index 8cae385ce..864fa7d37 100644
--- a/Makefile
+++ b/Makefile
@@ -200,6 +200,7 @@ CONFIGURATION = menuconfig
200do-it-all: menuconfig 200do-it-all: menuconfig
201endif 201endif
202 202
203
203SUBDIRS =applets archival console-tools editors fileutils findutils init \ 204SUBDIRS =applets archival console-tools editors fileutils findutils init \
204 miscutils modutils networking pwd_grp shell shellutils sysklogd \ 205 miscutils modutils networking pwd_grp shell shellutils sysklogd \
205 textutils util-linux libbb 206 textutils util-linux libbb
@@ -209,7 +210,7 @@ bbsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
209$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/config/MARKER 210$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/config/MARKER
210 $(MAKE) CFLAGS="$(CFLAGS)" -C $(patsubst _dir_%, %, $@) 211 $(MAKE) CFLAGS="$(CFLAGS)" -C $(patsubst _dir_%, %, $@)
211 212
212busybox: bbsubdirs 213busybox: config.h depend bbsubdirs
213 $(CC) $(LDFLAGS) -o $@ $(shell find $(SUBDIRS) -name \*.a) $(LIBCONFIG_LIB) $(LIBRARIES) 214 $(CC) $(LDFLAGS) -o $@ $(shell find $(SUBDIRS) -name \*.a) $(LIBCONFIG_LIB) $(LIBRARIES)
214 $(STRIPCMD) 215 $(STRIPCMD)
215 216
@@ -291,13 +292,19 @@ scripts/mkdep: scripts/mkdep.c
291scripts/split-include: scripts/split-include.c 292scripts/split-include: scripts/split-include.c
292 $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c 293 $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
293 294
294dep-files: scripts/mkdep #archdep 295dep-files: scripts/mkdep
295 rm -f .depend .hdepend 296 if [ ! -f .depend ] ; then \
296 scripts/mkdep -I $(TOPDIR)/include -- `find $(TOPDIR) -name \*.c -print` >> .depend 297 rm -f .depend .hdepend; \
297 scripts/mkdep -I $(TOPDIR)/include -- `find $(TOPDIR) -name \*.h -print` >> .hdepend 298 mkdir -p $(TOPDIR)/include/config; \
298 $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)" 299 scripts/mkdep -I $(TOPDIR)/include -- \
300 `find $(TOPDIR) -name \*.c -print` >> .depend; \
301 scripts/mkdep -I $(TOPDIR)/include -- \
302 `find $(TOPDIR) -name \*.h -print` >> .hdepend; \
303 $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)" ; \
304 fi;
305
299 306
300depend dep: dep-files 307depend dep: config.h dep-files
301 @ echo -e "\n\nNow run 'make' to build BusyBox\n\n" 308 @ echo -e "\n\nNow run 'make' to build BusyBox\n\n"
302 309
303CONFIG_SHELL := ${shell if [ -x "$$BASH" ]; then echo $$BASH; \ 310CONFIG_SHELL := ${shell if [ -x "$$BASH" ]; then echo $$BASH; \
@@ -308,14 +315,22 @@ include/config/MARKER: scripts/split-include include/config.h
308 scripts/split-include include/config.h include/config 315 scripts/split-include include/config.h include/config
309 @ touch include/config/MARKER 316 @ touch include/config/MARKER
310 317
318config.h:
319 @if [ ! -f include/config.h ] ; then \
320 make oldconfig; \
321 fi;
322
311menuconfig: 323menuconfig:
324 mkdir -p $(TOPDIR)/include/config
312 $(MAKE) -C scripts/lxdialog all 325 $(MAKE) -C scripts/lxdialog all
313 $(CONFIG_SHELL) scripts/Menuconfig sysdeps/$(TARGET_OS)/config.in 326 $(CONFIG_SHELL) scripts/Menuconfig sysdeps/$(TARGET_OS)/config.in
314 327
315config: 328config:
329 mkdir -p $(TOPDIR)/include/config
316 $(CONFIG_SHELL) scripts/Configure sysdeps/$(TARGET_OS)/config.in 330 $(CONFIG_SHELL) scripts/Configure sysdeps/$(TARGET_OS)/config.in
317 331
318oldconfig: 332oldconfig:
333 mkdir -p $(TOPDIR)/include/config
319 $(CONFIG_SHELL) scripts/Configure -d sysdeps/$(TARGET_OS)/config.in 334 $(CONFIG_SHELL) scripts/Configure -d sysdeps/$(TARGET_OS)/config.in
320 335
321 336
diff --git a/applets/busybox.mkll b/applets/busybox.mkll
index 4e15e1611..5b6677d03 100755
--- a/applets/busybox.mkll
+++ b/applets/busybox.mkll
@@ -10,8 +10,8 @@
10export LC_ALL=POSIX 10export LC_ALL=POSIX
11export LC_CTYPE=POSIX 11export LC_CTYPE=POSIX
12 12
13CONFIG_H=${1:-Config.h} 13CONFIG_H=${1:-include/config.h}
14APPLETS_H=${2:-applets.h} 14APPLETS_H=${2:-include/applets.h}
15gcc -E -DMAKE_LINKS -include $CONFIG_H $APPLETS_H | 15gcc -E -DMAKE_LINKS -include $CONFIG_H $APPLETS_H |
16 awk '/^[ \t]*LINK/{ 16 awk '/^[ \t]*LINK/{
17 dir=substr($2,8) 17 dir=substr($2,8)
diff --git a/applets/busybox.sh b/applets/busybox.sh
deleted file mode 100755
index 6ac4e8043..000000000
--- a/applets/busybox.sh
+++ /dev/null
@@ -1,16 +0,0 @@
1#!/bin/sh
2
3export LC_ALL=POSIX
4export LC_CTYPE=POSIX
5
6RAW=` \
7 $CC -E -dM ${1:-Config.h} | \
8 sed -n -e '/^.*CONFIG_FEATURE.*$/d;s/^#define.*\<CONFIG_\(.*\)\>/\1.c/gp;' \
9 | tr A-Z a-z | sort
10`
11test "${RAW}" != "" || exit
12if [ -d "$CONFIG_SRC_DIR" ]; then cd $CONFIG_SRC_DIR; fi
13# By running $RAW through "ls", we avoid listing
14# source files that don't exist.
15ls $RAW 2>/dev/null | tr '\n' ' '
16