Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 19 Oct 2007 20:47:38 +0000 (13:47 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 19 Oct 2007 20:47:38 +0000 (13:47 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kbuild: fix first module build
  kconfig: update kconfig-language text
  kbuild: introduce cc-cross-prefix
  kbuild: disable depmod in cross-compile kernel build
  kbuild: make deb-pkg - add 'Provides:' line
  kconfig: comment typo in scripts/kconfig/Makefile.
  kbuild: stop docproc segfaulting when SRCTREE isn't set.
  kbuild: modpost problem when symbols move from one module to another
  kbuild: cscope - filter out .tmp_* in find_sources
  kbuild: mailing list has moved
  kbuild: check asm symlink when building a kernel

1  2 
MAINTAINERS
Makefile

diff --combined MAINTAINERS
@@@ -2178,7 -2178,7 +2178,7 @@@ S:      Maintaine
  KCONFIG
  P:    Roman Zippel
  M:    zippel@linux-m68k.org
- L:    kbuild-devel@lists.sourceforge.net
+ L:    linux-kbuild@vger.kernel.org
  S:    Maintained
  
  KDUMP
@@@ -2207,6 -2207,7 +2207,7 @@@ KERNEL BUILD (kbuild: Makefile, scripts
  P:    Sam Ravnborg
  M:    sam@ravnborg.org
  T:    git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git
+ L:    linux-kbuild@vger.kernel.org
  S:    Maintained
  
  KERNEL JANITORS
@@@ -2234,7 -2235,7 +2235,7 @@@ S:      Supporte
  KEXEC
  P:    Eric Biederman
  M:    ebiederm@xmission.com
 -W:    http://www.xmission.com/~ebiederm/files/kexec/
 +W:    http://ftp.kernel.org/pub/linux/kernel/people/horms/kexec-tools/
  L:    linux-kernel@vger.kernel.org
  L:    kexec@lists.infradead.org
  S:    Maintained
@@@ -2940,6 -2941,13 +2941,6 @@@ L:     linux-kernel@vger.kernel.or
  L:    linux-pci@atrey.karlin.mff.cuni.cz
  S:    Supported
  
 -PCI SOUND DRIVERS (ES1370, ES1371 and SONICVIBES)
 -P:    Thomas Sailer
 -M:    sailer@ife.ee.ethz.ch
 -L:    linux-sound@vger.kernel.org
 -W:    http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html
 -S:    Maintained
 -
  PCI SUBSYSTEM
  P:    Greg Kroah-Hartman
  M:    gregkh@suse.de
diff --combined Makefile
+++ b/Makefile
@@@ -773,9 -773,6 +773,9 @@@ ende
  vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) vmlinux.o FORCE
  ifdef CONFIG_HEADERS_CHECK
        $(Q)$(MAKE) -f $(srctree)/Makefile headers_check
 +endif
 +ifdef CONFIG_SAMPLES
 +      $(Q)$(MAKE) $(build)=samples
  endif
        $(call vmlinux-modpost)
        $(call if_changed_rule,vmlinux__)
@@@ -887,10 -884,7 +887,7 @@@ prepare2: prepare3 outputmakefil
  
  prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \
                     include/asm include/config/auto.conf
- ifneq ($(KBUILD_MODULES),)
-       $(Q)mkdir -p $(MODVERDIR)
-       $(Q)rm -f $(MODVERDIR)/*
- endif
+       $(cmd_crmodverdir)
  
  archprepare: prepare1 scripts_basic
  
@@@ -906,14 -900,24 +903,24 @@@ prepare: prepare
  
  export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH)
  
- # FIXME: The asm symlink changes when $(ARCH) changes. That's
- # hard to detect, but I suppose "make mrproper" is a good idea
- # before switching between archs anyway.
- include/asm:
-       @echo '  SYMLINK $@ -> include/asm-$(SRCARCH)'
-       $(Q)if [ ! -d include ]; then mkdir -p include; fi;
-       @ln -fsn asm-$(SRCARCH) $@
+ # The asm symlink changes when $(ARCH) changes.
+ # Detect this and ask user to run make mrproper
+ include/asm: FORCE
+       $(Q)set -e; asmlink=`readlink include/asm | cut -d '-' -f 2`;   \
+       if [ -L include/asm ]; then                                     \
+               if [ "$$asmlink" != "$(SRCARCH)" ]; then                \
+                       echo "ERROR: the symlink $@ points to asm-$$asmlink but asm-$(SRCARCH) was expected"; \
+                       echo "       set ARCH or save .config and run 'make mrproper' to fix it";             \
+                       exit 1;                                         \
+               fi;                                                     \
+       else                                                            \
+               echo '  SYMLINK $@ -> include/asm-$(SRCARCH)';          \
+               if [ ! -d include ]; then                               \
+                       mkdir -p include;                               \
+               fi;                                                     \
+               ln -fsn asm-$(SRCARCH) $@;                              \
+       fi
  
  # Generate some files
  # ---------------------------------------------------------------------------
@@@ -1023,19 -1027,12 +1030,12 @@@ _modinst_
        fi
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
  
- # If System.map exists, run depmod.  This deliberately does not have a
- # dependency on System.map since that would run the dependency tree on
- # vmlinux.  This depmod is only for convenience to give the initial
+ # This depmod is only for convenience to give the initial
  # boot a modules.dep even before / is mounted read-write.  However the
  # boot script depmod is the master version.
- ifeq "$(strip $(INSTALL_MOD_PATH))" ""
- depmod_opts   :=
- else
- depmod_opts   := -b $(INSTALL_MOD_PATH) -r
- endif
  PHONY += _modinst_post
  _modinst_post: _modinst_
-       if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
+       $(call cmd,depmod)
  
  else # CONFIG_MODULES
  
@@@ -1223,8 -1220,7 +1223,7 @@@ else # KBUILD_EXTMO
  KBUILD_MODULES := 1
  PHONY += crmodverdir
  crmodverdir:
-       $(Q)mkdir -p $(MODVERDIR)
-       $(Q)rm -f $(MODVERDIR)/*
+       $(cmd_crmodverdir)
  
  PHONY += $(objtree)/Module.symvers
  $(objtree)/Module.symvers:
@@@ -1252,15 -1248,6 +1251,6 @@@ _emodinst_
        $(Q)mkdir -p $(MODLIB)/$(install-dir)
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
  
- # Run depmod only is we have System.map and depmod is executable
- quiet_cmd_depmod = DEPMOD  $(KERNELRELEASE)
-       cmd_depmod = if [ -r System.map -a -x $(DEPMOD) ]; then \
-                       $(DEPMOD) -ae -F System.map             \
-                       $(if $(strip $(INSTALL_MOD_PATH)),      \
-                     -b $(INSTALL_MOD_PATH) -r)              \
-                     $(KERNELRELEASE);                       \
-                    fi
  PHONY += _emodinst_post
  _emodinst_post: _emodinst_
        $(call cmd,depmod)
@@@ -1344,7 -1331,7 +1334,7 @@@ define find-source
          find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \
               -name $1 -print; \
          find $(__srctree) $(RCS_FIND_IGNORE) \
-              \( -name include -o -name arch \) -prune -o \
+              \( -name include -o -name arch -o -name '.tmp_*' \) -prune -o \
               -name $1 -print; \
          )
  endef
@@@ -1493,9 -1480,11 +1483,11 @@@ endi
  
  # Modules
  / %/: prepare scripts FORCE
+       $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
        $(build)=$(build-dir)
  %.ko: prepare scripts FORCE
+       $(cmd_crmodverdir)
        $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \
        $(build)=$(build-dir) $(@:.ko=.o)
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@@ -1509,6 -1498,19 +1501,19 @@@ quiet_cmd_rmdirs = $(if $(wildcard $(rm
  quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN   $(wildcard $(rm-files)))
        cmd_rmfiles = rm -f $(rm-files)
  
+ # Run depmod only is we have System.map and depmod is executable
+ # and we build for the host arch
+ quiet_cmd_depmod = DEPMOD  $(KERNELRELEASE)
+       cmd_depmod = \
+       if [ -r System.map -a -x $(DEPMOD) -a "$(SUBARCH)" == "$(ARCH)" ]; then \
+               $(DEPMOD) -ae -F System.map                                     \
+               $(if $(strip $(INSTALL_MOD_PATH)), -b $(INSTALL_MOD_PATH) -r)   \
+               $(KERNELRELEASE);                                               \
+       fi
+ # Create temporary dir for module support files
+ cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR); rm -f $(MODVERDIR)/*
  
  a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \
          $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \