Boost logo

Boost-Build :

From: Alexey Pakhunov (alexeypa_at_[hidden])
Date: 2005-11-11 12:36:38


Hi All,

I don't have anything special to say. It is a plain rule invoking
'mc.exe' and several mc-related features. This patch has been working
for me for quite a while.

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)"
}


? cvs.log
? mc.jam
? mc_support.diff
? midl.jam
? midl_mc
? midl_support.diff
? msplatformsdk.jam
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 11 Nov 2005 17:25:19 -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
 #
@@ -661,6 +672,11 @@
     $(MANIFEST)$(<[1]).manifest $(OUTPUTRESOURCE)$(<[1]);#2
 }
 
+actions compile.mc
+{
+ $(.MC) $(MCFLAGS) -h "$(<[1]:DW)" -r "$(<[2]:DW)" "$(>:W)"
+}
+
 
 #
 # Autodetection code


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