aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.ravnborg.org>2004-07-23 04:32:23 +0200
committerSam Ravnborg <sam@mars.ravnborg.org>2004-07-23 04:32:23 +0200
commitfda66343501846bc90f8dbd6bd7017943b4cbf7a (patch)
tree7c21c15146ce7d4742d2d374fc4b81de54e1111e /Makefile
parent02c5579652c36b939a830c82d089a3fb6204dcf4 (diff)
downloadhistory-fda66343501846bc90f8dbd6bd7017943b4cbf7a.tar.gz
kbuild: Less intrusive LANG override, fixes menuconfig
The locale override caused problems for some people with locale setiings different from 'C'. make menuconfig was looking bad / unuseable. This patch limit the override of locales to the part where we actually descend the kernel doing the full build of the kernel. The speed improvement is the same. make menuconfig should now be useable for all locale settings again. Thanks to Marcel Sebek <sebek64@post.cz> for pointing out this problem and being paitent in testing. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 11 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 96e79b6db27e2..46e91e1336b97 100644
--- a/Makefile
+++ b/Makefile
@@ -130,16 +130,6 @@ else
_all: modules
endif
-# Make sure we're not wasting cpu-cycles doing locale handling, yet do make
-# sure error messages appear in the user-desired language
-ifdef LC_ALL
-LANG := $(LC_ALL)
-LC_ALL :=
-endif
-LC_COLLATE := C
-LC_CTYPE := C
-export LANG LC_ALL LC_COLLATE LC_CTYPE
-
srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
TOPDIR := $(srctree)
# FIXME - TOPDIR is obsolete, use srctree/objtree
@@ -621,11 +611,20 @@ vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ;
-# Handle descending into subdirectories listed in $(vmlinux-dirs)
+# Handle descending into subdirectories listed in $(vmlinux-dirs)
+# Preset locale variables to speed up the build process. Limit locale
+# tweaks to this spot to avoid wrong language settings when running
+# make menuconfig etc.
+# Error messages still appears in the original language
.PHONY: $(vmlinux-dirs)
$(vmlinux-dirs): prepare-all scripts
- $(Q)$(MAKE) $(build)=$@
+ $(Q)if [ ! -z $$LC_ALL ]; then \
+ export LANG=$$LC_ALL; \
+ export LC_ALL= ; \
+ fi; \
+ export LC_COLLATE=C; export LC_CTYPE=C; \
+ $(MAKE) $(build)=$@
# Things we need to do before we recursively start building the kernel
# or the modules are listed in "prepare-all".