diff options
Diffstat (limited to 'tools/build/v2/test/dependency-test/foo.jam')
-rw-r--r-- | tools/build/v2/test/dependency-test/foo.jam | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/build/v2/test/dependency-test/foo.jam b/tools/build/v2/test/dependency-test/foo.jam new file mode 100644 index 0000000000..1cf44681da --- /dev/null +++ b/tools/build/v2/test/dependency-test/foo.jam @@ -0,0 +1,34 @@ +# Copyright 2003 Dave Abrahams +# Copyright 2002, 2003, 2005 Vladimir Prus +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +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) ; +} |