From 6dfb44114c07853d3b1c6bc174df477f46b1280b Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 8 Aug 2006 09:58:49 +0000 Subject: [PATCH] - patches.fixes/kbuild-fix-external-module: kbuild fixes for 2.6.18. - rpm/kernel-source.spec.in: don't remove include/config/* for building external modules. suse-commit: cb4d5ae18064b7935f51b7444d23fd4527c39d85 --- Makefile | 24 ++++++++++++++++++------ usr/Makefile | 3 +++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index a07e6e1..c114f1a 100644 --- a/Makefile +++ b/Makefile @@ -442,12 +442,13 @@ core-y := usr/ endif # KBUILD_EXTMOD ifeq ($(dot-config),1) -# In this section, we need .config +# Read in config +-include include/config/auto.conf +ifeq ($(KBUILD_EXTMOD),) # Read in dependencies to all Kconfig* files, make sure to run # oldconfig if changes are detected. -include include/config/auto.conf.cmd --include include/config/auto.conf # To avoid any implicit rule to kick in, define an empty command $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ; @@ -457,16 +458,27 @@ $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ; # if auto.conf.cmd is missing then we are probably in a cleaned tree so # we execute the config step to be sure to catch updated Kconfig files include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd -ifeq ($(KBUILD_EXTMOD),) $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig else - $(error kernel configuration not valid - run 'make prepare' in $(srctree) to update it) -endif +# external modules needs include/linux/autoconf.h and include/config/auto.conf +# but do not care if they are up-to-date. Use auto.conf to trigger the test +PHONY += include/config/auto.conf + +include/config/auto.conf: + $(Q)test -e include/linux/autoconf.h -a -e $@ || ( \ + echo; \ + echo " ERROR: Kernel configuration is invalid."; \ + echo " include/linux/autoconf.h or $@ are missing."; \ + echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ + echo; \ + /bin/false) + +endif # KBUILD_EXTMOD else # Dummy target needed, because used as prerequisite include/config/auto.conf: ; -endif +endif # $(dot-config) # The all: target is the default when no target is given on the # command line. diff --git a/usr/Makefile b/usr/Makefile index e938242..5b31c0b 100644 --- a/usr/Makefile +++ b/usr/Makefile @@ -35,6 +35,9 @@ quiet_cmd_initfs = GEN $@ cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input) targets := initramfs_data.cpio.gz +# do not try to update files included in initramfs +$(deps_initramfs): ; + $(deps_initramfs): klibcdirs # We rebuild initramfs_data.cpio.gz if: # 1) Any included file is newer then initramfs_data.cpio.gz -- 1.7.10.4