diff --git a/harbour/ChangeLog b/harbour/ChangeLog index fd2bd028f0..c83fc50569 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,12 +8,37 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2001-12-17 14:57 UTC+0100 Viktor Szakats + + * include/hbver.h + * source/common/hbver.c + * source/compiler/genc.c + * source/compiler/genjava.c + * source/compiler/genobj32.c + * source/compiler/hbusage.c + * utils/hbpp/hbpp.c + - Build number removed, since it was the same as the + version number, and it doesn stands for something + which doesn't have too much meaning in an open-source + project anyway. + - Removed the date/month/day of the version number, + since it was only yet another version-number duplicate. + + Added #defines for last ChangeLog entry, ChangeLog CVS + version string, optional C, PRG and linker option. + As of now these should be manually edited whenever + doing a build, but the goal is make this step completely + automated. + One can retrieve these new version details by running + Harbour compiler with the -build switch, or any + Harbour applications by running it with //BUILD switch. + Optional switches are only displayed when not empty. + + -build and -credits undocumented options now put into + the command-line help screen. 2001-12-17 14:13 UTC+0100 Maurilio Longo * source/rtl/tbrowse.prg * ::DispCell() a little change on Logical values display - 2001-12-17 13:02 UTC+0100 Viktor Szakats * makefile.vc diff --git a/harbour/include/hbver.h b/harbour/include/hbver.h index a212a119de..32ebcf060e 100644 --- a/harbour/include/hbver.h +++ b/harbour/include/hbver.h @@ -60,10 +60,17 @@ #endif #define HB_VER_MAJOR 0 /* Major version number */ #define HB_VER_MINOR 38 /* Minor version number */ -#define HB_VER_REVISION "" /* Revision letter */ -#define HB_VER_BUILD 38 /* Build number */ -#define HB_VER_YEAR 2001 /* Build year */ -#define HB_VER_MONTH 12 /* Build month */ -#define HB_VER_DAY 15 /* Build day */ +#define HB_VER_REVISION 0 /* Revision number */ + +/* TOFIX: Ideally these should be generated dynamically, until + then, they should be updated by the builder. [vszakats] */ + +#define HB_VER_LENTRY "2001-12-17 13:02 UTC+0100 Viktor Szakats " +#define HB_VER_CHLCVS "ChangeLog,v 1.3653 2001/12/17 12:05:11 vszakats Exp" +#define HB_VER_C_USR "" +#define HB_VER_L_USR "" +#define HB_VER_PRG_USR "" + +/* #include "hb_ver_.h" */ #endif /* HB_VER_H_ */ diff --git a/harbour/source/common/hbver.c b/harbour/source/common/hbver.c index ec780a335c..d63f56f322 100644 --- a/harbour/source/common/hbver.c +++ b/harbour/source/common/hbver.c @@ -430,8 +430,8 @@ char * hb_verHarbour( void ) pszVersion = ( char * ) hb_xgrab( 80 ); - sprintf( pszVersion, "Harbour %d.%d%s Intl. (Build %d) (%04d.%02d.%02d) (%s)", - HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_BUILD, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY, HB_VER_LEX ); + sprintf( pszVersion, "Harbour %d.%d.%d Intl. (%s)", + HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_LEX ); return pszVersion; } @@ -469,6 +469,43 @@ void hb_verBuildInfo( void ) hb_conOutErr( hb_conNewLine(), 0 ); + hb_conOutErr( "Built on: ", 0 ); + hb_conOutErr( __DATE__, 0 ); + hb_conOutErr( " ", 0 ); + hb_conOutErr( __TIME__, 0 ); + hb_conOutErr( hb_conNewLine(), 0 ); + + hb_conOutErr( "Last ChangeLog entry: ", 0 ); + hb_conOutErr( HB_VER_LENTRY, 0 ); + hb_conOutErr( hb_conNewLine(), 0 ); + + hb_conOutErr( "ChangeLog CVS version: ", 0 ); + hb_conOutErr( HB_VER_CHLCVS, 0 ); + hb_conOutErr( hb_conNewLine(), 0 ); + + if( strlen( HB_VER_C_USR ) ) + { + hb_conOutErr( "Harbour compiler switches: ", 0 ); + hb_conOutErr( HB_VER_C_USR, 0 ); + hb_conOutErr( hb_conNewLine(), 0 ); + } + + if( strlen( HB_VER_L_USR ) ) + { + hb_conOutErr( "C compiler switches: ", 0 ); + hb_conOutErr( HB_VER_L_USR, 0 ); + hb_conOutErr( hb_conNewLine(), 0 ); + } + + if( strlen( HB_VER_PRG_USR ) ) + { + hb_conOutErr( "Linker switches: ", 0 ); + hb_conOutErr( HB_VER_PRG_USR, 0 ); + hb_conOutErr( hb_conNewLine(), 0 ); + } + + hb_conOutErr( hb_conNewLine(), 0 ); + hb_conOutErr( "Harbour extensions: ", 0 ); #if defined( HB_EXTENSION ) hb_conOutErr( "Yes", 0 ); diff --git a/harbour/source/compiler/genc.c b/harbour/source/compiler/genc.c index 99acb6b2b1..764316a2eb 100644 --- a/harbour/source/compiler/genc.c +++ b/harbour/source/compiler/genc.c @@ -72,8 +72,8 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou fflush( stdout ); } - fprintf( yyc, "/*\n * Harbour Compiler, %d.%d%s (Build %d) (%04d.%02d.%02d) (%s)\n", - HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_BUILD, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY, HB_VER_LEX ); + fprintf( yyc, "/*\n * Harbour Compiler, %d.%d.%d (%s)\n", + HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_LEX ); fprintf( yyc, " * Generated C source code\n */\n\n" ); if( hb_comp_iFunctionCnt ) diff --git a/harbour/source/compiler/genjava.c b/harbour/source/compiler/genjava.c index 9846cd1ce6..e3d37ba564 100644 --- a/harbour/source/compiler/genjava.c +++ b/harbour/source/compiler/genjava.c @@ -67,8 +67,8 @@ void hb_compGenJava( PHB_FNAME pFileName ) s_nChar = 0; - fprintf( s_yyc, "/*\n * Harbour Compiler, %d.%d%s (Build %d) (%04d.%02d.%02d) (%s)\n", - HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_BUILD, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY, HB_VER_LEX ); + fprintf( s_yyc, "/*\n * Harbour Compiler, %d.%d.%d (%s)\n", + HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_LEX ); fprintf( s_yyc, " * Generated JAVA source code\n */\n\n" ); fprintf( s_yyc, "public class %s\n", pFileName->szName ); diff --git a/harbour/source/compiler/genobj32.c b/harbour/source/compiler/genobj32.c index f612c020f7..91a44f376a 100644 --- a/harbour/source/compiler/genobj32.c +++ b/harbour/source/compiler/genobj32.c @@ -84,9 +84,8 @@ void hb_compGenObj32( PHB_FNAME pFileName ) fflush( stdout ); } - sprintf( compiler, "Harbour Compiler %d.%d%s (Build %d) (%04d.%02d.%02d) (%s)", - HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_BUILD, HB_VER_YEAR, - HB_VER_MONTH, HB_VER_DAY, HB_VER_LEX ); + sprintf( compiler, "Harbour Compiler %d.%d.%d (%s)", + HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_LEX ); CompiledFileName( hObjFile, szFileName ); CompilerVersion( hObjFile, compiler ); diff --git a/harbour/source/compiler/hbusage.c b/harbour/source/compiler/hbusage.c index 00e25255c4..3d59fa008c 100644 --- a/harbour/source/compiler/hbusage.c +++ b/harbour/source/compiler/hbusage.c @@ -61,6 +61,8 @@ void hb_compPrintUsage( char * szSelf ) { "\nOptions: %ca automatic memvar declaration", "\n %cb debug info", + "\n %cbuild display detailed version info", + "\n %ccredits display credits", "\n %cd[=] #define ", "\n %ces[] set exit severity", "\n %cg output type generated is (see below)", @@ -118,6 +120,7 @@ void hb_compPrintModes( void ) "\n ? this info", "\n" }; + int iLine; printf( "\nCompatibility flags (lowercase/uppercase significant): -k[options]\n" ); @@ -175,8 +178,8 @@ void hb_compPrintCredits( void ) */ void hb_compPrintLogo( void ) { - printf( "Harbour Compiler %d.%d%s (Build %d) (%04d.%02d.%02d) (%s)\n", - HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_BUILD, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY, HB_VER_LEX ); + printf( "Harbour Compiler %d.%d.%d (%s)\n", + HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_LEX ); printf( "Copyright 1999-2001, http://www.harbour-project.org/\n" ); } diff --git a/harbour/utils/hbpp/hbpp.c b/harbour/utils/hbpp/hbpp.c index e6422d493d..8151fc75df 100644 --- a/harbour/utils/hbpp/hbpp.c +++ b/harbour/utils/hbpp/hbpp.c @@ -111,8 +111,8 @@ int main( int argc, char * argv[] ) HB_TRACE(HB_TR_DEBUG, ("main(%d, %p)", argc, argv)); - printf( "Harbour Preprocessor %d.%d%s (Build %d) (%04d.%02d.%02d)\n", - HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION, HB_VER_BUILD, HB_VER_YEAR, HB_VER_MONTH, HB_VER_DAY ); + printf( "Harbour Preprocessor %d.%d.%d\n", + HB_VER_MAJOR, HB_VER_MINOR, HB_VER_REVISION ); printf( "Copyright 1999-2000, http://www.harbour-project.org\n" ); hb_pp_Table();