X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=blobdiff_plain;f=Makefile;h=af6210d488368074f07ec28db54cecc3433df7d3;hp=05b451a1b76062f50ed97fbd167b38c523e256a4;hb=d66e35fab8789b5dd6f1b8e6f3871ea4f44d32a3;hpb=20a468b51325b3636785a8ca0047ae514b39cbd5 diff --git a/Makefile b/Makefile index 05b451a..af6210d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 16 -EXTRAVERSION =-rc4 +EXTRAVERSION = NAME=Sliding Snow Leopard # *DOCUMENTATION* @@ -95,7 +95,7 @@ ifdef O endif # That's our default target when none is given on the command line -.PHONY: _all +PHONY := _all _all: ifneq ($(KBUILD_OUTPUT),) @@ -106,7 +106,7 @@ KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) $(if $(KBUILD_OUTPUT),, \ $(error output directory "$(saved-output)" does not exist)) -.PHONY: $(MAKECMDGOALS) +PHONY += $(MAKECMDGOALS) $(filter-out _all,$(MAKECMDGOALS)) _all: $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ @@ -123,7 +123,7 @@ ifeq ($(skip-makefile),) # If building an external module we do not care about the all: rule # but instead _all depend on modules -.PHONY: all +PHONY += all ifeq ($(KBUILD_EXTMOD),) _all: all else @@ -137,7 +137,7 @@ objtree := $(CURDIR) src := $(srctree) obj := $(objtree) -VPATH := $(srctree):$(KBUILD_EXTMOD) +VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) export srctree objtree VPATH TOPDIR @@ -306,8 +306,7 @@ LINUXINCLUDE := -Iinclude \ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common \ - -ffreestanding + -fno-strict-aliasing -fno-common AFLAGS := -D__ASSEMBLY__ # Read KERNELRELEASE from .kernelrelease (if it exists) @@ -337,14 +336,14 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exc # Rules shared between *config targets and build targets # Basic helpers built in scripts/ -.PHONY: scripts_basic +PHONY += scripts_basic scripts_basic: $(Q)$(MAKE) $(build)=scripts/basic # To avoid any implicit rule to kick in, define an empty command. scripts/basic/%: scripts_basic ; -.PHONY: outputmakefile +PHONY += outputmakefile # outputmakefile generate a Makefile to be placed in output directory, if # using a seperate output directory. This allows convinient use # of make in output directory @@ -420,7 +419,7 @@ ifeq ($(KBUILD_EXTMOD),) # Additional helpers built in scripts/ # Carefully list dependencies so we do not try to build scripts twice # in parrallel -.PHONY: scripts +PHONY += scripts scripts: scripts_basic include/config/MARKER $(Q)$(MAKE) $(build)=$(@) @@ -472,19 +471,16 @@ else CFLAGS += -O2 endif -#Add align options if CONFIG_CC_* is not equal to 0 -add-align = $(if $(filter-out 0,$($(1))),$(cc-option-align)$(2)=$($(1))) -CFLAGS += $(call add-align,CONFIG_CC_ALIGN_FUNCTIONS,-functions) -CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LABELS,-labels) -CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LOOPS,-loops) -CFLAGS += $(call add-align,CONFIG_CC_ALIGN_JUMPS,-jumps) - ifdef CONFIG_FRAME_POINTER CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) else CFLAGS += -fomit-frame-pointer endif +ifdef CONFIG_UNWIND_INFO +CFLAGS += -fasynchronous-unwind-tables +endif + ifdef CONFIG_DEBUG_INFO CFLAGS += -g endif @@ -720,7 +716,7 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ; # make menuconfig etc. # Error messages still appears in the original language -.PHONY: $(vmlinux-dirs) +PHONY += $(vmlinux-dirs) $(vmlinux-dirs): prepare scripts $(Q)$(MAKE) $(build)=$@ @@ -773,10 +769,10 @@ kernelrelease = $(KERNELVERSION)$(localver-full) # version.h and scripts_basic is processed / created. # Listed in dependency order -.PHONY: prepare archprepare prepare0 prepare1 prepare2 prepare3 +PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3 # prepare-all is deprecated, use prepare as valid replacement -.PHONY: prepare-all +PHONY += prepare-all # prepare3 is used to check if we are building in a separate output directory, # and if so do: @@ -852,12 +848,12 @@ define filechk_version.h ) endef -include/linux/version.h: $(srctree)/Makefile .config FORCE +include/linux/version.h: $(srctree)/Makefile .config .kernelrelease FORCE $(call filechk,version.h) # --------------------------------------------------------------------------- -.PHONY: depend dep +PHONY += depend dep depend dep: @echo '*** Warning: make $@ is unnecessary now.' @@ -872,21 +868,21 @@ all: modules # Build modules -.PHONY: modules +PHONY += modules modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) @echo ' Building modules, stage 2.'; $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost # Target to prepare building external modules -.PHONY: modules_prepare +PHONY += modules_prepare modules_prepare: prepare scripts # Target to install modules -.PHONY: modules_install +PHONY += modules_install modules_install: _modinst_ _modinst_post -.PHONY: _modinst_ +PHONY += _modinst_ _modinst_: @if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \ echo "Warning: you may need to install module-init-tools"; \ @@ -913,7 +909,7 @@ depmod_opts := else depmod_opts := -b $(INSTALL_MOD_PATH) -r endif -.PHONY: _modinst_post +PHONY += _modinst_post _modinst_post: _modinst_ if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi @@ -956,7 +952,7 @@ clean: rm-dirs := $(CLEAN_DIRS) clean: rm-files := $(CLEAN_FILES) clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs)) -.PHONY: $(clean-dirs) clean archclean +PHONY += $(clean-dirs) clean archclean $(clean-dirs): $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) @@ -974,7 +970,7 @@ mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) mrproper-dirs := $(addprefix _mrproper_,Documentation/DocBook scripts) -.PHONY: $(mrproper-dirs) mrproper archmrproper +PHONY += $(mrproper-dirs) mrproper archmrproper $(mrproper-dirs): $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@) @@ -984,7 +980,7 @@ mrproper: clean archmrproper $(mrproper-dirs) # distclean # -.PHONY: distclean +PHONY += distclean distclean: mrproper @find $(srctree) $(RCS_FIND_IGNORE) \ @@ -1000,12 +996,10 @@ distclean: mrproper # rpm target kept for backward compatibility package-dir := $(srctree)/scripts/package -.PHONY: %-pkg rpm - %pkg: FORCE - $(Q)$(MAKE) -f $(package-dir)/Makefile $@ + $(Q)$(MAKE) $(build)=$(package-dir) $@ rpm: FORCE - $(Q)$(MAKE) -f $(package-dir)/Makefile $@ + $(Q)$(MAKE) $(build)=$(package-dir) $@ # Brief documentation of the typical targets used @@ -1037,13 +1031,11 @@ help: @echo ' kernelversion - Output the version stored in Makefile' @echo '' @echo 'Static analysers' - @echo ' buildcheck - List dangling references to vmlinux discarded sections' - @echo ' and init sections from non-init sections' @echo ' checkstack - Generate a list of stack hogs' @echo ' namespacecheck - Name space analysis on compiled kernel' @echo '' @echo 'Kernel packaging:' - @$(MAKE) -f $(package-dir)/Makefile help + @$(MAKE) $(build)=$(package-dir) help @echo '' @echo 'Documentation targets:' @$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp @@ -1092,12 +1084,12 @@ else # KBUILD_EXTMOD # We are always building modules KBUILD_MODULES := 1 -.PHONY: crmodverdir +PHONY += crmodverdir crmodverdir: $(Q)rm -rf $(MODVERDIR) $(Q)mkdir -p $(MODVERDIR) -.PHONY: $(objtree)/Module.symvers +PHONY += $(objtree)/Module.symvers $(objtree)/Module.symvers: @test -e $(objtree)/Module.symvers || ( \ echo; \ @@ -1106,7 +1098,7 @@ $(objtree)/Module.symvers: echo ) module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD)) -.PHONY: $(module-dirs) modules +PHONY += $(module-dirs) modules $(module-dirs): crmodverdir $(objtree)/Module.symvers $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) @@ -1114,11 +1106,11 @@ modules: $(module-dirs) @echo ' Building modules, stage 2.'; $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost -.PHONY: modules_install +PHONY += modules_install modules_install: _emodinst_ _emodinst_post - -install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra) -.PHONY: _emodinst_ + +install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra) +PHONY += _emodinst_ _emodinst_: $(Q)rm -rf $(MODLIB)/$(install-dir) $(Q)mkdir -p $(MODLIB)/$(install-dir) @@ -1133,13 +1125,13 @@ quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) $(KERNELRELEASE); \ fi -.PHONY: _emodinst_post +PHONY += _emodinst_post _emodinst_post: _emodinst_ $(call cmd,depmod) clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD)) -.PHONY: $(clean-dirs) clean +PHONY += $(clean-dirs) clean $(clean-dirs): $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) @@ -1161,7 +1153,7 @@ help: @echo '' # Dummies... -.PHONY: prepare scripts +PHONY += prepare scripts prepare: ; scripts: ; endif # KBUILD_EXTMOD @@ -1264,17 +1256,13 @@ versioncheck: -name '*.[hcS]' -type f -print | sort \ | xargs $(PERL) -w scripts/checkversion.pl -buildcheck: - $(PERL) $(srctree)/scripts/reference_discarded.pl - $(PERL) $(srctree)/scripts/reference_init.pl - namespacecheck: $(PERL) $(srctree)/scripts/namespace.pl endif #ifeq ($(config-targets),1) endif #ifeq ($(mixed-targets),1) -.PHONY: checkstack +PHONY += checkstack checkstack: $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ $(PERL) $(src)/scripts/checkstack.pl $(ARCH) @@ -1289,17 +1277,17 @@ kernelversion: # --------------------------------------------------------------------------- # The directory part is taken from first prerequisite, so this # works even with external modules -%.s: %.c scripts FORCE +%.s: %.c prepare scripts FORCE $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@) -%.i: %.c scripts FORCE +%.i: %.c prepare scripts FORCE $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@) -%.o: %.c scripts FORCE +%.o: %.c prepare scripts FORCE $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@) -%.lst: %.c scripts FORCE +%.lst: %.c prepare scripts FORCE $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@) -%.s: %.S scripts FORCE +%.s: %.S prepare scripts FORCE $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@) -%.o: %.S scripts FORCE +%.o: %.S prepare scripts FORCE $(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@) # For external modules we shall include any directory of the target, @@ -1357,4 +1345,10 @@ clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj endif # skip-makefile +PHONY += FORCE FORCE: + + +# Declare the contents of the .PHONY variable as phony. We keep that +# information in a variable se we can use it in if_changed and friends. +.PHONY: $(PHONY)