Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
authorLinus Torvalds <torvalds@g5.osdl.org>
Thu, 5 Jan 2006 00:36:52 +0000 (16:36 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 5 Jan 2006 00:36:52 +0000 (16:36 -0800)
1  2 
Makefile
init/Kconfig
scripts/kconfig/Makefile
scripts/kconfig/util.c

diff --combined Makefile
+++ b/Makefile
@@@ -1,8 -1,8 +1,8 @@@
  VERSION = 2
  PATCHLEVEL = 6
  SUBLEVEL = 15
 -EXTRAVERSION =-rc1
 -NAME=Affluent Albatross
 +EXTRAVERSION =
 +NAME=Sliding Snow Leopard
  
  # *DOCUMENTATION*
  # To see a list of typical targets execute "make help"
@@@ -286,10 -286,6 +286,6 @@@ export quiet Q KBUILD_VERBOS
  cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
               > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
  
- # For backward compatibility
- check_gcc = $(warning check_gcc is deprecated - use cc-option) \
-             $(call cc-option, $(1),$(2))
  # cc-option-yn
  # Usage: flag := $(call cc-option-yn, -march=winchip-c6)
  cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
@@@ -408,7 -404,7 +404,7 @@@ outputmakefile
  # of make so .config is not included in this case either (for *config).
  
  no-dot-config-targets := clean mrproper distclean \
 -                       cscope TAGS tags help %docs check% kernelrelease
 +                       cscope TAGS tags help %docs check%
  
  config-targets := 0
  mixed-targets  := 0
@@@ -481,18 -477,20 +477,20 @@@ ifeq ($(dot-config),1
  
  # Read in dependencies to all Kconfig* files, make sure to run
  # oldconfig if changes are detected.
- -include .config.cmd
+ -include .kconfig.d
  
  include .config
  
  # If .config needs to be updated, it will be done via the dependency
  # that autoconf has on .config.
  # To avoid any implicit rule to kick in, define an empty command
- .config: ;
+ .config .kconfig.d: ;
  
  # If .config is newer than include/linux/autoconf.h, someone tinkered
- # with it and forgot to run make oldconfig
- include/linux/autoconf.h: .config
+ # with it and forgot to run make oldconfig.
+ # If kconfig.d is missing then we are probarly in a cleaned tree so
+ # we execute the config step to be sure to catch updated Kconfig files
+ include/linux/autoconf.h: .kconfig.d .config
        $(Q)mkdir -p include/linux
        $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
  else
@@@ -1066,7 -1064,7 +1064,7 @@@ help
        @echo  '  all             - Build all targets marked with [*]'
        @echo  '* vmlinux         - Build the bare kernel'
        @echo  '* modules         - Build all modules'
-       @echo  '  modules_install - Install all modules'
+       @echo  '  modules_install - Install all modules to INSTALL_MOD_PATH (default: /)'
        @echo  '  dir/            - Build all files in dir and below'
        @echo  '  dir/file.[ois]  - Build specified target only'
        @echo  '  dir/file.ko     - Build module including final link'
@@@ -1240,8 -1238,11 +1238,11 @@@ cscope: FORC
  quiet_cmd_TAGS = MAKE   $@
  define cmd_TAGS
        rm -f $@; \
-       ETAGSF=`etags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \
-       $(all-sources) | xargs etags $$ETAGSF -a
+       ETAGSF=`etags --version | grep -i exuberant >/dev/null &&     \
+                 echo "-I __initdata,__exitdata,__acquires,__releases  \
+                       -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL              \
+                       --extra=+f --c-kinds=+px"`;                     \
+                 $(all-sources) | xargs etags $$ETAGSF -a
  endef
  
  TAGS: FORCE
  quiet_cmd_tags = MAKE   $@
  define cmd_tags
        rm -f $@; \
-       CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \
-       $(all-sources) | xargs ctags $$CTAGSF -a
+       CTAGSF=`ctags --version | grep -i exuberant >/dev/null &&     \
+                 echo "-I __initdata,__exitdata,__acquires,__releases  \
+                       -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL              \
+                       --extra=+f --c-kinds=+px"`;                     \
+                 $(all-sources) | xargs ctags $$CTAGSF -a
  endef
  
  tags: FORCE
diff --combined init/Kconfig
@@@ -206,7 -206,7 +206,7 @@@ config HOTPLU
          outside the kernel tree does. Such modules require Y here.
  
  config KOBJECT_UEVENT
 -      bool "Kernel Userspace Events"
 +      bool "Kernel Userspace Events" if EMBEDDED
        depends on NET
        default y
        help
@@@ -256,19 -256,6 +256,19 @@@ config CPUSET
  
  source "usr/Kconfig"
  
 +config CC_OPTIMIZE_FOR_SIZE
 +      bool "Optimize for size (Look out for broken compilers!)"
 +      default y
 +      depends on ARM || H8300 || EXPERIMENTAL
 +      help
 +        Enabling this option will pass "-Os" instead of "-O2" to gcc
 +        resulting in a smaller kernel.
 +
 +        WARNING: some versions of gcc may generate incorrect code with this
 +        option.  If problems are observed, a gcc upgrade may be needed.
 +
 +        If unsure, say N.
 +
  menuconfig EMBEDDED
        bool "Configure standard kernel features (for small systems)"
        help
@@@ -351,6 -338,18 +351,6 @@@ config EPOL
          Disabling this option will cause the kernel to be built without
          support for epoll family of system calls.
  
 -config CC_OPTIMIZE_FOR_SIZE
 -      bool "Optimize for size" if EMBEDDED
 -      default y if ARM || H8300
 -      help
 -        Enabling this option will pass "-Os" instead of "-O2" to gcc
 -        resulting in a smaller kernel.
 -
 -        WARNING: some versions of gcc may generate incorrect code with this
 -        option.  If problems are observed, a gcc upgrade may be needed.
 -
 -        If unsure, say N.
 -
  config SHMEM
        bool "Use full shmem filesystem" if EMBEDDED
        default y
@@@ -461,8 -460,8 +461,8 @@@ config OBSOLETE_MODPAR
          If unsure, say Y.
  
  config MODVERSIONS
-       bool "Module versioning support (EXPERIMENTAL)"
-       depends on MODULES && EXPERIMENTAL
+       bool "Module versioning support"
+       depends on MODULES
        help
          Usually, you have to use modules compiled with your kernel.
          Saying Y here makes it sometimes possible to use modules
diff --combined scripts/kconfig/Makefile
@@@ -11,7 -11,7 +11,7 @@@ gconfig: $(obj)/gcon
        $< arch/$(ARCH)/Kconfig
  
  menuconfig: $(obj)/mconf
-       $(Q)$(MAKE) $(build)=scripts/lxdialog
+       $(Q)$(MAKE) $(build)=scripts/kconfig/lxdialog
        $< arch/$(ARCH)/Kconfig
  
  config: $(obj)/conf
@@@ -115,6 -115,7 +115,7 @@@ endi
  
  clean-files   := lkc_defs.h qconf.moc .tmp_qtcheck \
                   .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
+ subdir- += lxdialog
  
  # Needed for systems without gettext
  KBUILD_HAVE_NLS := $(shell \
@@@ -129,8 -130,8 +130,8 @@@ endi
  HOSTCFLAGS_lex.zconf.o        := -I$(src)
  HOSTCFLAGS_zconf.tab.o        := -I$(src)
  
 -HOSTLOADLIBES_qconf   = -L$(QTLIBPATH) -Wl,-rpath,$(QTLIBPATH) -l$(LIBS_QT) -ldl
 -HOSTCXXFLAGS_qconf.o  = -I$(QTDIR)/include -D LKC_DIRECT_LINK
 +HOSTLOADLIBES_qconf   = $(KC_QT_LIBS) -ldl
 +HOSTCXXFLAGS_qconf.o  = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
  
  HOSTLOADLIBES_gconf   = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs`
  HOSTCFLAGS_gconf.o    = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` \
  $(obj)/qconf.o: $(obj)/.tmp_qtcheck
  
  ifeq ($(qconf-target),1)
 -MOC = $(QTDIR)/bin/moc
 -QTLIBPATH = $(QTDIR)/lib
 +$(obj)/.tmp_qtcheck: $(src)/Makefile
  -include $(obj)/.tmp_qtcheck
  
  # QT needs some extra effort...
  $(obj)/.tmp_qtcheck:
 -      @set -e; for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
 -        if [ -f $$d/include/qconfig.h ]; then DIR=$$d; break; fi; \
 -      done; \
 -      if [ -z "$$DIR" ]; then \
 -        echo "*"; \
 -        echo "* Unable to find the QT installation. Please make sure that the"; \
 -        echo "* QT development package is correctly installed and the QTDIR"; \
 -        echo "* environment variable is set to the correct location."; \
 -        echo "*"; \
 -        false; \
 -      fi; \
 -      LIBPATH=$$DIR/lib; LIB=qt; \
 -      if [ -f $$QTLIB/libqt-mt.so ] ; then \
 -              LIB=qt-mt; \
 -              LIBPATH=$$QTLIB; \
 +      @set -e; echo "  CHECK   qt"; dir=""; pkg=""; \
 +      pkg-config --exists qt 2> /dev/null && pkg=qt; \
 +      pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
 +      if [ -n "$$pkg" ]; then \
 +        cflags="\$$(shell pkg-config $$pkg --cflags)"; \
 +        libs="\$$(shell pkg-config $$pkg --libs)"; \
 +        moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
 +        dir="$$(pkg-config $$pkg --variable=prefix)"; \
        else \
 -              $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
 -              LIBPATH=$$DIR/lib/$$($(HOSTCXX) -print-multi-os-directory); \
 -              if [ -f $$LIBPATH/libqt-mt.so ]; then LIB=qt-mt; fi; \
 +        for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
 +          if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
 +        done; \
 +        if [ -z "$$dir" ]; then \
 +          echo "*"; \
 +          echo "* Unable to find the QT installation. Please make sure that"; \
 +          echo "* the QT development package is correctly installed and"; \
 +          echo "* either install pkg-config or set the QTDIR environment"; \
 +          echo "* variable to the correct location."; \
 +          echo "*"; \
 +          false; \
 +        fi; \
 +        libpath=$$dir/lib; lib=qt; osdir=""; \
 +        $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
 +          osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
 +        test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
 +        test -f $$libpath/libqt-mt.so && lib=qt-mt; \
 +        cflags="-I$$dir/include"; \
 +        libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
 +        moc="$$dir/bin/moc"; \
        fi; \
 -      echo "QTDIR=$$DIR" > $@; echo "QTLIBPATH=$$LIBPATH" >> $@; \
 -      echo "LIBS_QT=$$LIB" >> $@; \
 -      if [ ! -x $$DIR/bin/moc -a -x /usr/bin/moc ]; then \
 +      if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
          echo "*"; \
 -        echo "* Unable to find $$DIR/bin/moc, using /usr/bin/moc instead."; \
 +        echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
          echo "*"; \
 -        echo "MOC=/usr/bin/moc" >> $@; \
 -      fi
 +        moc="/usr/bin/moc"; \
 +      fi; \
 +      echo "KC_QT_CFLAGS=$$cflags" > $@; \
 +      echo "KC_QT_LIBS=$$libs" >> $@; \
 +      echo "KC_QT_MOC=$$moc" >> $@
  endif
  
  $(obj)/gconf.o: $(obj)/.tmp_gtkcheck
@@@ -220,7 -211,7 +221,7 @@@ $(obj)/qconf.o: $(obj)/qconf.moc $(obj)
  $(obj)/gconf.o: $(obj)/lkc_defs.h
  
  $(obj)/%.moc: $(src)/%.h
 -      $(MOC) -i $< -o $@
 +      $(KC_QT_MOC) -i $< -o $@
  
  $(obj)/lkc_defs.h: $(src)/lkc_proto.h
        sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
diff --combined scripts/kconfig/util.c
@@@ -33,7 -33,7 +33,7 @@@ int file_write_dep(const char *name
        FILE *out;
  
        if (!name)
-               name = ".config.cmd";
+               name = ".kconfig.d";
        out = fopen("..config.tmp", "w");
        if (!out)
                return 1;
@@@ -101,7 -101,7 +101,7 @@@ void str_printf(struct gstr *gs, const 
        va_end(ap);
  }
  
 -/* Retreive value of growable string */
 +/* Retrieve value of growable string */
  const char *str_get(struct gstr *gs)
  {
        return gs->s;