+ | --no-error-backtrace |
+
+ Don't print backtrace on errors. Primary usefull for
+ testing. |
+
diff --git a/new/errors.jam b/new/errors.jam
index 3231901b1..1c2a51fc4 100644
--- a/new/errors.jam
+++ b/new/errors.jam
@@ -102,10 +102,38 @@ rule error-skip-frames ( skip-frames messages * : * )
}
}
+if --no-error-backtrace in [ modules.peek : ARGV ]
+{
+ .no-error-backtrace = true ;
+}
+
+
# Print an error message with a stack backtrace and exit.
rule error ( messages * : * )
{
- error-skip-frames 3 $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ if $(.no-error-backtrace)
+ {
+ # Print each argument on a separate line.
+ for local n in $(.args)
+ {
+ if $($(n))-is-not-empty
+ {
+ if ! $(first-printed)
+ {
+ ECHO error: $($(n)) ;
+ first-printed = true ;
+ }
+ else
+ {
+ ECHO $($(n)) ;
+ }
+ }
+ }
+ }
+ else
+ {
+ error-skip-frames 3 $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
+ }
}
# Print a warning message with a stack backtrace and exit.
diff --git a/new/generators.jam b/new/generators.jam
index 81f76ac1e..798dac3ae 100644
--- a/new/generators.jam
+++ b/new/generators.jam
@@ -90,7 +90,7 @@ rule normalize-target-list ( targets )
# Creates a generator
rule generator (
id # identifies the generator - should be name of the rule which
- # sets up build actions
+ # sets up build actions
: source-types + # types that this generator can handle
@@ -565,7 +565,9 @@ local rule find-viable-generators ( target-type : properties * )
local generator-rank = ;
import type ;
- local t = [ type.all-bases $(target-type) ] ;
+ #VP: the following breaks the NM transformation test.
+ #local t = [ type.all-bases $(target-type) ] ;
+ local t = $(target-type) ;
while $(t[1])
{
diff --git a/test/generators-test/Jamfile b/test/generators-test/Jamfile
index ac002a1c0..d4c3caa98 100644
--- a/test/generators-test/Jamfile
+++ b/test/generators-test/Jamfile
@@ -6,4 +6,4 @@ exe f : a.cpp b.cxx obj_1 obj_2 lib/auxilliary ;
obj obj_1 : z.cpp :