aboutsummaryrefslogtreecommitdiff
path: root/build2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-08-20 15:36:55 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-08-20 15:36:55 +0200
commitc9c366bc5f77a806384ebf678fe4335c1422884c (patch)
treebf99bfe03b030685ca6b4a9963138b9e980229ad /build2
parent487e4c77e4131fd5f559fc793c8caaf1dcbc4917 (diff)
Adjust bootstrap not to need pre-generated version.hxx
Diffstat (limited to 'build2')
-rw-r--r--build2/utility.hxx13
-rw-r--r--build2/version.hxx.in5
2 files changed, 16 insertions, 2 deletions
diff --git a/build2/utility.hxx b/build2/utility.hxx
index b057add..57d5f71 100644
--- a/build2/utility.hxx
+++ b/build2/utility.hxx
@@ -23,7 +23,18 @@
#include <build2/types.hxx>
#include <build2/b-options.hxx>
-#include <build2/version.hxx>
+
+// "Fake" version values used during bootstrap.
+//
+#ifdef BUILD2_BOOTSTRAP
+# define BUILD2_VERSION 9999999990000ULL
+# define BUILD2_VERSION_STR "999.999.999"
+# define BUILD2_VERSION_ID "999.999.999"
+# define LIBBUTL_VERSION_STR "999.999.999"
+# define LIBBUTL_VERSION_ID "999.999.999"
+#else
+# include <build2/version.hxx>
+#endif
namespace build2
{
diff --git a/build2/version.hxx.in b/build2/version.hxx.in
index c05a207..927a971 100644
--- a/build2/version.hxx.in
+++ b/build2/version.hxx.in
@@ -23,7 +23,10 @@
// 2.2.0-a.1 0020019990010
// 3.0.0-b.2 0029999995020
// 2.2.0-a.1.z 0020019990011
-//
+
+// NOTE: remember to also update "fake" bootstrap values in utility.hxx if
+// changing anything here.
+
#define BUILD2_VERSION $build2.version.project_number$ULL
#define BUILD2_VERSION_STR "$build2.version.project$"
#define BUILD2_VERSION_ID "$build2.version.project_id$"