sched: Add missing state chars to TASK_STATE_TO_CHAR_STR
[safe/jmp/linux-2.6] / scripts / kconfig / Makefile
index d28bf85..80599e3 100644 (file)
@@ -2,9 +2,14 @@
 # Kernel configuration targets
 # These targets are used from top-level makefile
 
-PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config
+PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
+       localmodconfig localyesconfig
 
+ifdef KBUILD_KCONFIG
+Kconfig := $(KBUILD_KCONFIG)
+else
 Kconfig := arch/$(SRCARCH)/Kconfig
+endif
 
 xconfig: $(obj)/qconf
        $< $(Kconfig)
@@ -24,10 +29,39 @@ oldconfig: $(obj)/conf
 silentoldconfig: $(obj)/conf
        $< -s $(Kconfig)
 
+localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
+       $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
+       $(Q)if [ -f .config ]; then                             \
+                       cmp -s .tmp.config .config ||           \
+                       (mv -f .config .config.old.1;           \
+                        mv -f .tmp.config .config;             \
+                        $(obj)/conf -s $(Kconfig);             \
+                        mv -f .config.old.1 .config.old)       \
+       else                                                    \
+                       mv -f .tmp.config .config;              \
+                       $(obj)/conf -s $(Kconfig);              \
+       fi
+       $(Q)rm -f .tmp.config
+
+localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
+       $(Q)perl $< $(srctree) $(Kconfig) > .tmp.config
+       $(Q)sed -i s/=m/=y/ .tmp.config
+       $(Q)if [ -f .config ]; then                             \
+                       cmp -s .tmp.config .config ||           \
+                       (mv -f .config .config.old.1;           \
+                        mv -f .tmp.config .config;             \
+                        $(obj)/conf -s $(Kconfig);             \
+                        mv -f .config.old.1 .config.old)       \
+       else                                                    \
+                       mv -f .tmp.config .config;              \
+                       $(obj)/conf -s $(Kconfig);              \
+       fi
+       $(Q)rm -f .tmp.config
+
 # Create new linux.pot file
 # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
 # The symlink is used to repair a deficiency in arch/um
-update-po-config: $(obj)/kxgettext
+update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
        $(Q)echo "  GEN config"
        $(Q)xgettext --default-domain=linux              \
            --add-comments --keyword=_ --keyword=N_      \
@@ -36,10 +70,10 @@ update-po-config: $(obj)/kxgettext
            --output $(obj)/config.pot
        $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot
        $(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch
-       $(Q)(for i in `ls arch/`;                        \
+       $(Q)(for i in `ls arch/*/Kconfig`;               \
            do                                           \
                echo "  GEN $$i";                        \
-               $(obj)/kxgettext arch/$$i/Kconfig        \
+               $(obj)/kxgettext $$i                     \
                     >> $(obj)/config.pot;               \
            done )
        $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \
@@ -79,7 +113,9 @@ help:
        @echo  '  xconfig         - Update current config utilising a QT based front-end'
        @echo  '  gconfig         - Update current config utilising a GTK based front-end'
        @echo  '  oldconfig       - Update current config utilising a provided .config as base'
-       @echo  '  silentoldconfig - Same as oldconfig, but quietly'
+       @echo  '  localmodconfig  - Update current config disabling modules not loaded'
+       @echo  '  localyesconfig  - Update current config converting local mods to core'
+       @echo  '  silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
        @echo  '  randconfig      - New config with random answer to all options'
        @echo  '  defconfig       - New config with default answer to all options'
        @echo  '  allmodconfig    - New config selecting modules when possible'
@@ -100,7 +136,7 @@ HOST_EXTRACFLAGS += -DLOCALE
 # ===========================================================================
 # Shared Makefile for the various kconfig executables:
 # conf:          Used for defconfig, oldconfig and related targets
-# mconf:  Used for the mconfig target.
+# mconf:  Used for the menuconfig target
 #         Utilizes the lxdialog package
 # qconf:  Used for the xconfig target
 #         Based on QT which needs to be installed to compile it
@@ -139,7 +175,7 @@ gconf-objs  := gconf.o kconfig_load.o zconf.tab.o
 endif
 
 clean-files    := lkc_defs.h qconf.moc .tmp_qtcheck \
-                  .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
+                  .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
 clean-files     += mconf qconf gconf
 clean-files     += config.pot linux.pot
 
@@ -254,6 +290,9 @@ $(obj)/%.moc: $(src)/%.h
 $(obj)/lkc_defs.h: $(src)/lkc_proto.h
        sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
 
+# Extract gconf menu items for I18N support
+$(obj)/gconf.glade.h: $(obj)/gconf.glade
+       intltool-extract --type=gettext/glade $(obj)/gconf.glade
 
 ###
 # The following requires flex/bison/gperf