Update of /cvsroot/boost/boost/tools/build/v2/tools
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23139
Modified Files:
msvc.jam
Log Message:
* msvc.jam (msvc-pch-generator.run-pch): Accept
any number of sources. Don't error out if no .cpp
file found in sources.
(compile-c-c++-pch-s): Copied from compile-c-c++-pch.
(compile-c-c++-pch): Generate temporary .cpp file.
(compile.c.pch): Forward to compile-c-c++-pch-s or
compile-c-c++-pch depending on presense of PCH_SOURCE.
(compile.c++.pch): Likewise.
Index: msvc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/msvc.jam,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- msvc.jam 14 Oct 2006 08:26:13 -0000 1.91
+++ msvc.jam 23 Oct 2006 18:17:44 -0000 1.92
@@ -543,10 +543,9 @@
{
import property-set ;
- rule run-pch ( project name ? : property-set : source-1 source-2 )
+ rule run-pch ( project name ? : property-set : sources * )
{
# searching header and source file in the sources
- local sources = $(source-1) $(source-2) ;
local pch-header ;
local pch-source ;
for local s in $(sources)
@@ -568,10 +567,8 @@
errors.user-error "can't build pch without pch-header" ;
}
- if ! $(pch-source)
- {
- errors.user-error "can't build pch without pch-source" ;
- }
+ # If we don't have PCH source, it's fine, we'll
+ # create temporary .cpp file in the action.
local generated =
[
@@ -695,26 +692,51 @@
compile-c-c++ $(<) : $(>) [ on $(<) return $(PCH_FILE) ] [ on $(<) return
$(PCH_HEADER) ] ;
}
-actions compile-c-c++-pch
+actions compile-c-c++-pch-s
{
$(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)"
-Yl"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))"
}
+# Needed only to avoid messing up Emacs syntax highlighting in
+# the messing N-quoted code below.
+quote = "\"" ;
+
+actions compile-c-c++-pch
+{
+ $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)"
-Yl"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))"
"@($(<[1]:W).cpp:E=#include $(quote)$(>[1]:D)$(quote))"
+}
+
rule compile.c.pch ( targets + : sources * : properties * )
{
C++FLAGS on $(targets[1]) = ;
- DEPENDS $(<) : [ on $(<) return $(PCH_SOURCE) ] ;
get-rspline $(targets[1]) : -TC ;
get-rspline $(targets[2]) : -TC ;
- compile-c-c++-pch $(targets) : $(sources) [ on $(<) return $(PCH_SOURCE) ]
;
+ local pch-source = [ on $(<) return $(PCH_SOURCE) ] ;
+ if $(pch-source)
+ {
+ DEPENDS $(<) : $(pch-source) ;
+ compile-c-c++-pch-s $(targets) : $(sources) $(pch-source) ;
+ }
+ else
+ {
+ compile-c-c++-pch $(targets) : $(sources) ;
+ }
}
rule compile.c++.pch ( targets + : sources * : properties * )
{
- DEPENDS $(<) : [ on $(<) return $(PCH_SOURCE) ] ;
- get-rspline $(targets[1]) : -TP ;
- get-rspline $(targets[2]) : -TP ;
- compile-c-c++-pch $(targets) : $(sources) [ on $(<) return $(PCH_SOURCE) ]
;
+ get-rspline $(targets[1]) : -TC ;
+ get-rspline $(targets[2]) : -TC ;
+ local pch-source = [ on $(<) return $(PCH_SOURCE) ] ;
+ if $(pch-source)
+ {
+ DEPENDS $(<) : $(pch-source) ;
+ compile-c-c++-pch-s $(targets) : $(sources) $(pch-source) ;
+ }
+ else
+ {
+ compile-c-c++-pch $(targets) : $(sources) ;
+ }
}
actions compile.rc
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs