Commit 72daa122 authored by Peter Korsgaard's avatar Peter Korsgaard
Browse files

package/config: rebase against 2.6.37-rc1

parent 359a9226
Loading
Loading
Loading
Loading
+47 −40
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-c
ifdef KBUILD_KCONFIG
Kconfig := $(KBUILD_KCONFIG)
else
Kconfig := arch/$(SRCARCH)/Kconfig
Kconfig := Kconfig
endif

xconfig: $(obj)/qconf
@@ -145,11 +145,8 @@ check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh

# Use recursively expanded variables so we do not call gcc unless
# we really need to do so. (Do not call gcc as part of make mrproper)
HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
HOST_LOADLIBES   = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))

HOST_EXTRACFLAGS += -DLOCALE

HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
                    -DLOCALE

# ===========================================================================
# Shared Makefile for the various kconfig executables:
@@ -226,7 +223,7 @@ clean-files += $(kxgettext-objs)
PHONY += $(obj)/dochecklxdialog
$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
$(obj)/dochecklxdialog:
	$(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES)
	$(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)

always := dochecklxdialog

@@ -244,6 +241,8 @@ HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -ldl
HOSTCFLAGS_gconf.o	= `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
                          -D LKC_DIRECT_LINK

HOSTLOADLIBES_mconf   = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))

HOSTLOADLIBES_nconf	= -lmenu -lpanel -lncurses
$(obj)/qconf.o: $(obj)/.tmp_qtcheck

@@ -254,6 +253,8 @@ $(obj)/.tmp_qtcheck: $(src)/Makefile
# QT needs some extra effort...
$(obj)/.tmp_qtcheck:
	@set -e; echo "  CHECK   qt"; dir=""; pkg=""; \
	if ! pkg-config --exists QtCore 2> /dev/null; then \
	    echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \
	    pkg-config --exists qt 2> /dev/null && pkg=qt; \
	    pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
	    if [ -n "$$pkg" ]; then \
@@ -267,10 +268,10 @@ $(obj)/.tmp_qtcheck:
	      done; \
	      if [ -z "$$dir" ]; then \
	        echo "*"; \
	    echo "* Unable to find the QT3 installation. Please make sure that"; \
	    echo "* the QT3 development package is correctly installed and"; \
	    echo "* either install pkg-config or set the QTDIR environment"; \
	    echo "* variable to the correct location."; \
	        echo "* Unable to find any QT installation. Please make sure that"; \
	        echo "* the QT4 or QT3 development package is correctly installed and"; \
	        echo "* either qmake can be found or install pkg-config or set"; \
	        echo "* the QTDIR environment variable to the correct location."; \
	        echo "*"; \
	        false; \
	      fi; \
@@ -289,6 +290,12 @@ $(obj)/.tmp_qtcheck:
	      echo "*"; \
	      moc="/usr/bin/moc"; \
	    fi; \
	else \
	  cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \
	  libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \
	  binpath="\$$(shell pkg-config QtCore --variable=prefix)"; \
	  moc="$$binpath/bin/moc"; \
	fi; \
	echo "KC_QT_CFLAGS=$$cflags" > $@; \
	echo "KC_QT_LIBS=$$libs" >> $@; \
	echo "KC_QT_MOC=$$moc" >> $@
+7 −8
Original line number Diff line number Diff line
@@ -425,7 +425,7 @@ static void check_conf(struct menu *menu)
		    (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
			if (input_mode == listnewconfig) {
				if (sym->name && !sym_is_choice_value(sym)) {
					printf("CONFIG_%s\n", sym->name);
					printf("%s%s\n", CONFIG_, sym->name);
				}
			} else if (input_mode != oldnoconfig) {
				if (!conf_cnt++)
@@ -466,7 +466,7 @@ int main(int ac, char **av)
	bindtextdomain(PACKAGE, LOCALEDIR);
	textdomain(PACKAGE);

	while ((opt = getopt_long_only(ac, av, "", long_opts, NULL)) != -1) {
	while ((opt = getopt_long(ac, av, "", long_opts, NULL)) != -1) {
		input_mode = (enum input_mode)opt;
		switch (opt) {
		case silentoldconfig:
@@ -507,8 +507,7 @@ int main(int ac, char **av)
		name = conf_get_configname();
		if (stat(name, &tmpstat)) {
			fprintf(stderr, _("***\n"
				"*** You have not yet configured your Buildroot!\n"
				"*** (missing .config file \"%s\")\n"
				"*** Configuration file \"%s\" not found!\n"
				"***\n"
				"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
				"*** \"make menuconfig\" or \"make xconfig\").\n"
@@ -570,7 +569,7 @@ int main(int ac, char **av)
			name = getenv("KCONFIG_NOSILENTUPDATE");
			if (name && *name) {
				fprintf(stderr,
					_("\n*** Buildroot configuration requires explicit update.\n\n"));
					_("\n*** The configuration requires explicit update.\n\n"));
				return 1;
			}
		}
@@ -622,11 +621,11 @@ 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 Buildroot configuration.\n\n"));
			fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
			exit(1);
		}
		if (conf_write_autoconf()) {
			fprintf(stderr, _("\n*** Error during update of the Buildroot configuration.\n\n"));
			fprintf(stderr, _("\n*** Error during update of the configuration.\n\n"));
			return 1;
		}
	} else if (input_mode == savedefconfig) {
@@ -637,7 +636,7 @@ int main(int ac, char **av)
		}
	} else if (input_mode != listnewconfig) {
		if (conf_write(NULL)) {
			fprintf(stderr, _("\n*** Error during writing of the Buildroot configuration.\n\n"));
			fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
			exit(1);
		}
	}
+59 −37
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@

#include <sys/stat.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
@@ -19,6 +20,9 @@
static void conf_warning(const char *fmt, ...)
	__attribute__ ((format (printf, 1, 2)));

static void conf_message(const char *fmt, ...)
	__attribute__ ((format (printf, 1, 2)));

static const char *conf_filename;
static int conf_lineno, conf_warnings, conf_unsaved;

@@ -35,6 +39,29 @@ static void conf_warning(const char *fmt, ...)
	conf_warnings++;
}

static void conf_default_message_callback(const char *fmt, va_list ap)
{
	printf("#\n# ");
	vprintf(fmt, ap);
	printf("\n#\n");
}

static void (*conf_message_callback) (const char *fmt, va_list ap) =
	conf_default_message_callback;
void conf_set_message_callback(void (*fn) (const char *fmt, va_list ap))
{
	conf_message_callback = fn;
}

static void conf_message(const char *fmt, ...)
{
	va_list ap;

	va_start(ap, fmt);
	if (conf_message_callback)
		conf_message_callback(fmt, ap);
}

const char *conf_get_configname(void)
{
	char *name = getenv("BUILDROOT_CONFIG");
@@ -182,9 +209,8 @@ int conf_read_simple(const char *name, int def)
			name = conf_expand_value(prop->expr->left.sym->name);
			in = zconf_fopen(name);
			if (in) {
				printf(_("#\n"
					 "# using defaults found in %s\n"
					 "#\n"), name);
				conf_message(_("using defaults found in %s"),
					 name);
				goto load;
			}
		}
@@ -219,9 +245,8 @@ load:
	while (fgets(line, sizeof(line), in)) {
		conf_lineno++;
		sym = NULL;
		switch (line[0]) {
		case '#':
			if (line[1]!=' ')
		if (line[0] == '#') {
			if (memcmp(line + 2, CONFIG_, strlen(CONFIG_)))
				continue;
			p = strchr(line + 2, ' ');
			if (!p)
@@ -233,7 +258,7 @@ load:
				sym = sym_find(line + 2);
				if (!sym) {
					sym_add_change_count(1);
					break;
					goto setsym;
				}
			} else {
				sym = sym_lookup(line + 2, 0);
@@ -252,8 +277,7 @@ load:
			default:
				;
			}
			break;
		case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z':
		} else if (isupper(line[0])) {
			p = strchr(line, '=');
			if (!p)
				continue;
@@ -268,7 +292,7 @@ load:
				sym = sym_find(line);
				if (!sym) {
					sym_add_change_count(1);
					break;
					goto setsym;
				}
			} else {
				sym = sym_lookup(line, 0);
@@ -280,14 +304,12 @@ load:
			}
			if (conf_set_sym_val(sym, def, def_flags, p))
				continue;
			break;
		case '\r':
		case '\n':
			break;
		default:
		} else {
			if (line[0] != '\r' && line[0] != '\n')
				conf_warning("unexpected data");
			continue;
		}
setsym:
		if (sym && sym_is_choice_value(sym)) {
			struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
			switch (sym->def[def].tri) {
@@ -428,7 +450,8 @@ static void conf_write_symbol(struct symbol *sym, enum symbol_type type,
		switch (sym_get_tristate_value(sym)) {
		case no:
			if (write_no)
				fprintf(out, "# %s is not set\n", sym->name);
				fprintf(out, "# %s is not set\n",
				    sym->name);
			break;
		case mod:
			fprintf(out, "%s=m\n", sym->name);
@@ -579,8 +602,6 @@ int conf_write(const char *name)
	if (!out)
		return 1;

	sym = sym_lookup("BR2_VERSION", 0);
	sym_calc_value(sym);
	time(&now);
	env = getenv("KCONFIG_NOTIMESTAMP");
	if (env && *env)
@@ -588,10 +609,10 @@ int conf_write(const char *name)

	fprintf(out, _("#\n"
		       "# Automatically generated make config: don't edit\n"
		       "# Buildroot version: %s\n"
		       "# %s\n"
		       "%s%s"
		       "#\n"),
		     sym_get_string_value(sym),
		     rootmenu.prompt->text,
		     use_timestamp ? "# " : "",
		     use_timestamp ? ctime(&now) : "");

@@ -648,9 +669,7 @@ next:
			return 1;
	}

	printf(_("#\n"
		 "# configuration written to %s\n"
		 "#\n"), newname);
	conf_message(_("configuration written to %s"), newname);

	sym_set_change_count(0);

@@ -830,24 +849,22 @@ int conf_write_autoconf(void)
		return 1;
	}

	sym = sym_lookup("BR2_VERSION", 0);
	sym_calc_value(sym);
	time(&now);
	fprintf(out, "#\n"
		     "# Automatically generated make config: don't edit\n"
		     "# Buildroot version: %s\n"
		     "# %s\n"
		     "# %s"
		     "#\n",
		     sym_get_string_value(sym),
		     ctime(&now));
		     rootmenu.prompt->text, ctime(&now));
	fprintf(tristate, "#\n"
			  "# Automatically generated - do not edit\n"
			  "\n");
	fprintf(out_h, "/*\n"
		       " * Automatically generated C config: don't edit\n"
		       " * %s\n"
		       " * %s"
		       " */\n",
		       ctime(&now));
		       rootmenu.prompt->text, ctime(&now));

	for_all_symbols(i, sym) {
		sym_calc_value(sym);
@@ -865,14 +882,17 @@ int conf_write_autoconf(void)
			case no:
				break;
			case mod:
				fprintf(tristate, "%s=M\n", sym->name);
				fprintf(out_h, "#define %s_MODULE 1\n", sym->name);
				fprintf(tristate, "%s=M\n",
				    sym->name);
				fprintf(out_h, "#define %s_MODULE 1\n",
				    sym->name);
				break;
			case yes:
				if (sym->type == S_TRISTATE)
					fprintf(tristate,"%s=Y\n",
					    sym->name);
				fprintf(out_h, "#define %s 1\n", sym->name);
				fprintf(out_h, "#define %s 1\n",
				    sym->name);
				break;
			}
			break;
@@ -882,12 +902,14 @@ int conf_write_autoconf(void)
		case S_HEX:
			str = sym_get_string_value(sym);
			if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
				fprintf(out_h, "#define %s 0x%s\n", sym->name, str);
				fprintf(out_h, "#define %s 0x%s\n",
				    sym->name, str);
				break;
			}
		case S_INT:
			str = sym_get_string_value(sym);
			fprintf(out_h, "#define %s %s\n", sym->name, str);
			fprintf(out_h, "#define %s %s\n",
			    sym->name, str);
			break;
		default:
			break;
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ extern "C" {
struct file {
	struct file *next;
	struct file *parent;
	char *name;
	const char *name;
	int lineno;
	int flags;
};
+8 −12
Original line number Diff line number Diff line
@@ -133,7 +133,6 @@ void init_main_window(const gchar * glade_file)
	GladeXML *xml;
	GtkWidget *widget;
	GtkTextBuffer *txtbuf;
	char title[256];
	GtkStyle *style;

	xml = glade_xml_new(glade_file, "window1", NULL);
@@ -210,9 +209,7 @@ void init_main_window(const gchar * glade_file)
					  /*"style", PANGO_STYLE_OBLIQUE, */
					  NULL);

	sprintf(title, _("Buildroot v%s Configuration"),
		getenv("BR2_VERSION"));
	gtk_window_set_title(GTK_WINDOW(main_wnd), title);
	gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text);

	gtk_widget_show(main_wnd);
}
@@ -671,8 +668,7 @@ void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
	GtkWidget *dialog;
	const gchar *intro_text = _(
	    "Welcome to gkc, the GTK+ graphical kernel configuration tool\n"
	    "for Linux.\n"
	    "Welcome to gkc, the GTK+ graphical configuration tool\n"
	    "For each option, a blank box indicates the feature is disabled, a\n"
	    "check indicates it is enabled, and a dot indicates that it is to\n"
	    "be compiled as a module.  Clicking on the box will cycle through the three states.\n"
@@ -1531,12 +1527,6 @@ int main(int ac, char *av[])
	else
		glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".glade", NULL);

	/* Load the interface and connect signals */
	init_main_window(glade_file);
	init_tree_model();
	init_left_tree();
	init_right_tree();

	/* Conf stuffs */
	if (ac > 1 && av[1][0] == '-') {
		switch (av[1][1]) {
@@ -1556,6 +1546,12 @@ int main(int ac, char *av[])
	fixup_rootmenu(&rootmenu);
	conf_read(NULL);

	/* Load the interface and connect signals */
	init_main_window(glade_file);
	init_tree_model();
	init_left_tree();
	init_right_tree();

	switch (view_mode) {
	case SINGLE_VIEW:
		display_tree_part();
Loading