mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 13:22:11 +00:00
Merge from trunk.
[SVN r33653]
This commit is contained in:
@@ -271,7 +271,7 @@ class generator
|
||||
: sources + # Source targets.
|
||||
)
|
||||
{
|
||||
generators.dout [ indent ] " generator" $(self.id) ;
|
||||
generators.dout [ indent ] " ** generator" $(self.id) ;
|
||||
generators.dout [ indent ] " multiple:" $(mutliple) ;
|
||||
generators.dout [ indent ] " composing:" $(self.composing) ;
|
||||
|
||||
@@ -353,7 +353,6 @@ class generator
|
||||
# If this is 1->1 transformation, apply it to all consumed targets in order.
|
||||
if ! $(self.source-types[2]) && ! $(self.composing)
|
||||
{
|
||||
generators.dout [ indent ] "alt1" ;
|
||||
for local r in $(consumed)
|
||||
{
|
||||
result += [ generated-targets $(r) : $(property-set) : $(project) $(name) ] ; #(targets) ;
|
||||
@@ -361,7 +360,6 @@ class generator
|
||||
}
|
||||
else
|
||||
{
|
||||
generators.dout [ indent ] "alt2 : consumed is" $(consumed) ;
|
||||
if $(consumed)
|
||||
{
|
||||
result += [ generated-targets $(consumed) : $(property-set)
|
||||
@@ -859,7 +857,7 @@ local rule try-one-generator ( project name ? : generator :
|
||||
! [ set.intersection $(source-types) : $(viable-source-types) ]
|
||||
{
|
||||
local id = [ $(generator).id ] ;
|
||||
generators.dout [ indent ] "generator '$(id)' pruned" ;
|
||||
generators.dout [ indent ] " ** generator '$(id)' pruned" ;
|
||||
#generators.dout [ indent ] "source-types" '$(source-types)' ;
|
||||
#generators.dout [ indent ] "viable-source-types" '$(viable-source-types)' ;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,97 @@
|
||||
|
||||
Milestone 10 ()
|
||||
Milestone 11 (not yet released)
|
||||
|
||||
Changes in this release:
|
||||
|
||||
- New C++ compilers: IBM xlf, HP aCC, HP CXX, Intel fortran compiler.
|
||||
- New tools: Qt4 support, MS message compiler and IDL compiler.
|
||||
- New main targets: 'notfile' and 'cast'.
|
||||
|
||||
- Core changes:
|
||||
|
||||
- Only one file required at top level of a project, named Jamroot.
|
||||
- Jamfiles can now contain project-specific help messages.
|
||||
- "Indirect conditional requirements" introduced
|
||||
(http://tinyurl.com/mn3jp)
|
||||
- Strip suffix in main target names when computing names of generated
|
||||
files (URL)
|
||||
- The 'source-location' project attribute can contain
|
||||
several directories.
|
||||
- Usage requirements are propagated not only direct dependents,
|
||||
but to indirect dependents.
|
||||
|
||||
- Command line option changes (see http://tinyurl.com/zbycz)
|
||||
- New option --build-dir
|
||||
- The --clean option cleans only target below the current directory,
|
||||
not globally.
|
||||
- New --clean-all option was added.
|
||||
- New option --debug-building
|
||||
- Running "bjam some_directory" works even if there's no Jamfile
|
||||
in the current directory.
|
||||
|
||||
- Toolset improvements:
|
||||
- Assembling support with gcc, borland and msvc.
|
||||
- Support amd64/ia64 cross-compiling with msvc.
|
||||
- Improved, registry-based autodetection for msvc.
|
||||
- Serialize execution of gcc.link actions
|
||||
- Precompiled headers supported on MSVC
|
||||
(Need documentation)
|
||||
|
||||
- New features <warnings> and <warnings-as-errors>
|
||||
- The 'glob' rule accepts wildcards in directory names.
|
||||
- The 'stage' rule was renamed to 'install'
|
||||
(the old name still available for compatibility)
|
||||
- The <tag> feature can accept user-defined function as value
|
||||
(URL)
|
||||
- The 'install' rule can install a directory hierarchy preserving relative
|
||||
paths.
|
||||
- The 'install' rule no longer allows to change library
|
||||
name during install.
|
||||
- The Jamfile referred via 'use-project' may declare project id different
|
||||
from the one in 'use-project'.
|
||||
- The 'using' rule now searches the directory of containing Jamfile.
|
||||
|
||||
|
||||
The following bugs were fixed:
|
||||
|
||||
- The <library> feature was ignored for static linking
|
||||
- Fix #include scanning for C files.
|
||||
- Child projects were sometimes loaded before parent projects.
|
||||
- Fix project references with absolute paths on Windows.
|
||||
- The <dependency> feature was ignored for 'install' targets.
|
||||
- A generator having the same type in sources and targets was causing hang.
|
||||
- Use 'icpc' command for Intel, fixing errors with 8.1 and higher.
|
||||
- Generation of PS files with the FOP tool really produces .PS files.
|
||||
- No dependency scanning was done for C files.
|
||||
- The 'constant' and 'path-constant' rules did not accept multi-element
|
||||
value.
|
||||
- Don't pass -fcoalesce-templates to gcc on OSX 10.4
|
||||
- Fix static lib suffix on OSX.
|
||||
- Fix rpath setting on Intel/Linux.
|
||||
- The 'install' rule don't unnecessary scans #includes in installed
|
||||
headers.
|
||||
|
||||
|
||||
Developer visible changes:
|
||||
|
||||
- Ability to customize type's prefix depending on build properties.
|
||||
- Generator's 'run' method can return usage-requirements.
|
||||
- Main target rule is automatically declared for each new target type.
|
||||
- 'Link incompatible' feature attribute was removed
|
||||
- Generators no longer bypass unhandled sources, they just ignore them.
|
||||
- If there are several applicable generators, immediately report ambiguity.
|
||||
Provide a way to explicitly resolve conflicts between generators.
|
||||
- The 'flags' rule can match absense of feature.
|
||||
- Great improvement in response files handling
|
||||
- The 'toolset.flags' rules allows value-less feature to signify
|
||||
absense of this feature (fix hack-hack).
|
||||
- Automatically declare main target rule for each declared target type.
|
||||
- When inheriting types, inherit generators for the base type, as opposed
|
||||
to using various hacks to invoke base generators when needed.
|
||||
- Improve diagnostic for "duplicate actual target" and generator ambiguity.
|
||||
|
||||
|
||||
Milestone 10 (October 29, 2004)
|
||||
|
||||
Changes in this release:
|
||||
|
||||
|
||||
@@ -200,6 +200,51 @@ import <replaceable>module</replaceable> : <replaceable>rule</replaceable> ;</pr
|
||||
The second form imports the specified rules only, and they can be called
|
||||
using unqualified names.
|
||||
</para>
|
||||
|
||||
<para id="bbv2.advanced.jam_language.actions">
|
||||
Sometimes, you'd need to specify the actual command lines to be used
|
||||
when creating targets. In jam language, you use named actions to do this.
|
||||
For example:
|
||||
<programlisting>
|
||||
actions create-file-from-another
|
||||
{
|
||||
create-file-from-another $(<) $(>)
|
||||
}
|
||||
</programlisting>
|
||||
This specifies a named action called
|
||||
<literal>create-file-from-another</literal>. The text inside braces is the
|
||||
command to invoke. The <literal>$(<)</literal> variable will be expanded to list of
|
||||
generated files, and the <literal>$(>)</literal> variable will be expanded
|
||||
to the list of source files.
|
||||
</para>
|
||||
|
||||
<para>To flexibly adjust command line, you can define a rule with the
|
||||
same name as the action, and taking three parameters -- targets, sources
|
||||
and properties. For example:
|
||||
<programlisting>
|
||||
rule create-file-from-another ( targets * : sources * : properties * )
|
||||
{
|
||||
if <variant>debug in $(properties)
|
||||
{
|
||||
OPTIONS on $(targets) = --debug ;
|
||||
}
|
||||
}
|
||||
actions create-file-from-another
|
||||
{
|
||||
create-file-from-another $(OPTIONS) $(<) $(>)
|
||||
}
|
||||
</programlisting>
|
||||
In this example, the rule checks if certain build property is specified.
|
||||
If so, it sets variable <varname>OPIONS</varname> that's used inside
|
||||
action. Note that the variable is set "on targets" -- the value will
|
||||
be only visible inside action, not globally. Were it set globally,
|
||||
using variable named <varname>OPTIONS</varname> in two unrelated
|
||||
actions would be impossible.
|
||||
</para>
|
||||
|
||||
<para>More details can be found in Jam reference, <xref linkend="jam.language.rules"/>
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="bbv2.advanced.configuration">
|
||||
@@ -1609,6 +1654,66 @@ unit-test helpers_test
|
||||
are not covered here.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="bbv2.builtins.raw">
|
||||
|
||||
<title>Raw commands: 'make' and 'notfile'</title>
|
||||
|
||||
<para>Sometimes, the builtin target types are not enough, and you
|
||||
want Boost.Build to just run specific commands. There are two main
|
||||
target rules that make it possible: <functionname>make</functionname>
|
||||
and <functionname>notfile</functionname>.
|
||||
</para>
|
||||
|
||||
<para>The <functionname>make</functionname> rule is used when you want to
|
||||
create one file from a number of sources using some specific command.
|
||||
The <functionname>notfile</functionname> is used to unconditionally run
|
||||
a command.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Suppose you want to create file <filename>file.out</filename> from
|
||||
file <filename>file.in</filename> by running command
|
||||
<command>in2out</command>. Here's how you'd do this in Boost.Build:
|
||||
<programlisting>
|
||||
actions in2out
|
||||
{
|
||||
in2out $(<) $(>)
|
||||
}
|
||||
make file.out : file.in : @in2out ;
|
||||
</programlisting>
|
||||
If you run <command>bjam</command> and <filename>file.out</filename>
|
||||
does not exist, Boost.Build will run the <command>in2out</command>
|
||||
command to create that file. For more details on specifying actions,
|
||||
see <xref linkend="bbv2.advanced.jam_language.actions"/>.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
The <functionname>make</functionname> rule is useful to express custom
|
||||
transformation that are used just once or twice in your project. For
|
||||
transformations that are used often, you are advised to declare
|
||||
new generator, as described in <xref linkend="bbv2.extending.tools"/>.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
It could be that you just want to run some command unconditionally,
|
||||
and that command does not create any specific files. The, you can use
|
||||
the <functionname>notfile</functionname> rule. For example:
|
||||
<programlisting>
|
||||
notfile echo_something : @echo ;
|
||||
actions echo
|
||||
{
|
||||
echo "something"
|
||||
}
|
||||
</programlisting>
|
||||
The only difference from the <functionname>make</functionname> rule is
|
||||
that the name of the target is not considered a name of a file, so
|
||||
Boost.Build will unconditionally run the action.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ exe main : main.cpp ;
|
||||
# Create 'main.cpp' from 'main.cpp.pro' using action
|
||||
# 'do-something' defined below.
|
||||
#
|
||||
make main.cpp : main.cpp.pro : do-something ;
|
||||
make main.cpp : main.cpp.pro : @do-something ;
|
||||
|
||||
# In this example, we'll just copy a file.
|
||||
# Need to find out the name of a command to copy a file.
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
|
||||
// Seems like Boostbook does like classes outside of namespaces,
|
||||
// and won't generate anything for them.
|
||||
namespace boost {
|
||||
|
||||
/// A class
|
||||
class A {
|
||||
public:
|
||||
/// A constructor
|
||||
A();
|
||||
};
|
||||
}
|
||||
22
v2/test/example_libraries.py
Normal file
22
v2/test/example_libraries.py
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Copyright (C) Vladimir Prus 2006.
|
||||
# Distributed under the Boost Software License, Version 1.0. (See
|
||||
# accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# Test the 'libraries' example.
|
||||
from BoostBuild import Tester, List
|
||||
|
||||
# Create a temporary working directory
|
||||
t = Tester()
|
||||
|
||||
t.set_tree("../example/libraries")
|
||||
|
||||
t.run_build_system()
|
||||
|
||||
t.expect_addition(["app/bin/$toolset/debug/app",
|
||||
"util/foo/bin/$toolset/debug/bar.dll"])
|
||||
|
||||
|
||||
t.cleanup()
|
||||
26
v2/test/example_qt4.py
Normal file
26
v2/test/example_qt4.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Copyright (C) Vladimir Prus 2006.
|
||||
# Distributed under the Boost Software License, Version 1.0. (See
|
||||
# accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# Test the 'qt4' examples.
|
||||
from BoostBuild import Tester, List
|
||||
|
||||
# Create a temporary working directory
|
||||
t = Tester()
|
||||
|
||||
t.set_tree("../example/qt/qt4/hello")
|
||||
t.run_build_system()
|
||||
t.expect_addition(["bin/$toolset/debug/arrow"])
|
||||
|
||||
t.set_tree("../example/qt/qt4/moccable-cpp")
|
||||
t.run_build_system()
|
||||
t.expect_addition(["bin/$toolset/debug/main"])
|
||||
|
||||
t.set_tree("../example/qt/qt4/uic")
|
||||
t.run_build_system()
|
||||
t.expect_addition(["bin/$toolset/debug/hello"])
|
||||
|
||||
t.cleanup()
|
||||
@@ -140,6 +140,7 @@ tests = [ "rebuilds",
|
||||
"clean",
|
||||
"lib_source_property",
|
||||
"implicit_dependency",
|
||||
"example_libraries",
|
||||
]
|
||||
|
||||
if os.name == 'posix':
|
||||
@@ -155,13 +156,9 @@ if os.name == 'posix':
|
||||
if string.find(get_toolset(), 'gcc') == 0:
|
||||
tests.append("gcc_runtime")
|
||||
|
||||
if os.environ.has_key('QTDIR'):
|
||||
tests.append("railsys")
|
||||
else:
|
||||
print 'skipping railsys test since QTDIR environment variable is unset'
|
||||
|
||||
if "--extras" in sys.argv:
|
||||
tests.append("boostbook")
|
||||
tests.append("example_qt4")
|
||||
else:
|
||||
print 'Note: skipping extra tests'
|
||||
|
||||
|
||||
@@ -47,7 +47,12 @@ rule make ( target-name : sources * : generating-rule + : requirements * )
|
||||
|
||||
# The '@' sign causes the feature.jam module to qualify rule name
|
||||
# with the module name of current project, if needed.
|
||||
requirements += <action>@$(generating-rule) ;
|
||||
local m = [ MATCH ^(@).* : $(generating-rule) ] ;
|
||||
if ! $(m)
|
||||
{
|
||||
generating-rule = @$(generating-rule) ;
|
||||
}
|
||||
requirements += <action>$(generating-rule) ;
|
||||
|
||||
targets.main-target-alternative
|
||||
[ new make-target-class $(target-name) : $(project)
|
||||
|
||||
@@ -16,7 +16,6 @@ feature.extend toolset : sun ;
|
||||
toolset.inherit sun : unix ;
|
||||
generators.override sun.prebuilt : builtin.lib-generator ;
|
||||
generators.override sun.searched-lib-generator : searched-lib-generator ;
|
||||
feature.subfeature toolset sun : version ;
|
||||
|
||||
feature.extend stdlib : sun-stlport ;
|
||||
feature.compose <stdlib>sun-stlport
|
||||
|
||||
Reference in New Issue
Block a user