* meino.cra...@gmx.de <meino.cra...@gmx.de> [120309 14:54]: > Hi, > > I am trying to compile a linux-kernel for an embedded system. > There is an (older) build environment. > The kernel is based on a 2.4er linux kernel. > When doing a > make menuconfig > I get: > > make menuconfig > Makefile:441: *** mixed implicit and normal rules. Stop. > [1] 8814 exit 2 make menuconfig > > The according part of the makefile is: > > include $(srctree)/arch/$(ARCH)/Makefile > export KBUILD_DEFCONFIG > > 441 config %config: scripts_basic outputmakefile FORCE > $(Q)mkdir -p include/linux > $(Q)$(MAKE) $(build)=scripts/kconfig $@ > $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease > > > > I marked the according line with its number. > > Unfortunately I am not familiar with makefiles... > > I am using the make of the gentoo system, which is > GNU make 3.82... > > What is wrong here? > > Thank you very much in advance for any help! > Best regards, > mcc > >
Hi Meino, Unfortunately GNU Make changed the rules on Makefiles (or decided to enforce a rule that wasn't previously enforced, I don't know which) and the kernel Makefiles were caught out by it. The later kernels have the changes made that are necessary but if you're building an older kernel with a newer make then you'll run into this problem. You can look at newer kernel source to find the changes necessary. In the case above, the imlicit rule is the %config target and the normal rule is the config target. You can just separate those into two separate rules with the same recipes. For example: config: scripts_basic outputmakefile FORCE $(Q)mkdir -p include/linux $(Q)$(MAKE) $(build)=scripts/kconfig $@ $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease %config: scripts_basic outputmakefile FORCE $(Q)mkdir -p include/linux $(Q)$(MAKE) $(build)=scripts/kconfig $@ $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease Regards, Todd