From 0b95ca508ed4d664721f41dccda6b49e87941d00 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 11 Feb 2020 20:17:01 +0300 Subject: Use copyright extracted from COPYRIGHT file for printing build2 version --- build2/buildfile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'build2/buildfile') 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' -- cgit v1.1