summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2008-12-13 23:00:45 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-26 16:40:11 -0700
commit5981f194641d4bcbff7e80adf393035b113f5022 (patch)
treebfd3f997fb2d638aed25aebbaed212305d13c167 /Makefile
parentc12a6717916079c1dfbd27fcfb9f88eada11356d (diff)
kbuild: fix make incompatibility
commit 31110ebbec8688c6e9597b641101afc94e1c762a upstream. "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> Cc: Thomas Backlund <tmb@mandriva.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 948de60db4d9..431b9e658293 100644
--- a/Makefile
+++ b/Makefile
@@ -440,7 +440,11 @@ ifeq ($(config-targets),1)
include $(srctree)/arch/$(SRCARCH)/Makefile
export KBUILD_DEFCONFIG
-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)$(MAKE) $(build)=scripts/kconfig $@
@@ -1602,7 +1606,11 @@ endif
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
# 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)
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
$(build)=$(build-dir)