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 |
|
---|
13 | import common ;
|
---|
14 | import generators ;
|
---|
15 | import feature : feature get-values ;
|
---|
16 | import toolset : flags ;
|
---|
17 | import type ;
|
---|
18 | import rc ;
|
---|
19 |
|
---|
20 | rule init ( )
|
---|
21 | {
|
---|
22 | }
|
---|
23 |
|
---|
24 | type.register MC : mc ;
|
---|
25 |
|
---|
26 |
|
---|
27 | # Command line options
|
---|
28 | feature mc-input-encoding : ansi unicode : free ;
|
---|
29 | feature mc-output-encoding : unicode ansi : free ;
|
---|
30 | feature mc-set-customer-bit : no yes : free ;
|
---|
31 |
|
---|
32 | flags mc.compile MCFLAGS <mc-input-encoding>ansi : -a ;
|
---|
33 | flags mc.compile MCFLAGS <mc-input-encoding>unicode : -u ;
|
---|
34 | flags mc.compile MCFLAGS <mc-output-encoding>ansi : -A ;
|
---|
35 | flags mc.compile MCFLAGS <mc-output-encoding>unicode : -U ;
|
---|
36 | flags mc.compile MCFLAGS <mc-set-customer-bit>no : ;
|
---|
37 | flags mc.compile MCFLAGS <mc-set-customer-bit>yes : -c ;
|
---|
38 |
|
---|
39 | generators.register-standard mc.compile : MC : H RC ;
|
---|
40 |
|
---|
41 | actions compile
|
---|
42 | {
|
---|
43 | mc $(MCFLAGS) -h "$(<[1]:DW)" -r "$(<[2]:DW)" "$(>:W)"
|
---|
44 | }
|
---|