2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-10 23:32:20 +00:00
Files
build/test/dependency-test/foo.py
Vladimir Prus 78fc7e42c3 More header dependencies fixes
[SVN r64408]
2010-07-28 12:39:39 +00:00

27 lines
828 B
Python

# Copyright 2003 Dave Abrahams
# Copyright 2002, 2003, 2005, 2010 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
import bjam
import b2.build.type as type
import b2.build.generators as generators
from b2.manager import get_manager
type.register("FOO", ["foo"])
generators.register_standard("foo.foo", ["FOO"], ["CPP", "H"])
def prepare_foo(targets, sources, properties):
if properties.get('os') in ['windows', 'cygwin']:
bjam.call('set-target-variable', targets, "DECL",
"void __declspec(dllexport) foo(){}")
pass
get_manager().engine().register_action("foo.foo",\
"""echo -e $(DECL:E="//")\\n > $(<[1])
echo -e "#include <z.h>\\n" > $(<[2])
""", function=prepare_foo)