diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-15 11:03:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-15 11:03:56 +0200 |
commit | c9cde47347bf473b7938961a0e51e8c740384ac6 (patch) | |
tree | 2dcfe2ba223a210ad4b37edb84de67ef8a183b37 | |
parent | a011c760c7a4929ee6e9eaa6231c550964f3a4aa (diff) |
Temporarily make buildfiles compatible with build2 0.2.0
-rw-r--r-- | build2/buildfile | 12 | ||||
-rw-r--r-- | build2/context.cxx | 4 |
2 files changed, 15 insertions, 1 deletions
diff --git a/build2/buildfile b/build2/buildfile index fa68657..2cf322b 100644 --- a/build2/buildfile +++ b/build2/buildfile @@ -64,7 +64,17 @@ $libs # Pass our compiler target to be used as build2 host. # -obj{context}: cxx.poptions += -DBUILD2_HOST_TRIPLET=\"$cxx.target\" +# obj{context}: cxx.poptions += -DBUILD2_HOST_TRIPLET=\"$cxx.target\" +if ($__build2_greater_than_0_2_0_hack__ == "true") +{ + var=cxx.target +} +else +{ + var=cxx.host +} + +obj{context}: cxx.poptions += -DBUILD2_HOST_TRIPLET='"'$($var)'"' # Load the cli module but only if it's available. This way a distribution # that includes pre-generated files can be built without installing cli. diff --git a/build2/context.cxx b/build2/context.cxx index 812886c..746592d 100644 --- a/build2/context.cxx +++ b/build2/context.cxx @@ -90,6 +90,10 @@ namespace build2 gs.assign ("build.work", dir_path_type) = work; gs.assign ("build.home", dir_path_type) = home; + // @@ Backwards-compatibility hack. + // + gs.assign ("__build2_greater_than_0_2_0_hack__", bool_type) = true; + // Enter the version. // // @@ VAR types |