platform_build_blueprint/blueprint
Romain Guy 285296519a Add support for targets in Blueprints.
The default target selector uses the name of the host OS.
Modules can implement their own target selector by implementing
the context.TargetSelector interface and its unique selectTarget()
method.

Targets are defined this way in Blueprint files:

cc_library {
    name:  "libmylib",
    deps:  ["libmath", "libutils"],
    zones: ["frontend"],
    srcs:  ["main.cpp"],
    targets: {
        darwin: {
            moduleCflags: "-framework OpenGL -framework GLUT",
        },
        linux:  {
            deps: ["libx11headers", "libglu"],
        },
    },
}

In this example, a set of C flags are defined on OS X only and on
Linux, two new dependencies are added.

When a target is selected, its properties are merged with the properties
of the modules:
- a list is appended to the original list (see deps above)
- a string is concatenated to the original string
- a bool replaces the original bool
- a map adds or replaces the key/value pairs of the original map

Change-Id: Ic627d47f795d6a4ff56ca5f6f099cad157621af1
2014-08-12 17:50:11 -07:00
..
bootstrap Add some ModuleContext error functionality. 2014-07-02 16:40:31 -07:00
parser Add support for map properties 2014-07-25 17:01:20 -07:00
pathtools add ReplaceExtensions to pathtools 2014-06-19 21:22:52 +00:00
context.go Add support for targets in Blueprints. 2014-08-12 17:50:11 -07:00
context_test.go Initial Blueprint commit. 2014-06-04 14:23:32 -07:00
globals.go Fix scoping logic to respect the caller's package. 2014-06-30 18:26:28 -07:00
live_tracker.go Remove the blueprint.Config type. 2014-06-12 12:16:09 -07:00
mangle.go Initial Blueprint commit. 2014-06-04 14:23:32 -07:00
module_ctx.go Add some ModuleContext error functionality. 2014-07-02 16:40:31 -07:00
ninja_defs.go Add more Build/Rule/Pool params validation. 2014-06-18 12:57:56 -07:00
ninja_strings.go Add more Build/Rule/Pool params validation. 2014-06-18 12:57:56 -07:00
ninja_strings_test.go Initial Blueprint commit. 2014-06-04 14:23:32 -07:00
ninja_writer.go Initial Blueprint commit. 2014-06-04 14:23:32 -07:00
ninja_writer_test.go Initial Blueprint commit. 2014-06-04 14:23:32 -07:00
scope.go Fix scoping logic to respect the caller's package. 2014-06-30 18:26:28 -07:00
singleton_ctx.go Fix scoping logic to respect the caller's package. 2014-06-30 18:26:28 -07:00
unpack.go Add support for targets in Blueprints. 2014-08-12 17:50:11 -07:00
unpack_test.go Initial Blueprint commit. 2014-06-04 14:23:32 -07:00