aboutsummaryrefslogtreecommitdiff
path: root/mod/buildfile
blob: 616302c7f765edfa1ce97b90e8a4c49dcd8f7c87 (plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# file      : mod/buildfile
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

define mod: libs
mod{*}: bin.lib.prefix = mod_
mod{*}: install = libexec/

# While we don't need to link to APR, we need to find its header location.
#
import libs  = libapr1%lib{apr-1}
import libs += libstudxml%lib{studxml}
import libs += libodb%lib{odb}
import libs += libodb-pgsql%lib{odb-pgsql}
import libs += libbutl%lib{butl}
import libs += libbpkg%lib{bpkg}
import libs += libbbot%lib{bbot}

include ../libbrep/

mod{brep}:                                                     \
              {hxx         cxx}{ build-config                } \
              {hxx         cxx}{ database                    } \
              {hxx         cxx}{ database-module             } \
              {hxx         cxx}{ diagnostics                 } \
              {hxx         cxx}{ mod-build-force             } \
              {hxx         cxx}{ mod-build-log               } \
              {hxx         cxx}{ mod-build-result            } \
              {hxx         cxx}{ mod-build-task              } \
              {hxx         cxx}{ mod-builds                  } \
              {hxx         cxx}{ mod-package-details         } \
              {hxx         cxx}{ mod-package-search          } \
              {hxx         cxx}{ mod-package-version-details } \
              {hxx         cxx}{ mod-repository-details      } \
              {hxx         cxx}{ mod-repository-root         } \
              {hxx         cxx}{ module                      } \
              {hxx ixx     cxx}{ options                     } \
              {hxx            }{ options-types               } \
              {hxx         cxx}{ page                        } \
              {            cxx}{ services                    } \
              {hxx         cxx}{ types-parsers               } \
       ../web/{hxx         cxx}{ mime-url-encoding           } \
       ../web/{hxx            }{ module                      } \
       ../web/{hxx            }{ version                     } \
       ../web/{hxx            }{ xhtml                       } \
       ../web/{hxx         cxx}{ xhtml-fragment              } \
../web/apache/{hxx            }{ log                         } \
../web/apache/{hxx ixx     cxx}{ request                     } \
../web/apache/{hxx     txx cxx}{ service                     } \
../web/apache/{hxx            }{ stream                      } \
../libbrep/lib{brep} $libs

../web/hxx{version}: ../web/in{version} $src_root/file{manifest}
../web/hxx{version}: dist = true

# Don't install any of the module's headers.
#
{hxx ixx txx}{*}: install = false
../web/{hxx ixx txx}{*}: install = false

# Generated options parser.
#
if $cli.configured
{
  cli.cxx{options}: cli{options}

  # Set option prefix to the empty value to handle all unknown request
  # parameters uniformly with a single catch block.
  #
  cli.options += --std c++11 -I $src_root --include-with-brackets  \
--include-prefix mod --guard-prefix MOD --generate-specifier       \
--cxx-prologue "#include <mod/types-parsers.hxx>"                  \
--cli-namespace brep::cli --generate-file-scanner --suppress-usage \
--generate-modifier --generate-description --option-prefix ""

  # Include generated cli files into the distribution.
  #
  cli.cxx{options}: dist = true
}