kbuild: fix make incompatibility

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Sunday, December 28, 2008 - 5:59 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=31110e...
Commit:     31110ebbec8688c6e9597b641101afc94e1c762a
Parent:     abf681ce5b6f83f0b8883e0f2c12d197a38543dd
Author:     Sam Ravnborg <sam@ravnborg.org>
AuthorDate: Sat Dec 13 23:00:45 2008 +0100
Committer:  Sam Ravnborg <sam@ravnborg.org>
CommitDate: Sat Dec 13 23:00:45 2008 +0100

    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>
---
 Makefile |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index be462cf..95160e5 100644
--- a/Makefile
+++ b/Makefile
@@ -439,7 +439,11 @@ ifeq ($(config-targets),1)
 include $(srctree)/arch/$(SRCARCH)/Makefile
 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)$(MAKE) $(build)=scripts/kconfig $@
 
@@ -1493,7 +1497,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)
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
kbuild: fix make incompatibility, Linux Kernel Mailing ..., (Sun Dec 28, 5:59 pm)