Imported Upstream version 1.51.0
[platform/upstream/boost.git] / tools / build / example / built_tool / core / Jamfile.jam
1
2 import toolset ;
3
4 project : requirements <tblgen>../tblgen//tblgen ;
5
6
7 # Create a.c using a custom action defined below.
8 make a.c : a.td : @tblgen ;
9
10 # Use a.c in executable.
11 exe core : core.cpp a.c ;
12
13 # The action has to invoke the tool built in other
14 # parts of the project. The <tblgen> feature is used
15 # to specify the location of the tool, and the flags
16 # statement below make the full path to the tool
17 # available inside the action.
18 toolset.flags tblgen COMMAND <tblgen> ;
19
20 # We generally want a.c to be rebuilt when the tool changes.
21 rule tblgen ( targets * : sources * : properties * )
22 {
23     DEPENDS $(targets) : [ on $(targets) return $(COMMAND) ] ;
24 }
25
26 # The action that invokes the tool
27 actions tblgen bind COMMAND
28 {
29     $(COMMAND:E=tblgen) > $(<)
30 }