aboutsummaryrefslogtreecommitdiff
path: root/build2/buildfile
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-02-11 20:17:01 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-02-12 16:49:44 +0300
commit0b95ca508ed4d664721f41dccda6b49e87941d00 (patch)
tree644992791d2a048b70045393f29500c4ffe85052 /build2/buildfile
parentd712f69f5f769c5eaada3c1f76419abfb7b6f7ed (diff)
Use copyright extracted from COPYRIGHT file for printing build2 version
Diffstat (limited to 'build2/buildfile')
-rw-r--r--build2/buildfile8
1 files changed, 8 insertions, 0 deletions
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'