1. 程式人生 > >busybox 1.13.3——Makefile:421: *** mixed implicit and normal rules: deprecated syntax

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 [email protected]
       $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease

修改為:

  config: scripts_basic outputmakefile FORCE
   $(Q)mkdir -p include
   $(
Q)$(MAKE) $(build)=scripts/kconfig [email protected]   $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease   %config: scripts_basic outputmakefile FORCE   $(Q)mkdir -p include   $(Q)$(MAKE) $(build)=scripts/kconfig [email protected]   $(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.

好了,現在就可以正常編譯了!