From: Kenn H. <ke...@us...> - 2003-08-25 23:07:16
|
Update of /cvsroot/linux-vax/kernel-2.5 In directory sc8-pr-cvs1:/tmp/cvs-serv20755 Modified Files: Makefile Log Message: Merge with 2.5.65 Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/Makefile,v retrieving revision 1.72 retrieving revision 1.73 diff -u -r1.72 -r1.73 --- Makefile 23 Aug 2003 12:44:06 -0000 1.72 +++ Makefile 24 Aug 2003 12:04:02 -0000 1.73 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 64 +SUBLEVEL = 65 EXTRAVERSION = # *DOCUMENTATION* @@ -107,6 +107,11 @@ # For now, leave verbose as default +ifdef V + ifeq ("$(origin V)", "command line") + KBUILD_VERBOSE = $(V) + endif +endif ifndef KBUILD_VERBOSE KBUILD_VERBOSE = 1 endif @@ -193,7 +198,7 @@ comma := , depfile = $(subst $(comma),_,$(@D)/.$(@F).d) -noconfig_targets := xconfig menuconfig config oldconfig randconfig \ +noconfig_targets := xconfig gconfig menuconfig config oldconfig randconfig \ defconfig allyesconfig allnoconfig allmodconfig \ clean mrproper distclean rpm \ help tags TAGS cscope sgmldocs psdocs pdfdocs htmldocs \ @@ -328,8 +333,10 @@ . $(srctree)/scripts/mkversion > .tmp_version; \ mv -f .tmp_version .version; \ $(MAKE) $(build)=init; \ - ) - $(call cmd,vmlinux__); \ + ) \ + $(if $($(quiet)cmd_vmlinux__), \ + echo ' $($(quiet)cmd_vmlinux__)' &&) \ + $(cmd_vmlinux__); \ echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd endef @@ -472,17 +479,19 @@ uts_len := 64 -include/linux/version.h: Makefile - @if expr length "$(KERNELRELEASE)" \> $(uts_len) >/dev/null ; then \ +define filechk_version.h + if expr length "$(KERNELRELEASE)" \> $(uts_len) >/dev/null ; then \ echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \ exit 1; \ fi; - @echo -n ' GEN $@' - @(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; \ + (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))'; \ - ) > $@.tmp - @$(update-if-changed) + ) +endef + +include/linux/version.h: Makefile + $(call filechk,version.h) # --------------------------------------------------------------------------- @@ -551,7 +560,7 @@ # Generate asm-offsets.h # --------------------------------------------------------------------------- -define generate-asm-offsets.h +define filechk_gen-asm-offsets (set -e; \ echo "#ifndef __ASM_OFFSETS_H__"; \ echo "#define __ASM_OFFSETS_H__"; \ @@ -567,7 +576,6 @@ echo "#endif" ) endef - else # ifdef include_config ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),) @@ -598,15 +606,18 @@ # Kernel configuration # --------------------------------------------------------------------------- -.PHONY: oldconfig xconfig menuconfig config \ +.PHONY: oldconfig xconfig gconfig menuconfig config \ make_with_config rpm -scripts/kconfig/conf scripts/kconfig/mconf scripts/kconfig/qconf: scripts/fixdep FORCE +scripts/kconfig/conf scripts/kconfig/mconf scripts/kconfig/qconf scripts/kconfig/gconf: scripts/fixdep FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ xconfig: scripts/kconfig/qconf ./scripts/kconfig/qconf arch/$(ARCH)/Kconfig +gconfig: scripts/kconfig/gconf + ./scripts/kconfig/gconf arch/$(ARCH)/Kconfig + menuconfig: scripts/kconfig/mconf $(Q)$(MAKE) $(build)=scripts/lxdialog ./scripts/kconfig/mconf arch/$(ARCH)/Kconfig @@ -876,13 +887,28 @@ cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1)) -define update-if-changed - if [ -r $@ ] && cmp -s $@ $@.tmp; then \ - echo ' (unchanged)'; \ - rm -f $@.tmp; \ - else \ - echo ' (updated)'; \ - mv -f $@.tmp $@; \ +# filechk is used to check if the content of a generated file is updated. +# Sample usage: +# define filechk_sample +# echo $KERNELRELEASE +# endef +# version.h : Makefile +# $(call filechk,sample) +# The rule defined shall write to stdout the content of the new file. +# The existing file will be compared with the new one. +# - If no file exist it is created +# - If the content differ the new file is used +# - If they are equal no change, and no timestamp update + +define filechk + @set -e; \ + echo ' CHK $@'; \ + $(filechk_$(1)) < $< > $@.tmp; \ + if [ -r $@ ] && cmp -s $@ $@.tmp; then \ + rm -f $@.tmp; \ + else \ + echo ' UPD $@'; \ + mv -f $@.tmp $@; \ fi endef |