From 6e665fb88b3c9e40433346b85bd3bacdab913647 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 13 Feb 2020 20:15:52 +0300 Subject: Use copyright extracted from LICENSE file for printing utility version --- cli/buildfile | 10 ++++++++++ cli/cli.cxx | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/buildfile b/cli/buildfile index b267ab9..7d634e0 100644 --- a/cli/buildfile +++ b/cli/buildfile @@ -11,6 +11,16 @@ libue{cli}: {hxx ixx txx cxx}{** -cli -version -options} \ hxx{version}: in{version} $src_root/manifest +# Build options. +# +# Pass the copyright notice extracted from the LICENSE file. +# +copyright = $process.run_regex(cat $src_root/LICENSE, \ + 'Copyright \(c\) (.+)\.', \ + '\1') + +obj{cli}: cxx.poptions += -DCLI_COPYRIGHT=\"$copyright\" + # Generated options parser. # if $cli.configured diff --git a/cli/cli.cxx b/cli/cli.cxx index 0798224..0c7f3a1 100644 --- a/cli/cli.cxx +++ b/cli/cli.cxx @@ -39,7 +39,7 @@ main (int argc, char* argv[]) ostream& o (cout); o << "CLI (command line interface compiler) " << CLI_VERSION_ID << endl - << "Copyright (c) 2009-2019 Code Synthesis Tools CC" << endl; + << "Copyright (c) " << CLI_COPYRIGHT << "." << endl; o << "This is free software; see the source for copying conditions. " << "There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS " -- cgit v1.1