diff --git a/new/msvc.jam b/new/msvc.jam index 3823a8a6a..4caf4cc95 100755 --- a/new/msvc.jam +++ b/new/msvc.jam @@ -14,22 +14,26 @@ feature.extend toolset : msvc ; feature.subfeature toolset msvc : vendor : intel - : optional propagated + : propagated optional # intel and msvc supposedly have link-compatible objects... remains # to be seen, though ;-) ; -feature.subfeature toolset msvc : version - : # 6 7 7.1 # known subvalues - : optional propagated implicit + feature.subfeature toolset msvc : version + : # 6 7 7.1 # known subvalues + : propagated implicit + + # versions of msvc are link-compatible + # link-incompatible + ; - # versions of msvc are link-compatible - # link-incompatible - ; +.version-configured = ; +.versionless-configured = ; # Initialize the toolset -rule init ( version ? path ? : vendor ? : setup ? compiler ? linker ? ) +rule init ( version ? : path ? : vendor ? : setup ? compiler ? linker ? ) { + version ?= unspecified ; feature.extend-subfeature toolset msvc : version : $(version) ; if $(vendor) && ( $(vendor) != intel ) @@ -39,7 +43,9 @@ rule init ( version ? path ? : vendor ? : setup ? compiler ? linker ? ) vendor = $(vendor)- ; vendor ?= "" ; - local condition = msvc-$(vendor)$(version) ; + local condition = -$(vendor)$(version) ; + condition ?= "" ; + condition = msvc$(condition) ; # setup will be used iff a path has been specified. If setup is # not specified, vcvars32.bat will be used instead. @@ -56,7 +62,7 @@ rule init ( version ? path ? : vendor ? : setup ? compiler ? linker ? ) # look for the setup program in both the system PATH and in # its default installation location based on version - local env-PATH = [ modules.peek : PATH ] ; + local env-PATH = [ modules.peek : PATH Path path ] ; local PATH-setup = [ GLOB $(env-PATH) : $(setup) ] ; local default-setup = [ GLOB $(default-path)\\bin : $(setup) ] ; @@ -68,9 +74,10 @@ rule init ( version ? path ? : vendor ? : setup ? compiler ? linker ? ) compiler = $(compiler) ; if ! [ GLOB $(path)\\bin $(env-PATH) : $(compiler:E=CL).exe ] { - error $(condition) initialization: : + error toolset msvc $(vendor) $(version) initialization: : couldn't find compiler \"$(compiler:E=CL)\" in PATH or "known default" - installation location \"$(default-path)\\BIN\" ; + installation location \"$(default-path)\\BIN\" + : PATH= \"$(env-PATH)\" ; } } @@ -136,6 +143,8 @@ flags msvc.compile DEFINES ; flags msvc.compile UNDEFS ; flags msvc.compile INCLUDES ; +flags msvc WHATEVER ; + actions compile { $(.CC) /Zm800 -nologo -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(USER_CFLAGS) -I"$(INCLUDES)" -c -Fo"$(<)" "$(>)" diff --git a/new/toolset.jam b/new/toolset.jam index 3ac35a3bb..a7362a416 100644 --- a/new/toolset.jam +++ b/new/toolset.jam @@ -85,8 +85,9 @@ rule flags ( rule-or-module # If contains dot, should be a rule name. property.validate-property-sets $(condition) ; if ! $(values) { - error empty value set used with property-set match criterion: - : $(condition) ; + # I don't think I like this test anymore. +# error empty value set used with property-set match criterion: +# : \"$(condition)\" ; } condition = [ normalize-condition $(condition) ] ; } @@ -101,7 +102,9 @@ rule flags ( rule-or-module # If contains dot, should be a rule name. else { match-type += unconditional ; - if ! $(values) + + # I don't like this condition anymore + if ! $(values)-is-nonempty { error empty value set used with unconditional match criterion ; } diff --git a/v2/build/toolset.jam b/v2/build/toolset.jam index 3ac35a3bb..a7362a416 100644 --- a/v2/build/toolset.jam +++ b/v2/build/toolset.jam @@ -85,8 +85,9 @@ rule flags ( rule-or-module # If contains dot, should be a rule name. property.validate-property-sets $(condition) ; if ! $(values) { - error empty value set used with property-set match criterion: - : $(condition) ; + # I don't think I like this test anymore. +# error empty value set used with property-set match criterion: +# : \"$(condition)\" ; } condition = [ normalize-condition $(condition) ] ; } @@ -101,7 +102,9 @@ rule flags ( rule-or-module # If contains dot, should be a rule name. else { match-type += unconditional ; - if ! $(values) + + # I don't like this condition anymore + if ! $(values)-is-nonempty { error empty value set used with unconditional match criterion ; } diff --git a/v2/msvc.jam b/v2/msvc.jam index 3823a8a6a..4caf4cc95 100755 --- a/v2/msvc.jam +++ b/v2/msvc.jam @@ -14,22 +14,26 @@ feature.extend toolset : msvc ; feature.subfeature toolset msvc : vendor : intel - : optional propagated + : propagated optional # intel and msvc supposedly have link-compatible objects... remains # to be seen, though ;-) ; -feature.subfeature toolset msvc : version - : # 6 7 7.1 # known subvalues - : optional propagated implicit + feature.subfeature toolset msvc : version + : # 6 7 7.1 # known subvalues + : propagated implicit + + # versions of msvc are link-compatible + # link-incompatible + ; - # versions of msvc are link-compatible - # link-incompatible - ; +.version-configured = ; +.versionless-configured = ; # Initialize the toolset -rule init ( version ? path ? : vendor ? : setup ? compiler ? linker ? ) +rule init ( version ? : path ? : vendor ? : setup ? compiler ? linker ? ) { + version ?= unspecified ; feature.extend-subfeature toolset msvc : version : $(version) ; if $(vendor) && ( $(vendor) != intel ) @@ -39,7 +43,9 @@ rule init ( version ? path ? : vendor ? : setup ? compiler ? linker ? ) vendor = $(vendor)- ; vendor ?= "" ; - local condition = msvc-$(vendor)$(version) ; + local condition = -$(vendor)$(version) ; + condition ?= "" ; + condition = msvc$(condition) ; # setup will be used iff a path has been specified. If setup is # not specified, vcvars32.bat will be used instead. @@ -56,7 +62,7 @@ rule init ( version ? path ? : vendor ? : setup ? compiler ? linker ? ) # look for the setup program in both the system PATH and in # its default installation location based on version - local env-PATH = [ modules.peek : PATH ] ; + local env-PATH = [ modules.peek : PATH Path path ] ; local PATH-setup = [ GLOB $(env-PATH) : $(setup) ] ; local default-setup = [ GLOB $(default-path)\\bin : $(setup) ] ; @@ -68,9 +74,10 @@ rule init ( version ? path ? : vendor ? : setup ? compiler ? linker ? ) compiler = $(compiler) ; if ! [ GLOB $(path)\\bin $(env-PATH) : $(compiler:E=CL).exe ] { - error $(condition) initialization: : + error toolset msvc $(vendor) $(version) initialization: : couldn't find compiler \"$(compiler:E=CL)\" in PATH or "known default" - installation location \"$(default-path)\\BIN\" ; + installation location \"$(default-path)\\BIN\" + : PATH= \"$(env-PATH)\" ; } } @@ -136,6 +143,8 @@ flags msvc.compile DEFINES ; flags msvc.compile UNDEFS ; flags msvc.compile INCLUDES ; +flags msvc WHATEVER ; + actions compile { $(.CC) /Zm800 -nologo -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(USER_CFLAGS) -I"$(INCLUDES)" -c -Fo"$(<)" "$(>)"