Skip to content

Commit

Permalink
Release 4.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
grafikrobot committed Mar 9, 2020
2 parents 7a1e7f7 + 3595602 commit ce27597
Show file tree
Hide file tree
Showing 122 changed files with 1,592 additions and 1,398 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
/src/engine/b2
/src/engine/b2.exe
infer-out
build.log
29 changes: 28 additions & 1 deletion CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 Rene Rivera
// Copyright 2019-2020 Rene Rivera
// Copyright 2003, 2006 Vladimir Prus
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or http://www.boost.org/LICENSE_1_0.txt)
Expand Down Expand Up @@ -150,3 +150,30 @@ else
#
}
----

== ENGINE

Developing in the `b2` engine, the C++ part, requires two steps to be
effective: building the "stable" engine, and developing the
"in-progress" engine.

What is the "stable" engine is up to you. It only refers to a build of the
engine you know is at a good working state. When you are at a point the
source is stable you can run `bootstrap.sh/bat` from the root. That will
create the `b2` executable at the root. You can then use this version to run
regular B2 builds as needed both within the B2 tree and in other projects.

The "in-progress" engine is whatever build you happen to be testing at the
moment. There are two ways to build this be engine. You can either
(a) run `b2 b2` at the root, or (b) run `build.sh/bat` in `src/engine`.

Using (a) will place, by default, a fully debuggable `b2` in the `.build`
directories. You can run that one from a debugger with full symbols and
stepping features. This should be the first choice in developing in the
engine.

After using (a) to implement functionality you can use (b) to fully test
that functionality. The engine built from (b) is fully optimized and
is the one used, by default, by the test system when running in the `test`
directory. Before submitting patches it's required to build this way and
run the tests in at least one toolset version (but preferably at least two).
34 changes: 27 additions & 7 deletions Jamroot.jam
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ import indirect ;
import "class" : new ;
import type ;
import virtual-target ;
import errors ;

path-constant SELF : . ;

project b2
: build-dir .build
: requirements
<cxxstd>11
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS=1
<toolset>msvc:<define>_CRT_NONSTDC_NO_DEPRECATE=1
;

#|
Expand Down Expand Up @@ -73,11 +78,13 @@ explicit jamgram.y ;
Define grammar translation with Bison.
|#

BISON = [ os.environ BISON ] ;
BISON ?= bison ;
local BISON_IN_PATH = [ path.glob [ os.executable-path ] : $(BISON[1]) $(BISON[1]).* ] ;

rule grammar ( target : source : properties * )
{
# LOCATE on $(target) = $(source:D) ;
local BISON = [ os.environ BISON ] ;
BISON ?= bison ;
BISON on $(target) = $(BISON) ;
}

Expand All @@ -86,11 +93,20 @@ actions grammar
"$(BISON)" --yacc --defines -o "$(<[1])" "$(>)"
}

make jamgram.cpp
: src/engine/jamgram.y
: @grammar
: <dependency>jamgram.y
<location>src/engine ;
if $(BISON_IN_PATH)
{
make jamgram.cpp
: src/engine/jamgram.y
: @grammar
: <dependency>jamgram.y
<location>src/engine ;
}
else
{
errors.warning "Bison generator program '$(BISON:J= )' not found. Skipping grammar build." ;
alias jamgram.cpp
: src/engine/jamgram.cpp ;
}
explicit jamgram.cpp ;

#|
Expand Down Expand Up @@ -153,6 +169,7 @@ local b2_src =
[ glob src/engine/*.cpp src/engine/modules/*.cpp :
src/engine/*nt.cpp src/engine/*unix.cpp src/engine/*vms.cpp
src/engine/yyacc.cpp src/engine/mkjambase.cpp
src/engine/check_cxx11.cpp
] ;
local b2_src_nt = [ glob src/engine/*nt.cpp ] ;
local b2_src_unix = [ glob src/engine/*unix.cpp ] ;
Expand All @@ -167,6 +184,9 @@ exe b2
<target-os>$(unix_os):<source>$(b2_src_unix)
<dependency>jamgram.cpp
<dependency>jambase.cpp
<toolset>msvc:<find-static-library>kernel32
<toolset>msvc:<find-static-library>advapi32
<toolset>msvc:<find-static-library>user32
;
explicit b2 ;

Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Continuously tested on:

* Linux Clang 3.5, 3.6, 3.7, 3.8, 3.9, 4, 5, 6, 7, 8
* Linux GCC 4.7, 4.8, 4.9, 5, 6, 7, 8, 9
* macOS Xcode 8.3.3, 9.0, 9.0.1, 9.1, 9.2, 9.3, 9.3.1, 9.4, 9.4.1, 10.0, 10.1, 10.2, 10.2.1
* macOS Xcode 8.3.3, 9.0, 9.0.1, 9.1, 9.2, 9.3, 9.3.1, 9.4, 9.4.1, 10.0, 10.1, 10.2, 10.2.1, 11.0, 11.1, 11.2, 11.3, 11.3.1
* Windows MinGW 8.1.0
* Windows VS 2013, 2015, 2017, 2019

Expand Down
Loading

0 comments on commit ce27597

Please sign in to comment.