diff --git a/autotests/folding/Jamroot.fold b/autotests/folding/Jamroot.fold --- a/autotests/folding/Jamroot.fold +++ b/autotests/folding/Jamroot.fold @@ -95,6 +95,9 @@ } a? 23 ; +local rule test ( a ) +{ +} rule example ( @@ -196,7 +199,6 @@ [ $(var) field1 : field2 : ... : fieldN ] [ on target $(var) field1 : field2 : ... : fieldN ] - local key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths" ; local values = [ W32_GETREGNAMES "$(key)\\$(subkey)" : values ] ; diff --git a/autotests/html/Jamroot.html b/autotests/html/Jamroot.html --- a/autotests/html/Jamroot.html +++ b/autotests/html/Jamroot.html @@ -18,12 +18,12 @@ exe app : app.cpp ../util/foo//bar ; exe important : main.cpp helpers/<link>static ; -exe b : [ glob *.cpp ] ; +exe b : [ glob *.cpp ] ; lib tools : - [ glob *.cpp ] ; + [ glob *.cpp ] ; -lib tools : [ glob *.cpp : file_to_exclude.cpp bad*.cpp ] ; +lib tools : [ glob *.cpp : file_to_exclude.cpp bad*.cpp ] ; lib network : network.cpp : <conditional>@my-rule @@ -44,7 +44,7 @@ <variant>debug:<location>dist/debug ; install dist2 : hello helpers : <location>$(DIST) ; -exe app : app.cpp : [ check-target-builds has_foo "System has foo" : <library>foo : <define>FOO_MISSING=1 ] ; +exe app : app.cpp : [ check-target-builds has_foo "System has foo" : <library>foo : <define>FOO_MISSING=1 ] ; import path : * ; @@ -101,6 +101,9 @@ } a? 23 ; +local rule test ( a ) +{ +} rule example ( @@ -118,26 +121,26 @@ rule my-rule ( properties * ) { - local result ; + local result ; if <toolset>gcc <optimization>speed in $(properties) { result += <define>USE_INLINE_ASSEMBLER ; return $(result) ; } - local m = [ CALLER_MODULE ] ; - local result ; + local m = [ CALLER_MODULE ] ; + local result ; for v in $(values) { - if [ modules.call-in $(m) : $(f) $(v) ] + if [ modules.call-in $(m) : $(f) $(v) ] { result += $(v) ; } } return result ; return <name>$(name) ; - return [ virtual-target.register $(t) ] ; - return [ sequence.transform virtual-target.register : $(targets) ] ; + return [ virtual-target.register $(t) ] ; + return [ sequence.transform virtual-target.register : $(targets) ] ; } rule run ( project name ? : property-set : sources * ) @@ -147,22 +150,22 @@ python = $(s) ; } - local new-sources ; + local new-sources ; for local s in $(sources) { - if [ type.is-derived [ $(s).type ] CPP ] + if [ type.is-derived [ $(s).type ] CPP ] { - local name = [ $(s).name ] ; # get the target's basename + local name = [ $(s).name ] ; # get the target's basename if $(name) = [ $(python).name ] { name = $(name)_ext ; # rename the target } - new-sources += [ generators.construct $(project) $(name) : + new-sources += [ generators.construct $(project) $(name) : PYTHON_EXTENSION : $(property-set) : $(s) $(libs) ] ; } } - result = [ construct-result $(python) $(new-sources) : $(project) $(name) + result = [ construct-result $(python) $(new-sources) : $(project) $(name) : $(property-set) ] ; } @@ -185,14 +188,14 @@ mypackage = - [ pkg-config.import mypackage : usage-requirements <conditional>@define_ns + [ pkg-config.import mypackage : usage-requirements <conditional>@define_ns ] ; -me = [ modules.binding $(__name__) ] ; +me = [ modules.binding $(__name__) ] ; -local ZLIB_INCLUDE = [ modules.peek : ZLIB_INCLUDE ] ; +local ZLIB_INCLUDE = [ modules.peek : ZLIB_INCLUDE ] ; -local t = [ new file-target $(name) : CPP : $(project) : $(a) ] ; +local t = [ new file-target $(name) : CPP : $(project) : $(a) ] ; $(var) field1 : field2 : ... : fieldN ; $(var)o aaaa ; @@ -202,9 +205,8 @@ [ $(var) field1 : field2 : ... : fieldN ] [ on target $(var) field1 : field2 : ... : fieldN ] - -local key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths" ; -local values = [ W32_GETREGNAMES "$(key)\\$(subkey)" : values ] ; +local key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths" ; +local values = [ W32_GETREGNAMES "$(key)\\$(subkey)" : values ] ; variable = $(b) $(c) ; variable += elements ; diff --git a/autotests/input/Jamroot b/autotests/input/Jamroot --- a/autotests/input/Jamroot +++ b/autotests/input/Jamroot @@ -95,6 +95,9 @@ } a? 23 ; +local rule test ( a ) +{ +} rule example ( @@ -196,7 +199,6 @@ [ $(var) field1 : field2 : ... : fieldN ] [ on target $(var) field1 : field2 : ... : fieldN ] - local key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths" ; local values = [ W32_GETREGNAMES "$(key)\\$(subkey)" : values ] ; diff --git a/autotests/reference/Jamroot.ref b/autotests/reference/Jamroot.ref --- a/autotests/reference/Jamroot.ref +++ b/autotests/reference/Jamroot.ref @@ -12,12 +12,12 @@ exe app : app.cpp ../util/foo//bar ;
exe important : main.cpp helpers/static ;

-exe b : [ glob *.cpp ] ;
+exe b : [ glob *.cpp ] ;

lib tools :
- [ glob *.cpp ] ;
+ [ glob *.cpp ] ;

-lib tools : [ glob *.cpp : file_to_exclude.cpp bad*.cpp ] ;
+lib tools : [ glob *.cpp : file_to_exclude.cpp bad*.cpp ] ;

lib network : network.cpp
: @my-rule
@@ -38,7 +38,7 @@ debug:dist/debug ;
install dist2 : hello helpers : $(DIST) ;

-exe app : app.cpp : [ check-target-builds has_foo "System has foo" : foo : FOO_MISSING=1 ] ;
+exe app : app.cpp : [ check-target-builds has_foo "System has foo" : foo : FOO_MISSING=1 ] ;

import path : * ;

@@ -95,6 +95,9 @@ }
a? 23 ;

+local rule test ( a )
+{
+}

rule example
(
@@ -112,26 +115,26 @@
rule my-rule ( properties * )
{
- local result ;
+ local result ;
if gcc speed in $(properties)
{
result += USE_INLINE_ASSEMBLER ;
return $(result) ;
}

- local m = [ CALLER_MODULE ] ;
- local result ;
+ local m = [ CALLER_MODULE ] ;
+ local result ;
for v in $(values)
{
- if [ modules.call-in $(m) : $(f) $(v) ]
+ if [ modules.call-in $(m) : $(f) $(v) ]
{
result += $(v) ;
}
}
return result ;
return $(name) ;
- return [ virtual-target.register $(t) ] ;
- return [ sequence.transform virtual-target.register : $(targets) ] ;
+ return [ virtual-target.register $(t) ] ;
+ return [ sequence.transform virtual-target.register : $(targets) ] ;
}

rule run ( project name ? : property-set : sources * )
@@ -141,22 +144,22 @@ python = $(s) ;
}

- local new-sources ;
+ local new-sources ;
for local s in $(sources)
{
- if [ type.is-derived [ $(s).type ] CPP ]
+ if [ type.is-derived [ $(s).type ] CPP ]
{
- local name = [ $(s).name ] ; # get the target's basename
+ local name = [ $(s).name ] ; # get the target's basename
if $(name) = [ $(python).name ]
{
name = $(name)_ext ; # rename the target
}
- new-sources += [ generators.construct $(project) $(name) :
+ new-sources += [ generators.construct $(project) $(name) :
PYTHON_EXTENSION : $(property-set) : $(s) $(libs) ] ;
}
}

- result = [ construct-result $(python) $(new-sources) : $(project) $(name)
+ result = [ construct-result $(python) $(new-sources) : $(project) $(name)
: $(property-set) ] ;
}

@@ -179,14 +182,14 @@

mypackage =
- [ pkg-config.import mypackage : usage-requirements @define_ns
+ [ pkg-config.import mypackage : usage-requirements @define_ns
] ;

-me = [ modules.binding $(__name__) ] ;
+me = [ modules.binding $(__name__) ] ;

-local ZLIB_INCLUDE = [ modules.peek : ZLIB_INCLUDE ] ;
+local ZLIB_INCLUDE = [ modules.peek : ZLIB_INCLUDE ] ;

-local t = [ new file-target $(name) : CPP : $(project) : $(a) ] ;
+local t = [ new file-target $(name) : CPP : $(project) : $(a) ] ;

$(var) field1 : field2 : ... : fieldN ;
$(var)o aaaa ;
@@ -196,9 +199,8 @@ [ $(var) field1 : field2 : ... : fieldN ]
[ on target $(var) field1 : field2 : ... : fieldN ]

-
-local key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths" ;
-local values = [ W32_GETREGNAMES "$(key)\\$(subkey)" : values ] ;
+local key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths" ;
+local values = [ W32_GETREGNAMES "$(key)\\$(subkey)" : values ] ;

variable = $(b) $(c) ;
variable += elements ;
diff --git a/data/syntax/jam.xml b/data/syntax/jam.xml --- a/data/syntax/jam.xml +++ b/data/syntax/jam.xml @@ -24,7 +24,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --> - + break continue else - local if @@ -226,6 +229,7 @@ + @@ -364,12 +368,16 @@ - + + + + + + - @@ -480,6 +488,21 @@ + + + + + + + + + + + + + + +