aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-11-26 05:25:24 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-11-26 05:25:24 +0100
commitfa1e7177fbd442f15e31cf96113b582753764de7 (patch)
tree71034a6be4a50fbe63a6a5421223c5c4f337c3ec
parentb2e5fc35ebc127e2a1ac03c7ff0719b1e6b6cd6b (diff)
downloadbusybox-w32-fa1e7177fbd442f15e31cf96113b582753764de7.tar.gz
busybox-w32-fa1e7177fbd442f15e31cf96113b582753764de7.tar.bz2
busybox-w32-fa1e7177fbd442f15e31cf96113b582753764de7.zip
build system: fix for coarse mtime problem
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--scripts/kconfig/Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index f56863f7c..b5708e2e4 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -17,11 +17,28 @@ menuconfig: $(obj)/mconf
17config: $(obj)/conf 17config: $(obj)/conf
18 $< Config.in 18 $< Config.in
19 19
20# Mtime granularity problem.
21# It was observed that these commands:
22# make allnoconfig; sed -i -e '/CONFIG_TRUE/s/.*/CONFIG_TRUE=y/' .config; make
23# sometimes produce busybox with "true" applet still disabled.
24# This is caused by .config updated by sed having mtime which is still
25# equal to (not bigger than) include/autoconf.h's mtime,
26# and thus 2nd make does not regenerate include/autoconf.h.
27# Waiting for 1 second after non-interactive "make XXXXconfig"
28# prevents this from happening.
29#
30# We'd like to detect whether filesystem we are on has coarse mtimes,
31# but can't do it yet, bbox ls hasn't got --full-time.
32#MTIME_IS_COARSE:=@ls --full-time -ld | grep -F .000 >/dev/null
33MTIME_IS_COARSE:=@true
34
20oldconfig: $(obj)/conf 35oldconfig: $(obj)/conf
21 $< -o Config.in 36 $< -o Config.in
37 $(MTIME_IS_COARSE) && sleep 1
22 38
23silentoldconfig: $(obj)/conf 39silentoldconfig: $(obj)/conf
24 $< -s Config.in 40 $< -s Config.in
41 $(MTIME_IS_COARSE) && sleep 1
25 42
26update-po-config: $(obj)/kxgettext 43update-po-config: $(obj)/kxgettext
27 xgettext --default-domain=linux \ 44 xgettext --default-domain=linux \
@@ -46,15 +63,19 @@ PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig
46 63
47randconfig: $(obj)/conf 64randconfig: $(obj)/conf
48 $< -r Config.in 65 $< -r Config.in
66 $(MTIME_IS_COARSE) && sleep 1
49 67
50allyesconfig: $(obj)/conf 68allyesconfig: $(obj)/conf
51 $< -y Config.in 69 $< -y Config.in
70 $(MTIME_IS_COARSE) && sleep 1
52 71
53allnoconfig: $(obj)/conf 72allnoconfig: $(obj)/conf
54 $< -n Config.in 73 $< -n Config.in
74 $(MTIME_IS_COARSE) && sleep 1
55 75
56allmodconfig: $(obj)/conf 76allmodconfig: $(obj)/conf
57 $< -m Config.in 77 $< -m Config.in
78 $(MTIME_IS_COARSE) && sleep 1
58 79
59defconfig: $(obj)/conf 80defconfig: $(obj)/conf
60ifeq ($(KBUILD_DEFCONFIG),) 81ifeq ($(KBUILD_DEFCONFIG),)
@@ -63,9 +84,11 @@ else
63 @echo *** Default configuration is based on '$(KBUILD_DEFCONFIG)' 84 @echo *** Default configuration is based on '$(KBUILD_DEFCONFIG)'
64 $(Q)$< -D $(KBUILD_DEFCONFIG) Config.in 85 $(Q)$< -D $(KBUILD_DEFCONFIG) Config.in
65endif 86endif
87 $(MTIME_IS_COARSE) && sleep 1
66 88
67%_defconfig: $(obj)/conf 89%_defconfig: $(obj)/conf
68 $(Q)$< -D $@ Config.in 90 $(Q)$< -D $@ Config.in
91 $(MTIME_IS_COARSE) && sleep 1
69 92
70# Help text used by make help 93# Help text used by make help
71help: 94help: