aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/b.cxx10
-rw-r--r--build2/buildfile8
2 files changed, 15 insertions, 3 deletions
diff --git a/build2/b.cxx b/build2/b.cxx
index 2917ad1..eafa1dc 100644
--- a/build2/b.cxx
+++ b/build2/b.cxx
@@ -442,9 +442,13 @@ main (int argc, char* argv[])
{
cout << "build2 " << LIBBUILD2_VERSION_ID << endl
<< "libbutl " << LIBBUTL_VERSION_ID << endl
- << "host " << BUILD2_HOST_TRIPLET << endl
- << "Copyright (c) 2014-2019 Code Synthesis Ltd" << endl
- << "This is free software released under the MIT license." << endl;
+ << "host " << BUILD2_HOST_TRIPLET << endl;
+
+#ifndef BUILD2_BOOTSTRAP
+ cout << "Copyright (c) " << BUILD2_COPYRIGHT << "." << endl;
+#endif
+
+ cout << "This is free software released under the MIT license." << endl;
return 0;
}
diff --git a/build2/buildfile b/build2/buildfile
index da32525..bfd68cb 100644
--- a/build2/buildfile
+++ b/build2/buildfile
@@ -20,6 +20,14 @@ exe{b}: {hxx ixx txx cxx}{** -b-options} {hxx ixx cxx}{b-options} $libs
#
obj{b}: cxx.poptions += -DBUILD2_HOST_TRIPLET=\"$cxx.target\"
+# Pass the copyright notice extracted from the COPYRIGHT file.
+#
+copyright = $process.run_regex(cat $src_root/COPYRIGHT, \
+ 'Copyright \(c\) (.+)\.', \
+ '\1')
+
+obj{b}: cxx.poptions += -DBUILD2_COPYRIGHT=\"$copyright\"
+
switch $cxx.target.class
{
case 'linux'