summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-04-04 10:34:02 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2010-04-04 10:34:02 +0200
commit5042ac8e5927d0089d3902b1c37e5bcc1565d053 (patch)
treecd2be3085808c5ac59dd70f9c610c6a40bfe3ffd /config
parent401dabf66529cfb5ab47b4c78d5e25fd493eef1f (diff)
parent4d569ed1a3305c7b7abe8fa4273cea3b559cc85a (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Conflicts: BUGS package/autoconf/Makefile
Diffstat (limited to 'config')
-rw-r--r--config/Makefile13
-rw-r--r--config/conf.c32
2 files changed, 24 insertions, 21 deletions
diff --git a/config/Makefile b/config/Makefile
index f2e20cbf8..1f3143e34 100644
--- a/config/Makefile
+++ b/config/Makefile
@@ -1,7 +1,9 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
+ifneq ($(filter-out clean,${MAKECMDGOALS}),)
include ${TOPDIR}/rules.mk
+endif
CP=cp -fpR
HOSTCFLAGS+=-DKBUILD_NO_NLS
@@ -29,6 +31,7 @@ ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h))
HOSTNCURSES+= -DCURSES_LOC="<ncurses.h>"
else
HOSTNCURSES+= -DCURSES_LOC="<curses.h>"
+LIBS= -lcurses
endif
endif
endif
@@ -45,16 +48,16 @@ MCONF_OBJS=$(patsubst %.c,%.o, $(MCONF_SRC))
SHARED_OBJS=$(patsubst %.c,%.o, $(SHARED_SRC))
conf: $(CONF_OBJS) $(SHARED_OBJS)
- $(HOSTCC) -DKBUILD_NO_NLS $(NATIVE_LDFLAGS) $^ -o $@
+ $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) $^ -o $@
mconf: $(MCONF_OBJS) $(SHARED_OBJS)
- $(HOSTCC) -DKBUILD_NO_NLS $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS)
+ $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS)
$(CONF_OBJS): %.o : %.c $(SHARED_DEPS)
- $(HOSTCC) -DKBUILD_NO_NLS $(HOSTCFLAGS) -I. -c $< -o $@
+ $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
$(MCONF_OBJS): %.o : %.c $(SHARED_DEPS)
- $(HOSTCC) -DKBUILD_NO_NLS $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@
+ $(HOSTCC) $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@
glob.o: glob.c $(SHARED_DEPS)
$(HOSTCC) $(HOSTCFLAGS) -I. -c glob.c -o $@
@@ -124,5 +127,5 @@ ncurses:
fi
clean:
- rm -f *.o *~ core $(TARGETS) $(MCONF_OBJS) $(CONF_OBJS) \
+ @rm -f *.o *~ core $(TARGETS) $(MCONF_OBJS) $(CONF_OBJS) zconf.hash.c \
conf mconf zconf.tab.c zconf.tab.h lex.zconf.c lkc_defs.h
diff --git a/config/conf.c b/config/conf.c
index 74be7e779..412656fec 100644
--- a/config/conf.c
+++ b/config/conf.c
@@ -68,9 +68,9 @@ static void strip(char *str)
static void check_stdin(void)
{
if (!valid_stdin) {
- printf(_("aborted!\n\n"));
- printf(_("Console input/output is redirected. "));
- printf(_("Run 'make oldconfig' to update configuration.\n\n"));
+ printf("aborted!\n\n");
+ printf("Console input/output is redirected. ");
+ printf("Run 'make oldconfig' to update configuration.\n\n");
exit(1);
}
}
@@ -80,7 +80,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
enum symbol_type type = sym_get_type(sym);
if (!sym_has_value(sym))
- printf(_("(NEW) "));
+ printf("(NEW) ");
line[0] = '\n';
line[1] = 0;
@@ -102,8 +102,8 @@ static int conf_askvalue(struct symbol *sym, const char *def)
check_stdin();
case ask_all:
fflush(stdout);
- fgets(line, 128, stdin);
- return 1;
+ if (fgets(line, 128, stdin) != NULL)
+ return 1;
default:
break;
}
@@ -281,7 +281,7 @@ static int conf_choice(struct menu *menu)
if (child->sym->name)
printf(" (%s)", child->sym->name);
if (!sym_has_value(child->sym))
- printf(_(" (NEW)"));
+ printf(" (NEW)");
printf("\n");
}
printf(_("%*schoice"), indent - 1, "");
@@ -304,8 +304,8 @@ static int conf_choice(struct menu *menu)
check_stdin();
case ask_all:
fflush(stdout);
- fgets(line, 128, stdin);
- strip(line);
+ if (fgets(line, 128, stdin) != NULL)
+ strip(line);
if (line[0] == '?') {
printf("\n%s\n", get_help(menu));
continue;
@@ -419,7 +419,7 @@ static void check_conf(struct menu *menu)
if (sym_is_changable(sym) ||
(sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
if (!conf_cnt++)
- printf(_("*\n* Restart config...\n*\n"));
+ printf("*\n* Restart config...\n*\n");
rootEntry = menu_get_parent_menu(menu);
conf(rootEntry);
}
@@ -484,11 +484,11 @@ int main(int ac, char **av)
break;
}
case 'h':
- printf(_("See README for usage info\n"));
+ printf("See README for usage info\n");
exit(0);
break;
default:
- fprintf(stderr, _("See README for usage info\n"));
+ fprintf(stderr, "See README for usage info\n");
exit(1);
}
}
@@ -559,7 +559,7 @@ int main(int ac, char **av)
name = getenv("KCONFIG_NOSILENTUPDATE");
if (name && *name) {
fprintf(stderr,
- _("\n*** Kernel configuration requires explicit update.\n\n"));
+ "\n*** Kernel configuration requires explicit update.\n\n");
return 1;
}
}
@@ -602,16 +602,16 @@ int main(int ac, char **av)
* All other commands are only used to generate a config.
*/
if (conf_get_changed() && conf_write(NULL)) {
- fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
+ fprintf(stderr, "\n*** Error during writing of the kernel configuration.\n\n");
exit(1);
}
if (conf_write_autoconf()) {
- fprintf(stderr, _("\n*** Error during update of the kernel configuration.\n\n"));
+ fprintf(stderr, "\n*** Error during update of the kernel configuration.\n\n");
return 1;
}
} else {
if (conf_write(NULL)) {
- fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
+ fprintf(stderr, "\n*** Error during writing of the kernel configuration.\n\n");
exit(1);
}
}