Ticket #4111: mc.jam

File mc.jam, 1.3 KB (added by anonymous, 8 years ago)
Line 
1#~ Copyright 2005 Alexey Pakhunov.
2#~ Distributed under the Boost Software License, Version 1.0.
3#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
4
5# Support for Microsoft message compiler tool.
6# Notes:
7# - there's just message compiler tool, there's no tool for
8# extracting message strings from sources
9# - This file allows to use Microsoft message compiler
10# with any toolset. In msvc.jam, there's more specific
11# message compiling action.
12
13import common ;
14import generators ;
15import feature : feature get-values ;
16import toolset : flags ;
17import type ;
18import rc ;
19
20rule init ( )
21{
22}
23
24type.register MC : mc ;
25
26
27# Command line options
28feature mc-input-encoding : ansi unicode : free ;
29feature mc-output-encoding : unicode ansi : free ;
30feature mc-set-customer-bit : no yes : free ;
31
32flags mc.compile MCFLAGS <mc-input-encoding>ansi : -a ;
33flags mc.compile MCFLAGS <mc-input-encoding>unicode : -u ;
34flags mc.compile MCFLAGS <mc-output-encoding>ansi : -A ;
35flags mc.compile MCFLAGS <mc-output-encoding>unicode : -U ;
36flags mc.compile MCFLAGS <mc-set-customer-bit>no : ;
37flags mc.compile MCFLAGS <mc-set-customer-bit>yes : -c ;
38
39generators.register-standard mc.compile : MC : H RC ;
40
41actions compile
42{
43 mc $(MCFLAGS) -h "$(<[1]:DW)" -r "$(<[2]:DW)" "$(>:W)"
44}