# file : build2/buildfile # copyright : Copyright (c) 2014-2016 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file import libs = libbutl%lib{butl} exe{b}: \ {hxx ixx txx cxx}{ algorithm } \ { cxx}{ b } \ {hxx ixx cxx}{ b-options } \ {hxx txx cxx}{ context } \ {hxx cxx}{ diagnostics } \ {hxx cxx}{ dump } \ {hxx ixx cxx}{ file } \ {hxx cxx}{ lexer } \ {hxx cxx}{ module } \ {hxx cxx}{ name } \ {hxx cxx}{ operation } \ {hxx cxx}{ parser } \ {hxx cxx}{ path-io } \ {hxx cxx}{ prerequisite } \ {hxx cxx}{ rule } \ {hxx }{ rule-map } \ {hxx cxx}{ scope } \ {hxx cxx}{ search } \ {hxx cxx}{ spec } \ {hxx ixx txx cxx}{ target } \ {hxx }{ target-key } \ {hxx }{ target-type } \ {hxx cxx}{ token } \ {hxx }{ types } \ {hxx cxx}{ utility } \ {hxx ixx txx cxx}{ variable } \ {hxx }{ version } \ bin/{hxx cxx}{ module } \ bin/{hxx cxx}{ rule } \ bin/{hxx cxx}{ target } \ cli/{hxx cxx}{ module } \ cli/{hxx cxx}{ rule } \ cli/{hxx cxx}{ target } \ config/{hxx cxx}{ module } \ config/{hxx cxx}{ operation } \ config/{hxx ixx txx cxx}{ utility } \ cxx/{hxx cxx}{ compile } \ cxx/{hxx cxx}{ install } \ cxx/{hxx cxx}{ link } \ cxx/{hxx cxx}{ module } \ cxx/{hxx cxx}{ target } \ cxx/{hxx txx cxx}{ utility } \ dist/{hxx cxx}{ module } \ dist/{hxx cxx}{ operation } \ dist/{hxx cxx}{ rule } \ install/{hxx cxx}{ module } \ install/{hxx cxx}{ operation } \ install/{hxx cxx}{ rule } \ install/{hxx }{ utility } \ test/{hxx cxx}{ module } \ test/{hxx cxx}{ operation } \ test/{hxx cxx}{ rule } \ $libs # Load the cli module but only if it's available. This way a distribution # that includes pre-generated files can be built without installing cli. # This is also the reason why above we explicitly spelled out individual # source files instead of using the cli.cxx{} group (it won't be there # unless the module is loaded). # using? cli if! $cli.loaded { define cli: file cli{*}: extension = cli } {hxx ixx cxx}{b-options}: cli{b} cli.options += -I $src_root --include-with-brackets --include-prefix build2 \ --guard-prefix BUILD2 --cli-namespace build2::cl --generate-file-scanner \ --generate-specifier # Usage options. # cli.options += --suppress-undocumented --long-usage --ansi-color \ --page-usage 'build2::print_$name$_' --option-length 20 # Include generated cli files into the distribution. # hxx{*-options}: dist = true ixx{*-options}: dist = true cxx{*-options}: dist = true