Commit 2d4f4ca7 authored by Pietro Fezzardi's avatar Pietro Fezzardi Committed by Grzegorz Daniluk

Kconfig: display proper version number

KERNELVERSION variable from Linux was still used.
It was not initialized so the displayed version in the headers
of make gconfig and make menuconfig was missingor wrong.
It just said (null) or KERNELVERSION.
KERNELVERSION has been changed to VERSION all over the kconfig
scripts. Makefile.kconfig exports this variable so it can be
used by config scripts with getenv().
Now it prints the ppsi version with the present commit, like
diplayed from
	git describe --always --dirty
parent 48c8033c
VERSION = $(shell git describe --always --dirty)
export VERSION
# Do not:
# o use make's built-in rules and variables
# (this increases performance and avoids hard-to-debug behaviour);
......
......@@ -443,7 +443,7 @@ int conf_write(const char *name)
if (!out)
return 1;
sym = sym_lookup("KERNELVERSION", 0);
sym = sym_lookup("VERSION", 0);
sym_calc_value(sym);
time(&now);
env = getenv("KCONFIG_NOTIMESTAMP");
......@@ -700,7 +700,7 @@ int conf_write_autoconf(void)
return 1;
}
sym = sym_lookup("KERNELVERSION", 0);
sym = sym_lookup("VERSION", 0);
sym_calc_value(sym);
time(&now);
fprintf(out, "#\n"
......
......@@ -267,7 +267,7 @@ void init_main_window(const gchar * glade_file)
NULL);
sprintf(title, _("WRPC v%s Configuration"),
getenv("KERNELVERSION"));
getenv("VERSION"));
gtk_window_set_title(GTK_WINDOW(main_wnd), title);
gtk_widget_show(main_wnd);
......
......@@ -302,11 +302,11 @@ static void set_config_filename(const char *config_filename)
int size;
struct symbol *sym;
sym = sym_lookup("KERNELVERSION", 0);
sym = sym_lookup("VERSION", 0);
sym_calc_value(sym);
size = snprintf(menu_backtitle, sizeof(menu_backtitle),
_("%s - WRPC v%s Configuration"),
config_filename, sym_get_string_value(sym));
config_filename, getenv("VERSION"));
if (size >= sizeof(menu_backtitle))
menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
set_dialog_backtitle(menu_backtitle);
......
......@@ -1276,7 +1276,7 @@ ConfigMainWindow::ConfigMainWindow(void)
QDesktopWidget *d = configApp->desktop();
snprintf(title, sizeof(title), _("WRPC v%s Configuration"),
getenv("KERNELVERSION"));
getenv("VERSION"));
setCaption(title);
width = configSettings->readNumEntry("/window width", d->width() - 64);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment