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:
Jörg Mayer 2005-08-16 06:45:17 +00:00
parent bc35e184c7
commit 0f9ffd6923
5 changed files with 23 additions and 26 deletions

View File

@ -40,10 +40,9 @@
#include "text_page.h"
#endif
#include "svnversion.h"
#include "../image/eicon3d64.xpm"
#include "gtkglobals.h"
#include "version_info.h"
extern GString *comp_info_str, *runtime_info_str;
@ -156,10 +155,7 @@ about_ethereal_page_new(void)
/* Construct the message string */
message = g_strdup_printf(
"Version " VERSION
#ifdef SVNVERSION
" (" SVNVERSION ")"
#endif
"Version " VERSION "%s"
" (C) 1998-2005 Gerald Combs <gerald@ethereal.com>\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"
"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);
g_free(message);

View File

@ -67,7 +67,6 @@
#include <epan/addr_resolv.h>
/* general (not GTK specific) */
#include "svnversion.h"
#include "file.h"
#include "summary.h"
#include "filters.h"
@ -1082,13 +1081,10 @@ print_usage(gboolean print_ver) {
if (print_ver) {
output = stdout;
fprintf(output, "This is "PACKAGE " " VERSION
#ifdef SVNVERSION
" (" SVNVERSION ")"
#endif
fprintf(output, "This is "PACKAGE " " VERSION "%s"
"\n (C) 1998-2005 Gerald Combs <gerald@ethereal.com>"
"\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 {
output = stderr;
}

View File

@ -59,8 +59,6 @@
#include "getopt.h"
#endif
#include "svnversion.h"
#include <glib.h>
#include <epan/epan.h>
#include <epan/filesystem.h>
@ -220,14 +218,11 @@ print_usage(gboolean print_ver)
if (print_ver) {
output = stdout;
fprintf(output, "This is GNU t" PACKAGE " " VERSION
#ifdef SVNVERSION
" (" SVNVERSION ")"
#endif
fprintf(output, "This is GNU t" PACKAGE " " VERSION "%s"
"\n (C) 1998-2005 Gerald Combs <gerald@ethereal.com>"
"\n%s\n%s\n",
comp_info_str->str, runtime_info_str->str);
svnversion, comp_info_str->str, runtime_info_str->str);
} else {
output = stderr;
}
@ -1000,12 +995,8 @@ main(int argc, char *argv[])
}
break;
case 'v': /* Show version and exit */
printf("t" PACKAGE " " VERSION
#ifdef SVNVERSION
" (" SVNVERSION ")"
#endif
"\n%s\n%s\n",
comp_info_str->str, runtime_info_str->str);
printf("t" PACKAGE " " VERSION "%s\n%s\n%s\n",
svnversion, comp_info_str->str, runtime_info_str->str);
exit(0);
break;
case 'w': /* Write to capture file xxx */

View File

@ -73,6 +73,15 @@
#include "version_info.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,
* replace the blank at the specified point with a newline.

View File

@ -30,6 +30,11 @@
extern "C" {
#endif /* __cplusplus */
/*
* The svn version string or ""
*/
const gchar *svnversion;
/*
* Get various library compile-time versions and append them to
* the specified GString.