mirror of
https://github.com/boostorg/build.git
synced 2026-02-10 23:32:20 +00:00
Modified Files:
Jambase allyourbase.jam
Tag: jam_src
jam_src/Jamfile jam_src/command.c jam_src/common.mk
jam_src/compile.c jam_src/compile.h jam_src/hash.c
jam_src/hash.h jam_src/jambase.c jam_src/jamgram.c
jam_src/jamgram.h jam_src/jamgram.y jam_src/jamgram.yy
jam_src/jamgramtab.h jam_src/lists.c jam_src/lists.h
jam_src/make1.c jam_src/makedebugjam.bat jam_src/newstr.c
jam_src/newstr.h jam_src/parse.c jam_src/parse.h
jam_src/rules.c jam_src/rules.h jam_src/search.c
No tag
test/check-arguments.jam test/check-bindrule.jam
test/check-jam-patches.jam test/recursive.jam
test/test_nt_line_length.jam
Added Files:
Tag: jam_src
jam_src/modules.c jam_src/modules.h
Removed Files:
Jamfile
----------------------------------------------------------------------
Jambase
Removed obsolete check-arguments rule
allyourbase.jam
Added different split rule definition for new Jam executable when
NEW_BOOST_JAM is set.
Jamfile
removed (this file was flotsam)
jam_src/Jamfile
Added module.c; allowed yyacc to run under NT
jam_src/command.c
jam_src/make1.c
added rule body/action reference-counting
jam_src/common.mk
Added modules.c
jam_src/compile.c
account for rule body/action reference-counting
added "module { ... }, module local..." support
cleaned up code for evaluate_rule
jam_src/compile.h
jam_src/parse.{c,h}
Added module support
jam_src/hash.{c,h}
Added a data parameter to hashenumerate() for flexibility
jam_src/jamgram.{yy,y,c,h}
jam_src/jamgramtab.h
jam_src/lists.{c,h}
Added module support
refactored grammar slightly
jam_src/makedebugjam.bat
removed bogus invocation of yyacc
cleaned up redundant variable settings
jam_src/modules.{c,h} - added
jam_src/rules.{c,h}
added rule body/action reference-counting
module support
free list for SETTINGS
jam_src/search.c
cleaned up a confusing name
test/check-arguments.jam
added copyright notice
made it stand on its own
test/check-bindrule.jam
test/recursive.jam
use new argument-list feature
test/check-jam-patches.jam
tests for:
new SUBST behavior,
"for local <var> in ...",
while loops,
negative indices/slices
module rules and locals
test/test_nt_line_length.jam
commenting and cleanup
[SVN r11411]
119 lines
3.7 KiB
Plaintext
119 lines
3.7 KiB
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.
|
|
|
|
##############################################################
|
|
# Rules and actions that test Jam by invoking it recursively #
|
|
# #
|
|
# This is neccessary for testing anything that requires Jam #
|
|
# to execute build actions whose results must be checked, #
|
|
# and anything which exits Jam with a failure code (e.g. a #
|
|
# failed assertion). #
|
|
##############################################################
|
|
|
|
# Creates a fake target, always built, which succeeds in building if Invoking a
|
|
# Jamfile containing the given string succeeds. If optional-expected-output is
|
|
# supplied, creates another fake target which succeeds in building if
|
|
# optional-expected-output is in the Jam output.
|
|
#
|
|
# RETURNS: the target name of the Jam command.
|
|
rule Jam ( command : expected-output ? )
|
|
{
|
|
local jam-cmd = "$(command:G=jam_command)" ;
|
|
|
|
NOTFILE "$(jam-cmd)" ;
|
|
ALWAYS "$(jam-cmd)" ;
|
|
DEPENDS all : "$(jam-cmd)" ;
|
|
|
|
if ($NT)
|
|
{
|
|
redirect on $(jam-cmd) = "nul" ;
|
|
}
|
|
else if $(UNIX)
|
|
{
|
|
redirect on $(jam-cmd) = "/dev/null" ;
|
|
}
|
|
|
|
if $(VERBOSE)
|
|
{
|
|
redirect on $(jam-cmd) = ;
|
|
}
|
|
|
|
invoke-Jam "$(jam-cmd)" ;
|
|
|
|
if $(expected-output)
|
|
{
|
|
redirect on $(jam-cmd) = "scratch-output.txt" ;
|
|
local output-target = "$(expected-output:G=$(command))" ;
|
|
NOTFILE "$(output-target)" ;
|
|
ALWAYS "$(output-target)" ;
|
|
DEPENDS all : "$(output-target)" ;
|
|
Expect-in-output "$(output-target)" ;
|
|
|
|
if $(VERBOSE)
|
|
{
|
|
if $(NT) { VERBOSE on $(output-target) = "type " ; }
|
|
else { VERBOSE on $(output-target) = "cat " ; }
|
|
}
|
|
}
|
|
return $(jam-cmd) ;
|
|
}
|
|
|
|
# Just like the "Jam" rule, above, but only succeeds if the Jam command /fails/.
|
|
rule Jam-fail ( command : expected-output ? )
|
|
{
|
|
local target = [ Jam $(command) : $(expected-output) ] ;
|
|
FAIL_EXPECTED $(target) ;
|
|
return $(target) ;
|
|
}
|
|
|
|
|
|
# The temporary jamfile we write is called "temp.jam". If the user has set
|
|
# BOOST_BUILD_ROOT, it will be built there.
|
|
gBOOST_TEST_JAMFILE = temp.jam ;
|
|
LOCATE on gBOOST_TEST_JAMFILE ?= $(BOOST_BUILD_ROOT) ;
|
|
|
|
# Runs Jam on a temporary Jamfile which contains the string in $(command:G=)
|
|
# and redirects the results into a file whose name is given by $(redirect) on
|
|
# command
|
|
rule invoke-Jam ( command )
|
|
{
|
|
PREFIX on $(command) = "actions unbuilt { } unbuilt all ;" ;
|
|
if $(NT)
|
|
{
|
|
REMOVE on $(command) = $(SystemRoot)\System32\find ;
|
|
}
|
|
REMOVE on $(command) ?= rm ;
|
|
}
|
|
actions invoke-Jam
|
|
{
|
|
echo $(PREFIX) $(<:G=) > $(gBOOST_TEST_JAMFILE)
|
|
jam -f../Jambase -sJAMFILE=$(gBOOST_TEST_JAMFILE) $(JAMARGS) >$(redirect)
|
|
$(REMOVE) $(gBOOST_TEST_JAMFILE)
|
|
}
|
|
|
|
# These actions expect to find the ungristed part of $(<) in scratch-output.txt
|
|
# and return a nonzero exit code otherwise
|
|
if $(NT)
|
|
{
|
|
# Explicitly get the NT find command in case someone has another find in their path.
|
|
actions quietly Expect-in-output
|
|
{
|
|
$(VERBOSE)scratch-output.txt ;
|
|
$(SystemRoot)\System32\find /C "$(<:G=)" scratch-output.txt >nul
|
|
}
|
|
}
|
|
else
|
|
{
|
|
# Not really the right actions for Unix; the argument will be interpreted as
|
|
# a regular expression. Is there a simpler find?
|
|
actions quietly Expect-in-output
|
|
{
|
|
$(VERBOSE)scratch-output.txt ;
|
|
grep "$(<:G=)" scratch-output.txt
|
|
}
|
|
}
|
|
|