Commit 3273e65e authored by Pietro Fezzardi's avatar Pietro Fezzardi Committed by Alessandro Rubini

Kconfig: fix to displayed 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 efda9cab
VERSION = $(shell git describe --always --dirty)
export VERSION
# Do not: # Do not:
# o use make's built-in rules and variables # o use make's built-in rules and variables
# (this increases performance and avoids hard-to-debug behaviour); # (this increases performance and avoids hard-to-debug behaviour);
......
...@@ -443,7 +443,7 @@ int conf_write(const char *name) ...@@ -443,7 +443,7 @@ int conf_write(const char *name)
if (!out) if (!out)
return 1; return 1;
sym = sym_lookup("KERNELVERSION", 0); sym = sym_lookup("VERSION", 0);
sym_calc_value(sym); sym_calc_value(sym);
time(&now); time(&now);
env = getenv("KCONFIG_NOTIMESTAMP"); env = getenv("KCONFIG_NOTIMESTAMP");
...@@ -700,7 +700,7 @@ int conf_write_autoconf(void) ...@@ -700,7 +700,7 @@ int conf_write_autoconf(void)
return 1; return 1;
} }
sym = sym_lookup("KERNELVERSION", 0); sym = sym_lookup("VERSION", 0);
sym_calc_value(sym); sym_calc_value(sym);
time(&now); time(&now);
fprintf(out, "#\n" fprintf(out, "#\n"
......
...@@ -267,7 +267,7 @@ void init_main_window(const gchar * glade_file) ...@@ -267,7 +267,7 @@ void init_main_window(const gchar * glade_file)
NULL); NULL);
sprintf(title, _("PPSi v%s Configuration"), sprintf(title, _("PPSi v%s Configuration"),
getenv("KERNELVERSION")); getenv("VERSION"));
gtk_window_set_title(GTK_WINDOW(main_wnd), title); gtk_window_set_title(GTK_WINDOW(main_wnd), title);
gtk_widget_show(main_wnd); gtk_widget_show(main_wnd);
......
...@@ -302,11 +302,11 @@ static void set_config_filename(const char *config_filename) ...@@ -302,11 +302,11 @@ static void set_config_filename(const char *config_filename)
int size; int size;
struct symbol *sym; struct symbol *sym;
sym = sym_lookup("KERNELVERSION", 0); sym = sym_lookup("VERSION", 0);
sym_calc_value(sym); sym_calc_value(sym);
size = snprintf(menu_backtitle, sizeof(menu_backtitle), size = snprintf(menu_backtitle, sizeof(menu_backtitle),
_("%s - PPSi v%s Configuration"), _("%s - PPSi v%s Configuration"),
config_filename, sym_get_string_value(sym)); config_filename, getenv("VERSION"));
if (size >= sizeof(menu_backtitle)) if (size >= sizeof(menu_backtitle))
menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
set_dialog_backtitle(menu_backtitle); set_dialog_backtitle(menu_backtitle);
......
...@@ -1276,7 +1276,7 @@ ConfigMainWindow::ConfigMainWindow(void) ...@@ -1276,7 +1276,7 @@ ConfigMainWindow::ConfigMainWindow(void)
QDesktopWidget *d = configApp->desktop(); QDesktopWidget *d = configApp->desktop();
snprintf(title, sizeof(title), _("PPSi v%s Configuration"), snprintf(title, sizeof(title), _("PPSi v%s Configuration"),
getenv("KERNELVERSION")); getenv("VERSION"));
setCaption(title); setCaption(title);
width = configSettings->readNumEntry("/window width", d->width() - 64); 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