aboutsummaryrefslogtreecommitdiff
path: root/tests/amalgam/unnamed
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-11 13:08:53 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-11 13:08:53 +0200
commita7362cf29a76ef679c9a1ce74715a5d087851b91 (patch)
treeb26ff0e7f59ca47e5d4f1c84f5c7ab99c2beca44 /tests/amalgam/unnamed
parentf57f97a7fde4ebe69c160530d61fcd958aac0cf3 (diff)
Add support for unnamed projects
Sometimes (e.g., in bpkg configuration) we don't have a project name. In fact, it is not really a project; it can never be referenced in an import directive. So we now have a notion of an unnamed project. Such a project should still have the 'project' variable set first thing in bootstrap.build but its value should be empty. Note that we can still amalgamate such projects just liked named ones.
Diffstat (limited to 'tests/amalgam/unnamed')
-rw-r--r--tests/amalgam/unnamed/build/bootstrap.build3
-rw-r--r--tests/amalgam/unnamed/buildfile3
-rw-r--r--tests/amalgam/unnamed/sub/build/bootstrap.build2
-rw-r--r--tests/amalgam/unnamed/sub/buildfile2
-rw-r--r--tests/amalgam/unnamed/test.out2
-rwxr-xr-xtests/amalgam/unnamed/test.sh3
6 files changed, 15 insertions, 0 deletions
diff --git a/tests/amalgam/unnamed/build/bootstrap.build b/tests/amalgam/unnamed/build/bootstrap.build
new file mode 100644
index 0000000..30065f4
--- /dev/null
+++ b/tests/amalgam/unnamed/build/bootstrap.build
@@ -0,0 +1,3 @@
+project = amalgam-unnamed
+amalgamation = # Disabled.
+using config
diff --git a/tests/amalgam/unnamed/buildfile b/tests/amalgam/unnamed/buildfile
new file mode 100644
index 0000000..5aa12c3
--- /dev/null
+++ b/tests/amalgam/unnamed/buildfile
@@ -0,0 +1,3 @@
+.: sub/
+include sub/
+print $subprojects
diff --git a/tests/amalgam/unnamed/sub/build/bootstrap.build b/tests/amalgam/unnamed/sub/build/bootstrap.build
new file mode 100644
index 0000000..ce3735a
--- /dev/null
+++ b/tests/amalgam/unnamed/sub/build/bootstrap.build
@@ -0,0 +1,2 @@
+project =
+using config
diff --git a/tests/amalgam/unnamed/sub/buildfile b/tests/amalgam/unnamed/sub/buildfile
new file mode 100644
index 0000000..8717375
--- /dev/null
+++ b/tests/amalgam/unnamed/sub/buildfile
@@ -0,0 +1,2 @@
+./:
+print "'$project'"
diff --git a/tests/amalgam/unnamed/test.out b/tests/amalgam/unnamed/test.out
new file mode 100644
index 0000000..1738349
--- /dev/null
+++ b/tests/amalgam/unnamed/test.out
@@ -0,0 +1,2 @@
+''
+sub/=sub/
diff --git a/tests/amalgam/unnamed/test.sh b/tests/amalgam/unnamed/test.sh
new file mode 100755
index 0000000..b898b3c
--- /dev/null
+++ b/tests/amalgam/unnamed/test.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+valgrind -q b -q | diff -u test.out -