diff --git a/gcc-tools.jam b/gcc-tools.jam index c92f238d2..fcb23e857 100644 --- a/gcc-tools.jam +++ b/gcc-tools.jam @@ -5,11 +5,11 @@ # to its suitability for any purpose. # compute directories for invoking GCC +local SPACE = " " ; GCC_BIN_DIRECTORY ?= $(GCC_ROOT_DIRECTORY)$(SLASH)bin$(SLASH) ; GCC_BIN_DIRECTORY ?= "" ; # Don't clobber tool names if GCC_ROOT_DIRECTORY not set GCC_INCLUDE_DIRECTORY ?= $(GCC_ROOT_DIRECTORY)$(SLASH)include ; GCC_STDLIB_DIRECTORY ?= $(GCC_ROOT_DIRECTORY)$(SLASH)lib ; -local SPACE ?= " " ; flags gcc LINKFLAGS static : -static ; flags gcc CFLAGS on : -g ; diff --git a/metrowerks-tools.jam b/metrowerks-tools.jam index e11733634..15e0b65f1 100644 --- a/metrowerks-tools.jam +++ b/metrowerks-tools.jam @@ -101,7 +101,7 @@ rule Cc-action actions metrowerks-Cc-action { $(METROWERKS_SETUP) - mwcc -maxerrors 20 -maxwarnings 20 -c -warn on,nounusedexpr,nounused -cwd include -U$(UNDEFS) -D$(DEFINES) -nowraplines $(CFLAGS) -I"$(HDRS)" -I- -I"$(STDHDRS)" -o "$(<)" "$(>)" + mwcc -maxerrors 20 -maxwarnings 20 -c -warn on,nounusedexpr,nounused -cwd include -U$(UNDEFS) -D$(DEFINES) -nowraplines $(CFLAGS) -I- -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" } #### C++ #### @@ -113,7 +113,7 @@ rule C++-action actions metrowerks-C++-action { $(METROWERKS_SETUP) - mwcc -maxerrors 20 -maxwarnings 20 -c -warn on,nounusedexpr,nounused -cwd include -U$(UNDEFS) -D$(DEFINES) -DNOMINMAX -nowraplines -lang c++ $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I- -I"$(STDHDRS)" -o "$(<)" "$(>)" + mwcc -maxerrors 20 -maxwarnings 20 -c -warn on,nounusedexpr,nounused -cwd include -U$(UNDEFS) -D$(DEFINES) -DNOMINMAX -nowraplines -lang c++ $(CFLAGS) $(C++FLAGS) -I- -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" } #### Archive #### diff --git a/new/assert.jam b/new/assert.jam index 609094c9e..a8e25530b 100644 --- a/new/assert.jam +++ b/new/assert.jam @@ -61,7 +61,31 @@ rule true ( rule-name args * : * ) if ! $(result__) { error-skip-frames 3 assertion failure: expecting true result from - "[" $(rule-name) \"$(args)\" "]" ; + "[" $(rule-name) + [ lol->list $(args) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ] + "]" ; + } +} + +# assert that the result of calling RULE-NAME on the given arguments +# has a false logical value (is either an empty list or all empty +# strings). +rule false ( rule-name args * : * ) +{ + local result__ ; + module [ CALLER_MODULE ] + { + result__ = [ + $(rule-name) $(args) : $(2) $(3) : $(4) + : $(5) : $(6) : $(7) : $(8) : $(9) ] ; + } + + if $(result__) + { + error-skip-frames 3 assertion failure: expecting false result from + "[" $(rule-name) + [ lol->list $(args) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ] + "]" : got [ lol->list $(result__) ] instead ; } } diff --git a/new/errors.jam b/new/errors.jam index c3b44319f..fbff95218 100644 --- a/new/errors.jam +++ b/new/errors.jam @@ -25,7 +25,8 @@ rule backtrace ( skip-frames messages * : * ) local args = messages 2 3 4 5 6 7 8 9 ; while $(bt) { - ECHO $(bt[1]):$(bt[2]): "in" $(bt[4]) ; + local m = [ SUBST $(bt[3]) ^(.+)\\.$ $1 ] ; + ECHO $(bt[1]):$(bt[2]): "in" $(bt[4]) "from module" $(m) ; # the first time through, print each argument on a separate # line @@ -128,7 +129,7 @@ rule lol->list ( * ) { result += ":" ; } - result += \"$(n)\" ; + result += \"$($(n))\" ; } return $(result) ; } diff --git a/python.jam b/python.jam index 7d8622939..242c13826 100644 --- a/python.jam +++ b/python.jam @@ -50,8 +50,6 @@ if $(NT) GCC_PYTHON_ROOT ?= $(CYGWIN_ROOT)/usr/local ; GCC_PYTHON_ROOT ?= /usr/local ; - <*>$(GCC_PYTHON_ROOT)/lib/python$(PYTHON_VERSION)/config - <*>$(GCC_PYTHON_ROOT)/include/python$(PYTHON_VERSION) } else if $(UNIX) { diff --git a/v1/gcc-tools.jam b/v1/gcc-tools.jam index c92f238d2..fcb23e857 100644 --- a/v1/gcc-tools.jam +++ b/v1/gcc-tools.jam @@ -5,11 +5,11 @@ # to its suitability for any purpose. # compute directories for invoking GCC +local SPACE = " " ; GCC_BIN_DIRECTORY ?= $(GCC_ROOT_DIRECTORY)$(SLASH)bin$(SLASH) ; GCC_BIN_DIRECTORY ?= "" ; # Don't clobber tool names if GCC_ROOT_DIRECTORY not set GCC_INCLUDE_DIRECTORY ?= $(GCC_ROOT_DIRECTORY)$(SLASH)include ; GCC_STDLIB_DIRECTORY ?= $(GCC_ROOT_DIRECTORY)$(SLASH)lib ; -local SPACE ?= " " ; flags gcc LINKFLAGS static : -static ; flags gcc CFLAGS on : -g ; diff --git a/v1/metrowerks-tools.jam b/v1/metrowerks-tools.jam index e11733634..15e0b65f1 100644 --- a/v1/metrowerks-tools.jam +++ b/v1/metrowerks-tools.jam @@ -101,7 +101,7 @@ rule Cc-action actions metrowerks-Cc-action { $(METROWERKS_SETUP) - mwcc -maxerrors 20 -maxwarnings 20 -c -warn on,nounusedexpr,nounused -cwd include -U$(UNDEFS) -D$(DEFINES) -nowraplines $(CFLAGS) -I"$(HDRS)" -I- -I"$(STDHDRS)" -o "$(<)" "$(>)" + mwcc -maxerrors 20 -maxwarnings 20 -c -warn on,nounusedexpr,nounused -cwd include -U$(UNDEFS) -D$(DEFINES) -nowraplines $(CFLAGS) -I- -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" } #### C++ #### @@ -113,7 +113,7 @@ rule C++-action actions metrowerks-C++-action { $(METROWERKS_SETUP) - mwcc -maxerrors 20 -maxwarnings 20 -c -warn on,nounusedexpr,nounused -cwd include -U$(UNDEFS) -D$(DEFINES) -DNOMINMAX -nowraplines -lang c++ $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I- -I"$(STDHDRS)" -o "$(<)" "$(>)" + mwcc -maxerrors 20 -maxwarnings 20 -c -warn on,nounusedexpr,nounused -cwd include -U$(UNDEFS) -D$(DEFINES) -DNOMINMAX -nowraplines -lang c++ $(CFLAGS) $(C++FLAGS) -I- -I"$(HDRS)" -I"$(STDHDRS)" -o "$(<)" "$(>)" } #### Archive #### diff --git a/v1/python.jam b/v1/python.jam index 7d8622939..242c13826 100644 --- a/v1/python.jam +++ b/v1/python.jam @@ -50,8 +50,6 @@ if $(NT) GCC_PYTHON_ROOT ?= $(CYGWIN_ROOT)/usr/local ; GCC_PYTHON_ROOT ?= /usr/local ; - <*>$(GCC_PYTHON_ROOT)/lib/python$(PYTHON_VERSION)/config - <*>$(GCC_PYTHON_ROOT)/include/python$(PYTHON_VERSION) } else if $(UNIX) { diff --git a/v2/errors.jam b/v2/errors.jam index c3b44319f..fbff95218 100644 --- a/v2/errors.jam +++ b/v2/errors.jam @@ -25,7 +25,8 @@ rule backtrace ( skip-frames messages * : * ) local args = messages 2 3 4 5 6 7 8 9 ; while $(bt) { - ECHO $(bt[1]):$(bt[2]): "in" $(bt[4]) ; + local m = [ SUBST $(bt[3]) ^(.+)\\.$ $1 ] ; + ECHO $(bt[1]):$(bt[2]): "in" $(bt[4]) "from module" $(m) ; # the first time through, print each argument on a separate # line @@ -128,7 +129,7 @@ rule lol->list ( * ) { result += ":" ; } - result += \"$(n)\" ; + result += \"$($(n))\" ; } return $(result) ; } diff --git a/v2/util/assert.jam b/v2/util/assert.jam index 609094c9e..a8e25530b 100644 --- a/v2/util/assert.jam +++ b/v2/util/assert.jam @@ -61,7 +61,31 @@ rule true ( rule-name args * : * ) if ! $(result__) { error-skip-frames 3 assertion failure: expecting true result from - "[" $(rule-name) \"$(args)\" "]" ; + "[" $(rule-name) + [ lol->list $(args) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ] + "]" ; + } +} + +# assert that the result of calling RULE-NAME on the given arguments +# has a false logical value (is either an empty list or all empty +# strings). +rule false ( rule-name args * : * ) +{ + local result__ ; + module [ CALLER_MODULE ] + { + result__ = [ + $(rule-name) $(args) : $(2) $(3) : $(4) + : $(5) : $(6) : $(7) : $(8) : $(9) ] ; + } + + if $(result__) + { + error-skip-frames 3 assertion failure: expecting false result from + "[" $(rule-name) + [ lol->list $(args) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ] + "]" : got [ lol->list $(result__) ] instead ; } }