aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.ravnborg.org>2003-09-21 01:03:23 +0200
committerSam Ravnborg <sam@mars.ravnborg.org>2003-09-21 01:03:23 +0200
commite272a0c64add38a4c92adf6943d2eed964e68419 (patch)
treef8667696c81ca866e1e7712baf65e3be67a7bce9 /scripts
parent0900977229ba94e87e7ce3bd348f6bc486296727 (diff)
parentefacc21675da4a95b7f62ad54dacf4802926c371 (diff)
downloadhistory-e272a0c64add38a4c92adf6943d2eed964e68419.tar.gz
Merge mars.ravnborg.org:/home/sam/bk/kbuild-patchset-1
into mars.ravnborg.org:/home/sam/bk/sepout
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.lib2
-rw-r--r--scripts/kconfig/Makefile3
-rw-r--r--scripts/kconfig/conf.c30
3 files changed, 26 insertions, 9 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index fd6355792f1d27..badd18666b4acf 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -262,7 +262,7 @@ if_changed_rule = $(if $(strip $? \
# If quiet is set, only print short version of command
-cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1))
+cmd = @$(if $($(quiet)cmd_$(1)),echo ' $(subst ','\'',$($(quiet)cmd_$(1)))' &&) $(cmd_$(1))
# $(call descend,<dir>,<target>)
# Recursively call a sub-make in <dir> with target <target>
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 2189c334ad37df..99d4ac48efc618 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -40,6 +40,9 @@ allmodconfig: $(obj)/conf
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'
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index fa320f79a5da5c..08da496f836905 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;