mirror of https://gitee.com/openkylin/linux.git
kbuild: fix make incompatibility
"Paul Smith" <psmith@gnu.org> reported that we would fail to build with a new check that may be enabled in an upcoming version of make. The error was: Makefile:442: *** mixed implicit and normal rules. Stop. The problem is that we did stuff like this: config %config: ... The solution was simple - the above was split into two with identical prerequisites and commands. With only three lines it was not worth to try to avoid the duplication. Cc: "Paul Smith" <psmith@gnu.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
abf681ce5b
commit
31110ebbec
12
Makefile
12
Makefile
|
@ -439,7 +439,11 @@ ifeq ($(config-targets),1)
|
||||||
include $(srctree)/arch/$(SRCARCH)/Makefile
|
include $(srctree)/arch/$(SRCARCH)/Makefile
|
||||||
export KBUILD_DEFCONFIG KBUILD_KCONFIG
|
export KBUILD_DEFCONFIG KBUILD_KCONFIG
|
||||||
|
|
||||||
config %config: scripts_basic outputmakefile FORCE
|
config: scripts_basic outputmakefile FORCE
|
||||||
|
$(Q)mkdir -p include/linux include/config
|
||||||
|
$(Q)$(MAKE) $(build)=scripts/kconfig $@
|
||||||
|
|
||||||
|
%config: scripts_basic outputmakefile FORCE
|
||||||
$(Q)mkdir -p include/linux include/config
|
$(Q)mkdir -p include/linux include/config
|
||||||
$(Q)$(MAKE) $(build)=scripts/kconfig $@
|
$(Q)$(MAKE) $(build)=scripts/kconfig $@
|
||||||
|
|
||||||
|
@ -1493,7 +1497,11 @@ endif
|
||||||
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
|
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
|
||||||
|
|
||||||
# Modules
|
# Modules
|
||||||
/ %/: prepare scripts FORCE
|
/: prepare scripts FORCE
|
||||||
|
$(cmd_crmodverdir)
|
||||||
|
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||||
|
$(build)=$(build-dir)
|
||||||
|
%/: prepare scripts FORCE
|
||||||
$(cmd_crmodverdir)
|
$(cmd_crmodverdir)
|
||||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||||
$(build)=$(build-dir)
|
$(build)=$(build-dir)
|
||||||
|
|
Loading…
Reference in New Issue