busybox 1.13.3——Makefile:421: *** mixed implicit and normal rules: deprecated syntax

问题描述:busybox 1.13.3 执行make menuconfig命令的时候,提示Makefile:421: *** 混和的隐含和普通规则。 停止等错误,具体错误如下:

Makefile:421: *** mixed implicit and normal rules: deprecated syntax
Makefile:1269: *** mixed implicit and normal rules: deprecated syntax
make: *** No rule to make target 'menuconfig'.  Stop.

问题原因:由于高版本make对Makefile的一些旧规则兼容不是很好,只需要修改Makefile文件即可。

解决流程:

1、 修改

config %config: scripts_basic outputmakefile FORCE

       $(Q)mkdir -p include
       $(Q)$(MAKE) $(build)=scripts/kconfig $@
       $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease

修改为:

  config: scripts_basic outputmakefile FORCE
   $(Q)mkdir -p include
   $(Q)$(MAKE) $(build)=scripts/kconfig $@
   $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
  %config: scripts_basic outputmakefile FORCE
   $(Q)mkdir -p include
   $(Q)$(MAKE) $(build)=scripts/kconfig $@
   $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease

2、 修改

/ %/: prepare scripts FORCE
   $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
   $(build)=$(build-dir)

修改为:

/: prepare scripts FORCE
   $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
   $(build)=$(build-dir)
  %/: prepare scripts FORCE
   $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
   $(build)=$(build-dir)

注意,Makefile中替换上述修改内容时,请确保每条指令以tab键开始,否则再次执行make menuconfig命令时会出现类似如下错误:

Makefile:422: *** missing separator.  Stop.

好了,现在就可以正常编译了!

你可能感兴趣的:(ARM,Linux)