Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/tools/build/v2/test/dependency-test/foo.jam @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

File size: 875 bytes
Line 
1import type ;
2import generators ;
3import os ;
4import print ;
5
6type.register FOO : foo ;
7
8generators.register-standard foo.foo : FOO : CPP H ;
9
10rule foo ( targets * : sources * : properties * )
11{
12    # On NT, you need an exported symbol in order to have an import lib generated
13    if [ os.name ] = NT && <main-target-type>LIB in $(properties)
14    {
15        .decl =  "echo void __declspec(dllexport) foo(){}" ;
16    }
17    if [ modules.peek : OS ] in CYGWIN &&  <main-target-type>LIB in $(properties) && $toolset != gcc
18    {
19        .decl =  "echo 'void __declspec(dllexport) foo(){}'" ;
20    }
21
22
23    .decl1 on $(<) = $(.decl:E="echo //") ;
24   
25    # Further files must be touched also; NT doesn't have a touch command
26    local i = [ print.echo-cmd "#include <z.h>" ] ;
27    .decl2 on $(<) = "     
28    $(i) > " ;
29}
30
31actions foo
32{
33    $(.decl1) > $(<[1]) $(.decl2)$(<[2-])
34}
35
Note: See TracBrowser for help on using the repository browser.