- pull kbuild from 2.6.22.7. This should fix the ncurses detection for dylib et al
This commit is contained in:
parent
e640e6a8ef
commit
0d888e3677
@ -143,6 +143,7 @@ endif
|
||||
|
||||
clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
|
||||
.tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
|
||||
clean-files += mconf qconf gconf
|
||||
|
||||
# Needed for systems without gettext
|
||||
KBUILD_HAVE_NLS := $(shell \
|
||||
|
@ -1,4 +1,4 @@
|
||||
This is a copy of the kconfig code in the kernel (currently 2.6.21.5) tweaked to
|
||||
This is a copy of the kconfig code in the kernel (currently 2.6.22.7) tweaked to
|
||||
suit Buildroot.
|
||||
|
||||
To update:
|
||||
@ -6,7 +6,7 @@ To update:
|
||||
cd package/config.new
|
||||
cp /usr/src/linux/Documentation/kbuild/kconfig-language.txt .
|
||||
mv Makefile Makefile.kconfig
|
||||
patch -p1 < ../config/kconfig-to-buildroot.patch
|
||||
patch -p1 < ../config/kconfig-to-buildroot2.patch
|
||||
cp ../config/README.buildroot2 .
|
||||
cp ../config/foo.h .
|
||||
cp ../config/Makefile .
|
||||
|
@ -558,6 +558,7 @@ int main(int ac, char **av)
|
||||
if (stat(".config", &tmpstat)) {
|
||||
printf(_("***\n"
|
||||
"*** You have not yet configured Buildroot!\n"
|
||||
"*** (missing .config file)\n"
|
||||
"***\n"
|
||||
"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
|
||||
"*** \"make menuconfig\" or \"make config\").\n"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2264,7 +2264,7 @@ FILE *zconf_fopen(const char *name)
|
||||
FILE *f;
|
||||
|
||||
f = fopen(name, "r");
|
||||
if (!f && name[0] != '/') {
|
||||
if (!f && name != NULL && name[0] != '/') {
|
||||
env = getenv(SRCTREE);
|
||||
if (env) {
|
||||
sprintf(fullname, "%s/%s", env, name);
|
||||
|
@ -64,6 +64,7 @@ int zconf_lineno(void);
|
||||
char *zconf_curname(void);
|
||||
|
||||
/* confdata.c */
|
||||
const char *conf_get_configname(void);
|
||||
char *conf_get_default_confname(void);
|
||||
void sym_set_change_count(int count);
|
||||
void sym_add_change_count(int count);
|
||||
|
@ -4,21 +4,15 @@
|
||||
# What library to link
|
||||
ldflags()
|
||||
{
|
||||
$cc -print-file-name=libncursesw.so | grep -q /
|
||||
if [ $? -eq 0 ]; then
|
||||
echo '-lncursesw'
|
||||
exit
|
||||
fi
|
||||
$cc -print-file-name=libncurses.so | grep -q /
|
||||
if [ $? -eq 0 ]; then
|
||||
echo '-lncurses'
|
||||
exit
|
||||
fi
|
||||
$cc -print-file-name=libcurses.so | grep -q /
|
||||
if [ $? -eq 0 ]; then
|
||||
echo '-lcurses'
|
||||
exit
|
||||
fi
|
||||
for ext in so a dylib ; do
|
||||
for lib in ncursesw ncurses curses ; do
|
||||
$cc -print-file-name=lib${lib}.${ext} | grep -q /
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "-l${lib}"
|
||||
exit
|
||||
fi
|
||||
done
|
||||
done
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
@ -188,6 +188,7 @@ int on_key_esc(WINDOW *win);
|
||||
int on_key_resize(void);
|
||||
|
||||
void init_dialog(const char *backtitle);
|
||||
void set_dialog_backtitle(const char *backtitle);
|
||||
void reset_dialog(void);
|
||||
void end_dialog(void);
|
||||
void attr_clear(WINDOW * win, int height, int width, chtype attr);
|
||||
|
@ -272,6 +272,11 @@ void init_dialog(const char *backtitle)
|
||||
color_setup(getenv("MENUCONFIG_COLOR"));
|
||||
}
|
||||
|
||||
void set_dialog_backtitle(const char *backtitle)
|
||||
{
|
||||
dlg.backtitle = backtitle;
|
||||
}
|
||||
|
||||
void reset_dialog(void)
|
||||
{
|
||||
initscr(); /* Init curses */
|
||||
@ -336,7 +341,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x)
|
||||
newl = 1;
|
||||
word = tempstr;
|
||||
while (word && *word) {
|
||||
sp = index(word, ' ');
|
||||
sp = strchr(word, ' ');
|
||||
if (sp)
|
||||
*sp++ = 0;
|
||||
|
||||
@ -348,7 +353,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x)
|
||||
if (wlen > room ||
|
||||
(newl && wlen < 4 && sp
|
||||
&& wlen + 1 + strlen(sp) > room
|
||||
&& (!(sp2 = index(sp, ' '))
|
||||
&& (!(sp2 = strchr(sp, ' '))
|
||||
|| wlen + 1 + (sp2 - sp) > room))) {
|
||||
cur_y++;
|
||||
cur_x = x;
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "lkc.h"
|
||||
#include "lxdialog/dialog.h"
|
||||
|
||||
static char menu_backtitle[128];
|
||||
static const char mconf_readme[] = N_(
|
||||
"Overview\n"
|
||||
"--------\n"
|
||||
@ -269,7 +268,6 @@ search_help[] = N_(
|
||||
" USB$ => find all CONFIG_ symbols ending with USB\n"
|
||||
"\n");
|
||||
|
||||
static char filename[PATH_MAX+1] = ".config";
|
||||
static int indent;
|
||||
static struct termios ios_org;
|
||||
static int rows = 0, cols = 0;
|
||||
@ -393,6 +391,28 @@ static struct gstr get_relations_str(struct symbol **sym_arr)
|
||||
return res;
|
||||
}
|
||||
|
||||
static char filename[PATH_MAX+1];
|
||||
static void set_config_filename(const char *config_filename)
|
||||
{
|
||||
static char menu_backtitle[PATH_MAX+128];
|
||||
int size;
|
||||
struct symbol *sym;
|
||||
|
||||
sym = sym_lookup("VERSION", 0);
|
||||
sym_calc_value(sym);
|
||||
size = snprintf(menu_backtitle, sizeof(menu_backtitle),
|
||||
_("%s - buildroot v%s Configuration"),
|
||||
config_filename, sym_get_string_value(sym));
|
||||
if (size >= sizeof(menu_backtitle))
|
||||
menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
|
||||
set_dialog_backtitle(menu_backtitle);
|
||||
|
||||
size = snprintf(filename, sizeof(filename), "%s", config_filename);
|
||||
if (size >= sizeof(filename))
|
||||
filename[sizeof(filename)-1] = '\0';
|
||||
}
|
||||
|
||||
|
||||
static void search_conf(void)
|
||||
{
|
||||
struct symbol **sym_arr;
|
||||
@ -814,8 +834,10 @@ static void conf_load(void)
|
||||
case 0:
|
||||
if (!dialog_input_result[0])
|
||||
return;
|
||||
if (!conf_read(dialog_input_result))
|
||||
if (!conf_read(dialog_input_result)) {
|
||||
set_config_filename(dialog_input_result);
|
||||
return;
|
||||
}
|
||||
show_textbox(NULL, _("File does not exist!"), 5, 38);
|
||||
break;
|
||||
case 1:
|
||||
@ -838,8 +860,10 @@ static void conf_save(void)
|
||||
case 0:
|
||||
if (!dialog_input_result[0])
|
||||
return;
|
||||
if (!conf_write(dialog_input_result))
|
||||
if (!conf_write(dialog_input_result)) {
|
||||
set_config_filename(dialog_input_result);
|
||||
return;
|
||||
}
|
||||
show_textbox(NULL, _("Can't create file! Probably a nonexistent directory."), 5, 60);
|
||||
break;
|
||||
case 1:
|
||||
@ -858,7 +882,6 @@ static void conf_cleanup(void)
|
||||
|
||||
int main(int ac, char **av)
|
||||
{
|
||||
struct symbol *sym;
|
||||
char *mode;
|
||||
int res;
|
||||
|
||||
@ -869,11 +892,6 @@ int main(int ac, char **av)
|
||||
conf_parse(av[1]);
|
||||
conf_read(NULL);
|
||||
|
||||
sym = sym_lookup("VERSION", 0);
|
||||
sym_calc_value(sym);
|
||||
sprintf(menu_backtitle, _("Buildroot v%s Configuration"),
|
||||
sym_get_string_value(sym));
|
||||
|
||||
mode = getenv("MENUCONFIG_MODE");
|
||||
if (mode) {
|
||||
if (!strcasecmp(mode, "single_menu"))
|
||||
@ -884,7 +902,8 @@ int main(int ac, char **av)
|
||||
atexit(conf_cleanup);
|
||||
init_wsize();
|
||||
reset_dialog();
|
||||
init_dialog(menu_backtitle);
|
||||
init_dialog(NULL);
|
||||
set_config_filename(conf_get_configname());
|
||||
do {
|
||||
conf(&rootmenu);
|
||||
dialog_clear();
|
||||
@ -901,7 +920,7 @@ int main(int ac, char **av)
|
||||
|
||||
switch (res) {
|
||||
case 0:
|
||||
if (conf_write(NULL)) {
|
||||
if (conf_write(filename)) {
|
||||
fprintf(stderr, _("\n\n"
|
||||
"Error during writing of the Buildroot configuration.\n"
|
||||
"Your Buildroot configuration changes were NOT saved."
|
||||
|
@ -203,7 +203,7 @@ void sym_check_prop(struct symbol *sym)
|
||||
else if (sym2->type == S_UNKNOWN)
|
||||
prop_warn(prop,
|
||||
"'select' used by config symbol '%s' "
|
||||
"refer to undefined symbol '%s'",
|
||||
"refers to undefined symbol '%s'",
|
||||
sym->name, sym2->name);
|
||||
else if (sym2->type != S_BOOLEAN && sym2->type != S_TRISTATE)
|
||||
prop_warn(prop,
|
||||
|
@ -1182,7 +1182,7 @@ void ConfigInfoView::contentsContextMenuEvent(QContextMenuEvent *e)
|
||||
Parent::contentsContextMenuEvent(e);
|
||||
}
|
||||
|
||||
ConfigSearchWindow::ConfigSearchWindow(QWidget* parent, const char *name)
|
||||
ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name)
|
||||
: Parent(parent, name), result(NULL)
|
||||
{
|
||||
setCaption("Search Config");
|
||||
@ -1206,6 +1206,9 @@ ConfigSearchWindow::ConfigSearchWindow(QWidget* parent, const char *name)
|
||||
info = new ConfigInfoView(split, name);
|
||||
connect(list->list, SIGNAL(menuChanged(struct menu *)),
|
||||
info, SLOT(setInfo(struct menu *)));
|
||||
connect(list->list, SIGNAL(menuChanged(struct menu *)),
|
||||
parent, SLOT(setMenuLink(struct menu *)));
|
||||
|
||||
layout1->addWidget(split);
|
||||
|
||||
if (name) {
|
||||
|
@ -279,7 +279,7 @@ class ConfigSearchWindow : public QDialog {
|
||||
Q_OBJECT
|
||||
typedef class QDialog Parent;
|
||||
public:
|
||||
ConfigSearchWindow(QWidget* parent, const char *name = 0);
|
||||
ConfigSearchWindow(ConfigMainWindow* parent, const char *name = 0);
|
||||
|
||||
public slots:
|
||||
void saveSettings(void);
|
||||
|
@ -786,13 +786,15 @@ static struct symbol *sym_check_expr_deps(struct expr *e)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* return NULL when dependencies are OK */
|
||||
struct symbol *sym_check_deps(struct symbol *sym)
|
||||
{
|
||||
struct symbol *sym2;
|
||||
struct property *prop;
|
||||
|
||||
if (sym->flags & SYMBOL_CHECK) {
|
||||
printf("Warning! Found recursive dependency: %s", sym->name);
|
||||
fprintf(stderr, "%s:%d:error: found recursive dependency: %s",
|
||||
sym->prop->file->name, sym->prop->lineno, sym->name);
|
||||
return sym;
|
||||
}
|
||||
if (sym->flags & SYMBOL_CHECKED)
|
||||
@ -816,13 +818,8 @@ struct symbol *sym_check_deps(struct symbol *sym)
|
||||
goto out;
|
||||
}
|
||||
out:
|
||||
if (sym2) {
|
||||
printf(" %s", sym->name);
|
||||
if (sym2 == sym) {
|
||||
printf("\n");
|
||||
sym2 = NULL;
|
||||
}
|
||||
}
|
||||
if (sym2)
|
||||
fprintf(stderr, " -> %s%s", sym->name, sym2 == sym? "\n": "");
|
||||
sym->flags &= ~SYMBOL_CHECK;
|
||||
return sym2;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ int file_write_dep(const char *name)
|
||||
else
|
||||
fprintf(out, "\t%s\n", file->name);
|
||||
}
|
||||
fprintf(out, "\ninclude/config/auto.conf: \\\n"
|
||||
fprintf(out, "\n$(BR2_DEPENDS_DIR)/config/auto.conf: \\\n"
|
||||
"\t$(deps_config)\n\n"
|
||||
"$(deps_config): ;\n");
|
||||
fclose(out);
|
||||
|
@ -265,7 +265,7 @@ FILE *zconf_fopen(const char *name)
|
||||
FILE *f;
|
||||
|
||||
f = fopen(name, "r");
|
||||
if (!f && name[0] != '/') {
|
||||
if (!f && name != NULL && name[0] != '/') {
|
||||
env = getenv(SRCTREE);
|
||||
if (env) {
|
||||
sprintf(fullname, "%s/%s", env, name);
|
||||
|
@ -2132,9 +2132,11 @@ void conf_parse(const char *name)
|
||||
}
|
||||
menu_finalize(&rootmenu);
|
||||
for_all_symbols(i, sym) {
|
||||
sym_check_deps(sym);
|
||||
if (sym_check_deps(sym))
|
||||
zconfnerrs++;
|
||||
}
|
||||
|
||||
if (zconfnerrs)
|
||||
exit(1);
|
||||
sym_set_change_count(1);
|
||||
}
|
||||
|
||||
|
@ -501,9 +501,11 @@ void conf_parse(const char *name)
|
||||
}
|
||||
menu_finalize(&rootmenu);
|
||||
for_all_symbols(i, sym) {
|
||||
sym_check_deps(sym);
|
||||
if (sym_check_deps(sym))
|
||||
zconfnerrs++;
|
||||
}
|
||||
|
||||
if (zconfnerrs)
|
||||
exit(1);
|
||||
sym_set_change_count(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user