1#!/usr/local/bin/python3.8 2 3# Copyright (C) Vladimir Prus 2005. 4# Distributed under the Boost Software License, Version 1.0. (See 5# accompanying file LICENSE_1_0.txt or copy at 6# http://www.boost.org/LICENSE_1_0.txt) 7 8# Tests that we can declare a rule in Jamroot that will be can be called in 9# child Jamfile to declare a target. Specifically test for use of 'glob' in that 10# rule. 11 12import BoostBuild 13 14t = BoostBuild.Tester(use_test_config=False) 15 16 17t.write("jamroot.jam", """ 18project : requirements <link>static ; 19rule my-lib ( name ) { lib $(name) : [ glob *.cpp ] ; } 20""") 21 22t.write("sub/a.cpp", """ 23""") 24 25t.write("sub/jamfile.jam", """ 26my-lib foo ; 27""") 28 29 30t.run_build_system(subdir="sub") 31 32t.expect_addition("sub/bin/$toolset/debug*/foo.lib") 33 34t.cleanup() 35