aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSam Ravnborg <sam@neptun.(none)>2007-10-19 16:20:02 -0400
committerSam Ravnborg <sam@neptun.(none)>2007-10-19 16:20:02 -0400
commit7bb9d092de0b21f8f3f0a20dc2ec84395549fb62 (patch)
treef5a88707627e03f028dc20babb92c834aa2a9915 /Makefile
parent6e66b9005dfc9e0bc6785d734745a4bf8f85f16b (diff)
kbuild: fix first module build
When building a specific module before doing a total kernel build it failed because $(MORVERDIR) were missing. Creating the MODVERDIR explicit (independent of KBUILD_MODULES) fixed this. As a side-effect the MODVERDIR will be created also for a non-module build - but no harm done by that. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 784903a63e0..6d7527cee9f 100644
--- a/Makefile
+++ b/Makefile
@@ -884,10 +884,7 @@ prepare2: prepare3 outputmakefile
884 884
885prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \ 885prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \
886 include/asm include/config/auto.conf 886 include/asm include/config/auto.conf
887ifneq ($(KBUILD_MODULES),) 887 $(cmd_crmodverdir)
888 $(Q)mkdir -p $(MODVERDIR)
889 $(Q)rm -f $(MODVERDIR)/*
890endif
891 888
892archprepare: prepare1 scripts_basic 889archprepare: prepare1 scripts_basic
893 890
@@ -1223,8 +1220,7 @@ else # KBUILD_EXTMOD
1223KBUILD_MODULES := 1 1220KBUILD_MODULES := 1
1224PHONY += crmodverdir 1221PHONY += crmodverdir
1225crmodverdir: 1222crmodverdir:
1226 $(Q)mkdir -p $(MODVERDIR) 1223 $(cmd_crmodverdir)
1227 $(Q)rm -f $(MODVERDIR)/*
1228 1224
1229PHONY += $(objtree)/Module.symvers 1225PHONY += $(objtree)/Module.symvers
1230$(objtree)/Module.symvers: 1226$(objtree)/Module.symvers:
@@ -1484,9 +1480,11 @@ endif
1484 1480
1485# Modules 1481# Modules
1486/ %/: prepare scripts FORCE 1482/ %/: prepare scripts FORCE
1483 $(cmd_crmodverdir)
1487 $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ 1484 $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
1488 $(build)=$(build-dir) 1485 $(build)=$(build-dir)
1489%.ko: prepare scripts FORCE 1486%.ko: prepare scripts FORCE
1487 $(cmd_crmodverdir)
1490 $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ 1488 $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
1491 $(build)=$(build-dir) $(@:.ko=.o) 1489 $(build)=$(build-dir) $(@:.ko=.o)
1492 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost 1490 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@ -1510,6 +1508,9 @@ quiet_cmd_depmod = DEPMOD $(KERNELRELEASE)
1510 $(KERNELRELEASE); \ 1508 $(KERNELRELEASE); \
1511 fi 1509 fi
1512 1510
1511# Create temporary dir for module support files
1512cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR); rm -f $(MODVERDIR)/*
1513
1513 1514
1514a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ 1515a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \
1515 $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \ 1516 $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \