diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2003-06-09 00:07:17 +0200 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2003-06-09 00:07:17 +0200 |
commit | 18495a2b1d612cb1a9bbfab971bc5eb014ea6306 (patch) | |
tree | 7a8bb2041936b0da027234b70e449d744504ab3a /Makefile | |
parent | 4949833a590e03775c29e83154ffb8a615b5c66a (diff) | |
parent | 11acea02c4bfe06996672093ad5fac952951b164 (diff) | |
download | history-18495a2b1d612cb1a9bbfab971bc5eb014ea6306.tar.gz |
Merge mars.ravnborg.org:/home/sam/src/linux/kernel/bk/linux-2.5
into mars.ravnborg.org:/home/sam/src/linux/kernel/bk/kbuild
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/Makefile b/Makefile index c2a5627d3c18c..b9183e54eff34 100644 --- a/Makefile +++ b/Makefile @@ -90,25 +90,23 @@ KBUILD_MODULES := KBUILD_BUILTIN := 1 # If we have only "make modules", don't compile built-in objects. +# When we're building modules with modversions, we need to consider +# the built-in objects during the descend as well, in order to +# make sure the checksums are uptodate before we record them. ifeq ($(MAKECMDGOALS),modules) - KBUILD_BUILTIN := + KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) endif # If we have "make <whatever> modules", compile modules # in addition to whatever we do anyway. - -ifneq ($(filter modules,$(MAKECMDGOALS)),) - KBUILD_MODULES := 1 -endif - # Just "make" or "make all" shall build modules as well -ifeq ($(MAKECMDGOALS),) +ifneq ($(filter all modules,$(MAKECMDGOALS)),) KBUILD_MODULES := 1 endif -ifneq ($(filter all,$(MAKECMDGOALS)),) +ifeq ($(MAKECMDGOALS),) KBUILD_MODULES := 1 endif @@ -310,18 +308,6 @@ ifndef CONFIG_FRAME_POINTER CFLAGS += -fomit-frame-pointer endif -# When we're building modules with modversions, we need to consider -# the built-in objects during the descend as well, in order to -# make sure the checksums are uptodate before we record them. - -ifdef CONFIG_MODVERSIONS -ifeq ($(KBUILD_MODULES),1) -ifneq ($(KBUILD_BUILTIN),1) - KBUILD_BUILTIN := 1 -endif -endif -endif - # # INSTALL_PATH specifies where to place the updated kernel and system map # images. Uncomment if you want to place them anywhere other than root. @@ -380,7 +366,7 @@ define rule_vmlinux__ endef define rule_vmlinux - $(rule_vmlinux__) + $(rule_vmlinux__); \ $(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map endef @@ -446,9 +432,8 @@ else @echo '*** Warning: Overriding SUBDIRS on the command line can cause' @echo '*** inconsistencies' endif - $(Q)mkdir -p $(MODVERDIR) endif - @echo ' Starting the build. KBUILD_BUILTIN=$(KBUILD_BUILTIN) KBUILD_MODULES=$(KBUILD_MODULES)' + $(if $(CONFIG_MODULES),$(Q)mkdir -p $(MODVERDIR)) # This can be used by arch/$ARCH/Makefile to preprocess # their vmlinux.lds.S file @@ -470,9 +455,7 @@ targets += arch/$(ARCH)/vmlinux.lds.s %.o: %.c scripts FORCE $(Q)$(MAKE) $(build)=$(@D) $@ %/: scripts prepare FORCE - $(Q)$(MAKE) $(build)=$(@D) -%.ko: scripts FORCE - $(Q)$(MAKE) $(build)=$(@D) $@ + $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D) %.lst: %.c scripts FORCE $(Q)$(MAKE) $(build)=$(@D) $@ %.s: %.S scripts FORCE @@ -514,7 +497,7 @@ define filechk_version.h if expr length "$(KERNELRELEASE)" \> $(uts_len) >/dev/null ; then \ echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \ exit 1; \ - fi; + fi; \ (echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; \ echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)`; \ echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'; \ @@ -825,6 +808,7 @@ help: @echo '* vmlinux - Build the bare kernel' @echo '* modules - Build all modules' @echo ' modules_install - Install all modules' + @echo ' dir/ - Build all files in dir and below' @echo ' dir/file.[ois] - Build specified target only' @echo ' rpm - Build a kernel as an RPM package' @echo ' tags/TAGS - Generate tags file for editors' |