File: foo.jam

package info (click to toggle)
boost-build 2.0-m11-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,624 kB
  • ctags: 2,387
  • sloc: ansic: 12,978; python: 5,209; xml: 4,782; cpp: 555; yacc: 456; sh: 237; makefile: 71
file content (29 lines) | stat: -rw-r--r-- 697 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import type ;
import generators ;
import os ;
import print ;

type.register FOO : foo ;

generators.register-standard foo.foo : FOO : CPP H ;

nl = "
" ;

rule foo ( targets * : sources * : properties * )
{
    # On NT, you need an exported symbol in order to have an 
    # import lib generated
    # We won't really use the symbol defined here, just force
    # lib creation.
    if ( [ os.name ] = NT || [ modules.peek : OS ] in CYGWIN )
        && <main-target-type>LIB in $(properties)
    {
        .decl =  "void __declspec(dllexport) foo(){}" ;
    }
    
    print.output $(<[1]) ;
    print.text $(.decl:E="//")$(nl) ;
    print.output $(<[2]) ;
    print.text "#include <z.h>"$(nl) ;
}