Nice rendering of the CVS version as "(cvs 200401181200003000)".

The make-version.pl script only defines CVSVERSION if this was a build
from CVS.

svn path=/trunk/; revision=9701
This commit is contained in:
Olivier Biot 2004-01-18 01:41:14 +00:00
parent be6e7afc4e
commit 8db6fb47cd
4 changed files with 40 additions and 16 deletions

View File

@ -1,6 +1,6 @@
/* main.c
*
* $Id: main.c,v 1.355 2004/01/18 00:40:39 ulfl Exp $
* $Id: main.c,v 1.356 2004/01/18 01:41:14 obiot Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -208,8 +208,12 @@ about_ethereal( GtkWidget *w _U_, gpointer data _U_ ) {
snprintf(message, MAX_ABOUT_MSG_LEN,
"Ethereal - Network Protocol Analyzer\n\n"
"Version " VERSION CVSVERSION " (C) 1998-2003 Gerald Combs <gerald@ethereal.com>\n\n"
"Version " VERSION
#ifdef CVSVERSION
" (cvs " CVSVERSION ")"
#endif
" (C) 1998-2003 Gerald Combs <gerald@ethereal.com>\n\n"
"%s\n"
"%s\n\n"
@ -1200,8 +1204,12 @@ static void
print_usage(gboolean print_ver) {
if (print_ver) {
fprintf(stderr, "This is GNU " PACKAGE " " VERSION CVSVERSION "\n%s\n%s\n",
comp_info_str->str, runtime_info_str->str);
fprintf(stderr, "This is GNU " PACKAGE " " VERSION
#ifdef CVSVERSION
" (cvs " CVSVERSION ")"
#endif
"\n%s\n%s\n",
comp_info_str->str, runtime_info_str->str);
}
#ifdef HAVE_LIBPCAP
fprintf(stderr, "\n%s [ -vh ] [ -klLnpQS ] [ -a <capture autostop condition> ] ...\n",
@ -1231,8 +1239,12 @@ show_version(void)
create_console();
#endif
printf("%s %s%s\n%s\n%s\n", PACKAGE, VERSION, CVSVERSION, comp_info_str->str,
runtime_info_str->str);
printf(PACKAGE " " VERSION
#ifdef CVSVERSION
" (cvs " CVSVERSION ")"
#endif
"\n%s\n%s\n",
comp_info_str->str, runtime_info_str->str);
}
static int

View File

@ -2,7 +2,7 @@
#
# Copyright 2004 Jörg Mayer (see AUTHORS file)
#
# $Id: make-version.pl,v 1.2 2004/01/17 13:09:00 jmayer Exp $
# $Id: make-version.pl,v 1.3 2004/01/18 01:41:13 obiot Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@ethereal.com>
@ -74,9 +74,9 @@ if ($last eq "" && -f "cvsversion") {
$last = `cat cvsversion`;
}
if ( $last ne "" ) {
$last = "#define CVSVERSION \"cvs$last\"\n";
$last = "#define CVSVERSION \"$last\"\n";
} else {
$last = "#define CVSVERSION \"\"\n";
$last = "/* #define CVSVERSION \"\" */\n";
}
my $needsupdate=0;

View File

@ -1,6 +1,6 @@
/* Combine two dump files, either by appending or by merging by timestamp
*
* $Id: mergecap.c,v 1.12 2004/01/16 20:03:10 jmayer Exp $
* $Id: mergecap.c,v 1.13 2004/01/18 01:41:14 obiot Exp $
*
* Written by Scott Renfro <scott@renfro.org> based on
* editcap by Richard Sharpe and Guy Harris
@ -445,7 +445,11 @@ main(int argc, char *argv[])
break;
case 'h':
fprintf(stderr, "mergecap version %s%s\n", VERSION, CVSVERSION);
fprintf(stderr, "mergecap version %s"
#ifdef CVSVERSION
" (cvs " CVSVERSION ")"
#endif
"\n", VERSION);
usage();
exit(1);
break;

View File

@ -1,6 +1,6 @@
/* tethereal.c
*
* $Id: tethereal.c,v 1.218 2004/01/16 20:03:10 jmayer Exp $
* $Id: tethereal.c,v 1.219 2004/01/18 01:41:13 obiot Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -236,7 +236,11 @@ print_usage(gboolean print_ver)
int i;
if (print_ver) {
fprintf(stderr, "This is GNU t%s %s%s\n%s\n%s\n", PACKAGE, VERSION, CVSVERSION,
fprintf(stderr, "This is GNU t" PACKAGE " " VERSION
#ifdef CVSVERSION
" (cvs " CVSVERSION ")"
#endif
"\n%s\n%s\n",
comp_info_str->str, runtime_info_str->str);
}
#ifdef HAVE_LIBPCAP
@ -1197,8 +1201,12 @@ main(int argc, char *argv[])
}
break;
case 'v': /* Show version and exit */
printf("t%s %s%s\n%s\n%s\n", PACKAGE, VERSION, CVSVERSION, comp_info_str->str,
runtime_info_str->str);
printf("t" PACKAGE " " VERSION
#ifdef CVSVERSION
" (cvs " CVSVERSION ")"
#endif
"\n%s\n%s\n",
comp_info_str->str, runtime_info_str->str);
exit(0);
break;
case 'w': /* Write to capture file xxx */