2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 13:22:11 +00:00
Files
build/v2/util/utility.jam
Dave Abrahams b9611966a1 Killed off all uses of SUBST
[SVN r13337]
2002-04-01 15:04:25 +00:00

35 lines
908 B
Plaintext

# (C) Copyright David Abrahams 2001. Permission to copy, use, modify, sell and
# distribute this software is granted provided this copyright notice appears in
# all copies. This software is provided "as is" without express or implied
# warranty, and with no claim as to its suitability for any purpose.
rule ungrist ( names * )
{
local result ;
for local name in $(names)
{
local stripped = [ MATCH ^<(.*)>$ : $(name) ] ;
if ! $(stripped)
{
ECHO *** error: in ungrist $(names) ;
EXIT *** $(name) is not of the form <.*> ;
}
result += $(stripped) ;
}
return $(result) ;
}
# Return the file of the caller of the rule that called caller-file.
rule caller-file ( )
{
local bt = [ BACKTRACE ] ;
return $(bt[9]) ;
}
local rule __test__ ( )
{
import assert ;
assert.result foo bar : ungrist <foo> <bar> ;
}