diff --git a/v2/build-system.jam b/v2/build-system.jam index a555b610d..80258ef19 100644 --- a/v2/build-system.jam +++ b/v2/build-system.jam @@ -543,14 +543,15 @@ local rule should-clean-project ( project ) # ################################################################################ -{ +{ if --version in $(.argv) { version.print ; EXIT ; } - - + + version.verify-engine-version ; + load-configuration-files ; local extra-properties ; diff --git a/v2/build/version.jam b/v2/build/version.jam index 1d64026d9..7626ddda8 100644 --- a/v2/build/version.jam +++ b/v2/build/version.jam @@ -6,26 +6,44 @@ import errors ; import numbers ; +major = "2011" ; +minor = "04" ; rule boost-build ( ) { - return "V2 (Milestone 12)" ; + return "$(major).$(minor)-svn" ; } - -rule jam ( ) -{ - local v = [ modules.peek : JAM_VERSION ] ; - return $(v:J=.) ; -} - - rule print ( ) { - ECHO "Boost.Build" [ boost-build ] ; - ECHO "Boost.Jam" [ jam ] ; + if [ verify-engine-version ] + { + ECHO "Boost.Build" [ boost-build ] ; + } } +rule verify-engine-version ( ) +{ + local v = [ modules.peek : JAM_VERSION ] ; + + if $(v[1]) != $(major) || $(v[2]) != $(minor) + { + local argv = [ modules.peek : ARGV ] ; + local e = $(argv[1]) ; + local l = [ modules.binding version ] ; + l = $(l:D) ; + l = $(l:D) ; + ECHO "warning: mismatched versions of Boost.Build engine and core" ; + ECHO "warning: Boost.Build engine ($(e)) is $(v:J=.)" ; + ECHO "warning: Boost.Build core (at $(l)) is" [ boost-build ] ; + } + else + { + return true ; + } +} + + # Utility rule for testing whether all elements in a sequence are equal to 0. # diff --git a/v2/engine/patchlevel.h b/v2/engine/patchlevel.h index 5d5979057..699efd84b 100644 --- a/v2/engine/patchlevel.h +++ b/v2/engine/patchlevel.h @@ -7,11 +7,11 @@ /* Keep JAMVERSYM in sync with VERSION. */ /* It can be accessed as $(JAMVERSION) in the Jamfile. */ -#define VERSION_MAJOR 3 -#define VERSION_MINOR 1 -#define VERSION_PATCH 19 -#define VERSION_MAJOR_SYM "03" -#define VERSION_MINOR_SYM "1" -#define VERSION_PATCH_SYM "19" -#define VERSION "3.1.19" -#define JAMVERSYM "JAMVERSION=3.1" +#define VERSION_MAJOR 2011 +#define VERSION_MINOR 04 +#define VERSION_PATCH 0 +#define VERSION_MAJOR_SYM "2011" +#define VERSION_MINOR_SYM "04" +#define VERSION_PATCH_SYM "00" +#define VERSION "2011.4" +#define JAMVERSYM "JAMVERSION=2011.4"