summaryrefslogtreecommitdiff
path: root/buildfile
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-11-17 01:35:29 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-11-22 18:52:21 +0300
commitd52c1fb406b1cef82c5f5a28fc1804d7d99a49d8 (patch)
tree89236d3dcdf6245c75d761fde09040d9d2a56480 /buildfile
parentbe3dc4cee63da92cfa1fa44a0bf90ab11ec7aaca (diff)
Add support for build2 for tests and examples
Diffstat (limited to 'buildfile')
-rw-r--r--buildfile24
1 files changed, 20 insertions, 4 deletions
diff --git a/buildfile b/buildfile
index a4a8411..2cf31c3 100644
--- a/buildfile
+++ b/buildfile
@@ -2,11 +2,27 @@
# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
# license : MIT; see accompanying LICENSE file
-d = cli/
+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/.
+#
+# @@ A problem with this approach is an old cli compiler installed in the
+# system -- it will be used for the project including tests and examples.
+#
+if $cli.configured
+ d += tests/ examples/
+
./: $d doc{INSTALL LICENSE NEWS README version} file{manifest}
include $d
-# Don't install tests or the INSTALL file.
+# Don't install examples, tests or the INSTALL file.
#
-dir{tests/}: install = false
-doc{INSTALL}@./: install = false
+dir{examples/}: install = false
+dir{tests/}: install = false
+dir{unit-tests/}: install = false
+doc{INSTALL}@./: install = false