From 25e76c9c37c623a3eced22d23a60befb0067de68 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Mon, 18 Jan 2016 10:09:50 +0100 Subject: [PATCH] Include a dissuader for odd numbered minor releases --- src/language/utilities/set.q | 2 +- src/libpspp/automake.mk | 6 ++++++ src/libpspp/version.h | 3 +++ src/ui/gui/help-menu.c | 2 +- src/ui/terminal/terminal-reader.c | 2 +- 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/language/utilities/set.q b/src/language/utilities/set.q index 0be8c47010..126868dbdb 100644 --- a/src/language/utilities/set.q +++ b/src/language/utilities/set.q @@ -922,7 +922,7 @@ show_tempdir (const struct dataset *ds UNUSED) static char * show_version (const struct dataset *ds UNUSED) { - return strdup (version); + return strdup (announced_version); } static char * diff --git a/src/libpspp/automake.mk b/src/libpspp/automake.mk index ca8bac6b49..29628596b3 100644 --- a/src/libpspp/automake.mk +++ b/src/libpspp/automake.mk @@ -122,6 +122,12 @@ src/libpspp/version.c: $(top_srcdir)/AUTHORS Makefile $(AM_V_at)echo "#include \"version.h\"" >> $@,tmp $(AM_V_at)echo "const char bare_version[] = \"$(VERSION)\";" >> $@,tmp $(AM_V_at)echo "const char version[] = \"GNU $(PACKAGE) $(VERSION)\";" >> $@,tmp + $(AM_V_at)echo "const char announced_version[] = \"GNU $(PACKAGE) $(VERSION)\"" >> $@,tmp + @case `$(AM_V_at)echo $(VERSION) | $(AM_V_at)$(SED) -e 's/[0-9][0-9]*\.[0-9]*\([0-9]\)\.[0-9][0-9]*/\1/'` in \ + [13579]) $(AM_V_at)echo "\"\nThis is an unreleased test version. It is not recommended for production use. Use at your own risk\"" >> $@,tmp \ + ;;\ + esac + $(AM_V_at)echo ";" >> $@,tmp $(AM_V_at)echo "const char host_system[] = \"$(host_triplet)\";" >> $@,tmp $(AM_V_at)echo "const char build_system[] = \"$(build_triplet)\";" >> $@,tmp $(AM_V_at)echo "const char locale_dir[] = \"$(datadir)/locale\";" >> $@,tmp diff --git a/src/libpspp/version.h b/src/libpspp/version.h index a89480e549..b1826910d8 100644 --- a/src/libpspp/version.h +++ b/src/libpspp/version.h @@ -23,6 +23,9 @@ extern const char bare_version[]; /* "GNU PSPP A.B.C" */ extern const char version[]; +/* Human readable version string */ +extern const char announced_version[]; + /* Canonical name of host system type. */ extern const char host_system[]; diff --git a/src/ui/gui/help-menu.c b/src/ui/gui/help-menu.c index 279f5ef55d..61b9140d1e 100644 --- a/src/ui/gui/help-menu.c +++ b/src/ui/gui/help-menu.c @@ -46,7 +46,7 @@ about_new (GtkMenuItem *mmm, GtkWindow *parent) gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (about), PACKAGE_URL); gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (about), - version); + announced_version); gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about), (const gchar **) authors); diff --git a/src/ui/terminal/terminal-reader.c b/src/ui/terminal/terminal-reader.c index 87fca837f9..141474a95b 100644 --- a/src/ui/terminal/terminal-reader.c +++ b/src/ui/terminal/terminal-reader.c @@ -97,7 +97,7 @@ welcome (void) "it\nunder certain conditions; type \"show copying.\" to see the " "conditions.\nThere is ABSOLUTELY NO WARRANTY for PSPP; type \"show " "warranty.\" for details.\n", stdout); - puts (version); + puts (announced_version); journal_init (); } -- 2.30.2