|
Boost-Build : |
From: Alexey Pakhunov (alexeypa_at_[hidden])
Date: 2005-11-12 08:24:36
Reece Dunn wrote:
> NOTE: It may be better for this and the MIDL patch to have the
> compile.idl and compile.mc actions just after the compiler.rc action so
> that all the compile actions are grouped together.
A good idea.
Best regards/Venlig hilsen,
Alexey Pakhunov.
#~ Copyright 2005 Alexey Pakhunov.
#~ Distributed under the Boost Software License, Version 1.0.
#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
import common ;
import generators ;
import feature : feature get-values ;
import toolset : flags ;
import type ;
import rc ;
rule init ( )
{
}
type.register MC : mc ;
# Command line options
feature mc-input-encoding : ansi unicode : free ;
feature mc-output-encoding : unicode ansi : free ;
feature mc-set-customer-bit : no yes : free ;
flags mc.compile MCFLAGS <mc-input-encoding>ansi : -a ;
flags mc.compile MCFLAGS <mc-input-encoding>unicode : -u ;
flags mc.compile MCFLAGS <mc-output-encoding>ansi : -A ;
flags mc.compile MCFLAGS <mc-output-encoding>unicode : -U ;
flags mc.compile MCFLAGS <mc-set-customer-bit>no : ;
flags mc.compile MCFLAGS <mc-set-customer-bit>yes : -c ;
generators.register-standard mc.compile : MC : H RC ;
actions compile
{
mc $(MCFLAGS) -h "$(<[1]:DW)" -r "$(<[2]:DW)" "$(>:W)"
}
Index: msvc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/msvc.jam,v
retrieving revision 1.63
diff -u -r1.63 msvc.jam
--- msvc.jam 9 Nov 2005 13:56:41 -0000 1.63
+++ msvc.jam 12 Nov 2005 13:22:26 -0000
@@ -18,6 +18,7 @@
import common ;
import "class" : new ;
import rc ;
+import mc ;
if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
{
@@ -36,6 +37,9 @@
# List of all registered configurations
.versions = [ new configurations ] ;
+# Inherit MC flags
+toolset.inherit-flags msvc : mc ;
+
RM = [ common.rm-command ] ;
nl = "
" ;
@@ -321,6 +325,9 @@
assembler = [ get-values <assembler> : $(options) ] ;
assembler ?= ml ;
+ mc-compiler = [ get-values <mc-compiler> : $(options) ] ;
+ mc-compiler ?= mc ;
+
for local i in 1 2 3
{
@@ -342,6 +349,7 @@
flags msvc.compile .ASM $(cond) : $(command[$(i)])$(assembler) ;
flags msvc.link .LD $(cond) : $(command[$(i)])$(linker) ;
flags msvc.archive .LD $(cond) : $(command[$(i)])$(linker) ;
+ flags msvc.compile .MC $(cond) : $(command[$(i)])$(mc-compiler) ;
}
}
@@ -487,6 +495,9 @@
generators.override msvc.compile.rc : rc.resource-compile ;
generators.register-standard msvc.compile.asm : ASM : OBJ : <toolset>msvc ;
+generators.register-standard msvc.compile.mc : MC : H RC : <toolset>msvc ;
+generators.override msvc.compile.mc : mc.compile ;
+
#
# Declare flags and action for compilation
#
@@ -553,6 +564,11 @@
$(.RC) -l 0x409 -U$(UNDEFS) -D$(DEFINES) -I"$(INCLUDES)" -fo "$(<:W)" "$(>:W)"
}
+actions compile.mc
+{
+ $(.MC) $(MCFLAGS) -h "$(<[1]:DW)" -r "$(<[2]:DW)" "$(>:W)"
+}
+
# Declare flags and action for the assembler
flags msvc.compile.asm USER_ASMFLAGS <asmflags> : ;
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk