summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2003-12-18 17:19:29 +0000
committerRobert Schwebel <r.schwebel@pengutronix.de>2003-12-18 17:19:29 +0000
commit97166818b380dc88c8c82bd8f7a34f7899dc774b (patch)
tree0c6aa3783fb7514f0b66381d6bdc8311cef6fefd /scripts/kconfig
parent7bd6635c54e9eb284e68635ccce74021ddc36932 (diff)
downloadptxdist-97166818b380dc88c8c82bd8f7a34f7899dc774b.tar.gz
ptxdist-97166818b380dc88c8c82bd8f7a34f7899dc774b.tar.xz
Updated to kconfig version from 2.6.0. [RSC]
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunk@897 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/Makefile-orig81
-rw-r--r--scripts/kconfig/conf.c30
-rw-r--r--scripts/kconfig/symbol.c24
3 files changed, 105 insertions, 30 deletions
diff --git a/scripts/kconfig/Makefile-orig b/scripts/kconfig/Makefile-orig
index bae5e2935..99d4ac48e 100644
--- a/scripts/kconfig/Makefile-orig
+++ b/scripts/kconfig/Makefile-orig
@@ -1,6 +1,61 @@
-#################
-#
-# Shared Makefile for the various lkc executables:
+# ===========================================================================
+# Kernel configuration targets
+# These targets are used from top-level makefile
+
+.PHONY: oldconfig xconfig gconfig menuconfig config silentoldconfig
+
+xconfig: $(obj)/qconf
+ $< arch/$(ARCH)/Kconfig
+
+gconfig: $(obj)/gconf
+ ./$< arch/$(ARCH)/Kconfig
+
+menuconfig: $(obj)/mconf
+ $(Q)$(MAKE) $(build)=scripts/lxdialog
+ $< arch/$(ARCH)/Kconfig
+
+config: $(obj)/conf
+ $< arch/$(ARCH)/Kconfig
+
+oldconfig: $(obj)/conf
+ $< -o arch/$(ARCH)/Kconfig
+
+silentoldconfig: $(obj)/conf
+ $< -s arch/$(ARCH)/Kconfig
+
+.PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig
+
+randconfig: $(obj)/conf
+ $< -r arch/$(ARCH)/Kconfig
+
+allyesconfig: $(obj)/conf
+ $< -y arch/$(ARCH)/Kconfig
+
+allnoconfig: $(obj)/conf
+ $< -n arch/$(ARCH)/Kconfig
+
+allmodconfig: $(obj)/conf
+ $< -m arch/$(ARCH)/Kconfig
+
+defconfig: $(obj)/conf
+ $< -d arch/$(ARCH)/Kconfig
+
+%_defconfig: $(obj)/conf
+ $(Q)$< -D arch/$(ARCH)/configs/$@ arch/$(ARCH)/Kconfig
+
+# Help text used by make help
+help:
+ @echo ' oldconfig - Update current config utilising a line-oriented program'
+ @echo ' menuconfig - Update current config utilising a menu based program'
+ @echo ' xconfig - Update current config utilising a QT based front-end'
+ @echo ' gconfig - Update current config utilising a GTK based front-end'
+ @echo ' defconfig - New config with default answer to all options'
+ @echo ' allmodconfig - New config selecting modules when possible'
+ @echo ' allyesconfig - New config where all options are accepted with yes'
+ @echo ' allnoconfig - New minimal config'
+
+# ===========================================================================
+# Shared Makefile for the various kconfig executables:
# conf: Used for defconfig, oldconfig and related targets
# mconf: Used for the mconfig target.
# Utilizes the lxdialog package
@@ -8,22 +63,28 @@
# Based on QT which needs to be installed to compile it
# gconf: Used for the gconfig target
# Based on GTK which needs to be installed to compile it
-#
-#################
+# object files used by all kconfig flavours
-# object files used by all lkc flavours
libkconfig-objs := zconf.tab.o
host-progs := conf mconf qconf gconf
conf-objs := conf.o libkconfig.so
mconf-objs := mconf.o libkconfig.so
-ifeq ($(MAKECMDGOALS),$(obj)/qconf)
+ifeq ($(MAKECMDGOALS),xconfig)
+ qconf-target := 1
+endif
+ifeq ($(MAKECMDGOALS),gconfig)
+ gconf-target := 1
+endif
+
+
+ifeq ($(qconf-target),1)
qconf-cxxobjs := qconf.o
qconf-objs := kconfig_load.o
endif
-ifeq ($(MAKECMDGOALS),$(obj)/gconf)
+ifeq ($(gconf-target),1)
gconf-objs := gconf.o kconfig_load.o
endif
@@ -44,7 +105,7 @@ $(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o $(obj)/gconf.o: $(obj)/zconf.tab.h
$(obj)/qconf.o: $(obj)/.tmp_qtcheck
-ifeq ($(MAKECMDGOALS),$(obj)/qconf)
+ifeq ($(qconf-target),1)
MOC = $(QTDIR)/bin/moc
-include $(obj)/.tmp_qtcheck
@@ -74,7 +135,7 @@ endif
$(obj)/gconf.o: $(obj)/.tmp_gtkcheck
-ifeq ($(MAKECMDGOALS),$(obj)/gconf)
+ifeq ($(gconf-target),1)
-include $(obj)/.tmp_gtkcheck
# GTK needs some extra effort, too...
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index fa320f79a..08da496f8 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -26,6 +26,7 @@ enum {
set_no,
set_random
} input_mode = ask_all;
+char *defconfig_file;
static int indent = 1;
static int valid_stdin = 1;
@@ -483,11 +484,12 @@ static void check_conf(struct menu *menu)
int main(int ac, char **av)
{
+ int i = 1;
const char *name;
struct stat tmpstat;
- if (ac > 1 && av[1][0] == '-') {
- switch (av[1][1]) {
+ if (ac > i && av[i][0] == '-') {
+ switch (av[i++][1]) {
case 'o':
input_mode = ask_new;
break;
@@ -498,6 +500,15 @@ int main(int ac, char **av)
case 'd':
input_mode = set_default;
break;
+ case 'D':
+ input_mode = set_default;
+ defconfig_file = av[i++];
+ if (!defconfig_file) {
+ printf("%s: No default config file specified\n",
+ av[0]);
+ exit(1);
+ }
+ break;
case 'n':
input_mode = set_no;
break;
@@ -516,18 +527,21 @@ int main(int ac, char **av)
printf("%s [-o|-s] config\n", av[0]);
exit(0);
}
- name = av[2];
- } else
- name = av[1];
+ }
+ name = av[i];
+ if (!name) {
+ printf("%s: Kconfig file missing\n", av[0]);
+ }
conf_parse(name);
//zconfdump(stdout);
switch (input_mode) {
case set_default:
- name = conf_get_default_confname();
- if (conf_read(name)) {
+ if (!defconfig_file)
+ defconfig_file = conf_get_default_confname();
+ if (conf_read(defconfig_file)) {
printf("***\n"
"*** Can't find default configuration \"%s\"!\n"
- "***\n", name);
+ "***\n", defconfig_file);
exit(1);
}
break;
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 11318d95d..01c766ed1 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -12,21 +12,21 @@
#include "lkc.h"
struct symbol symbol_yes = {
- name: "y",
- curr: { "y", yes },
- flags: SYMBOL_YES|SYMBOL_VALID,
+ .name = "y",
+ .curr = { "y", yes },
+ .flags = SYMBOL_YES|SYMBOL_VALID,
}, symbol_mod = {
- name: "m",
- curr: { "m", mod },
- flags: SYMBOL_MOD|SYMBOL_VALID,
+ .name = "m",
+ .curr = { "m", mod },
+ .flags = SYMBOL_MOD|SYMBOL_VALID,
}, symbol_no = {
- name: "n",
- curr: { "n", no },
- flags: SYMBOL_NO|SYMBOL_VALID,
+ .name = "n",
+ .curr = { "n", no },
+ .flags = SYMBOL_NO|SYMBOL_VALID,
}, symbol_empty = {
- name: "",
- curr: { "", no },
- flags: SYMBOL_VALID,
+ .name = "",
+ .curr = { "", no },
+ .flags = SYMBOL_VALID,
};
int sym_change_count;