Move SVNVERSION handling into version_info. That way, we won't have
to recompile tethereal.o etc each time the svn version has changed, relinking is sufficient. I'm not sure what to do about mergecap, as it currently doesn't link against version_info, so it's "overhead" either way. svn path=/trunk/; revision=15371
This commit is contained in:
parent
bc35e184c7
commit
0f9ffd6923
|
@ -40,10 +40,9 @@
|
||||||
#include "text_page.h"
|
#include "text_page.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "svnversion.h"
|
|
||||||
|
|
||||||
#include "../image/eicon3d64.xpm"
|
#include "../image/eicon3d64.xpm"
|
||||||
#include "gtkglobals.h"
|
#include "gtkglobals.h"
|
||||||
|
#include "version_info.h"
|
||||||
|
|
||||||
extern GString *comp_info_str, *runtime_info_str;
|
extern GString *comp_info_str, *runtime_info_str;
|
||||||
|
|
||||||
|
@ -156,10 +155,7 @@ about_ethereal_page_new(void)
|
||||||
|
|
||||||
/* Construct the message string */
|
/* Construct the message string */
|
||||||
message = g_strdup_printf(
|
message = g_strdup_printf(
|
||||||
"Version " VERSION
|
"Version " VERSION "%s"
|
||||||
#ifdef SVNVERSION
|
|
||||||
" (" SVNVERSION ")"
|
|
||||||
#endif
|
|
||||||
" (C) 1998-2005 Gerald Combs <gerald@ethereal.com>\n\n"
|
" (C) 1998-2005 Gerald Combs <gerald@ethereal.com>\n\n"
|
||||||
"%s\n\n"
|
"%s\n\n"
|
||||||
"%s\n\n"
|
"%s\n\n"
|
||||||
|
@ -167,7 +163,7 @@ about_ethereal_page_new(void)
|
||||||
"Ethereal is Open Source Software released under the GNU General Public License.\n\n"
|
"Ethereal is Open Source Software released under the GNU General Public License.\n\n"
|
||||||
|
|
||||||
"Check the man page and http://www.ethereal.com for more information.",
|
"Check the man page and http://www.ethereal.com for more information.",
|
||||||
comp_info_str->str, runtime_info_str->str);
|
svnversion, comp_info_str->str, runtime_info_str->str);
|
||||||
|
|
||||||
msg_label = gtk_label_new(message);
|
msg_label = gtk_label_new(message);
|
||||||
g_free(message);
|
g_free(message);
|
||||||
|
|
|
@ -67,7 +67,6 @@
|
||||||
#include <epan/addr_resolv.h>
|
#include <epan/addr_resolv.h>
|
||||||
|
|
||||||
/* general (not GTK specific) */
|
/* general (not GTK specific) */
|
||||||
#include "svnversion.h"
|
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "summary.h"
|
#include "summary.h"
|
||||||
#include "filters.h"
|
#include "filters.h"
|
||||||
|
@ -1082,13 +1081,10 @@ print_usage(gboolean print_ver) {
|
||||||
|
|
||||||
if (print_ver) {
|
if (print_ver) {
|
||||||
output = stdout;
|
output = stdout;
|
||||||
fprintf(output, "This is "PACKAGE " " VERSION
|
fprintf(output, "This is "PACKAGE " " VERSION "%s"
|
||||||
#ifdef SVNVERSION
|
|
||||||
" (" SVNVERSION ")"
|
|
||||||
#endif
|
|
||||||
"\n (C) 1998-2005 Gerald Combs <gerald@ethereal.com>"
|
"\n (C) 1998-2005 Gerald Combs <gerald@ethereal.com>"
|
||||||
"\n\n%s\n\n%s\n",
|
"\n\n%s\n\n%s\n",
|
||||||
comp_info_str->str, runtime_info_str->str);
|
svnversion, comp_info_str->str, runtime_info_str->str);
|
||||||
} else {
|
} else {
|
||||||
output = stderr;
|
output = stderr;
|
||||||
}
|
}
|
||||||
|
|
17
tethereal.c
17
tethereal.c
|
@ -59,8 +59,6 @@
|
||||||
#include "getopt.h"
|
#include "getopt.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "svnversion.h"
|
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <epan/epan.h>
|
#include <epan/epan.h>
|
||||||
#include <epan/filesystem.h>
|
#include <epan/filesystem.h>
|
||||||
|
@ -220,14 +218,11 @@ print_usage(gboolean print_ver)
|
||||||
|
|
||||||
if (print_ver) {
|
if (print_ver) {
|
||||||
output = stdout;
|
output = stdout;
|
||||||
fprintf(output, "This is GNU t" PACKAGE " " VERSION
|
fprintf(output, "This is GNU t" PACKAGE " " VERSION "%s"
|
||||||
#ifdef SVNVERSION
|
|
||||||
" (" SVNVERSION ")"
|
|
||||||
#endif
|
|
||||||
"\n (C) 1998-2005 Gerald Combs <gerald@ethereal.com>"
|
"\n (C) 1998-2005 Gerald Combs <gerald@ethereal.com>"
|
||||||
"\n%s\n%s\n",
|
"\n%s\n%s\n",
|
||||||
|
|
||||||
comp_info_str->str, runtime_info_str->str);
|
svnversion, comp_info_str->str, runtime_info_str->str);
|
||||||
} else {
|
} else {
|
||||||
output = stderr;
|
output = stderr;
|
||||||
}
|
}
|
||||||
|
@ -1000,12 +995,8 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'v': /* Show version and exit */
|
case 'v': /* Show version and exit */
|
||||||
printf("t" PACKAGE " " VERSION
|
printf("t" PACKAGE " " VERSION "%s\n%s\n%s\n",
|
||||||
#ifdef SVNVERSION
|
svnversion, comp_info_str->str, runtime_info_str->str);
|
||||||
" (" SVNVERSION ")"
|
|
||||||
#endif
|
|
||||||
"\n%s\n%s\n",
|
|
||||||
comp_info_str->str, runtime_info_str->str);
|
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
case 'w': /* Write to capture file xxx */
|
case 'w': /* Write to capture file xxx */
|
||||||
|
|
|
@ -73,6 +73,15 @@
|
||||||
#include "version_info.h"
|
#include "version_info.h"
|
||||||
#include "pcap-util.h"
|
#include "pcap-util.h"
|
||||||
|
|
||||||
|
#include "svnversion.h"
|
||||||
|
|
||||||
|
#ifdef SVNVERSION
|
||||||
|
const char *svnversion = " (" SVNVERSION ")";
|
||||||
|
#else
|
||||||
|
const char *svnversion = "";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See whether the last line in the string goes past column 80; if so,
|
* See whether the last line in the string goes past column 80; if so,
|
||||||
* replace the blank at the specified point with a newline.
|
* replace the blank at the specified point with a newline.
|
||||||
|
|
|
@ -30,6 +30,11 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The svn version string or ""
|
||||||
|
*/
|
||||||
|
const gchar *svnversion;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get various library compile-time versions and append them to
|
* Get various library compile-time versions and append them to
|
||||||
* the specified GString.
|
* the specified GString.
|
||||||
|
|
Loading…
Reference in New Issue