summaryrefslogtreecommitdiff
path: root/buildfile
blob: d664cc36ffaf618664010fe2bb562a70ea6282be (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
# file      : buildfile
# copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC
# license   : MIT; see accompanying LICENSE file

d = cli/ unit-tests/

# Building examples/ and tests/ while bootstrapping the compiler is tricky.
# What we are going to do is omit these two directories if there is no cli
# compiler yet. Once it's built the user can reconfigure the project which
# will enable tests and examples. Alternatively, the user can install the
# compiler and test the installation with out-of-tree builds of tests/ and
# examples/.
#
# Note that to make sure we don't pick up some system-installed cli, we
# default (in bootstrap.build) to leaving the cli module unconfigured.
#
# Also note that creating distribution with the cli module unconfigured, you
# will end up with incomplete distribution directory (without tests, examples
# and options.cli file).
#
if $cli.configured
  d += tests/ examples/

./: $d doc{INSTALL LICENSE NEWS README version} file{manifest}

# The version file is auto-generated (by the version module) from manifest.
# Include it in distribution and don't remove when cleaning in src (so that
# clean results in a state identical to distributed).
#
doc{version}: file{manifest}
doc{version}: dist  = true
doc{version}: clean = ($src_root != $out_root)

# Don't install examples, tests or the INSTALL file.
#
dir{examples/}:   install = false
dir{tests/}:      install = false
dir{unit-tests/}: install = false
doc{INSTALL}@./:  install = false