summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-02-13 20:15:52 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-02-13 20:15:52 +0300
commit6e665fb88b3c9e40433346b85bd3bacdab913647 (patch)
tree122ce7311ee79c7a4b538d83c3435b1740812245 /cli
parentee4232c50a668646d714390916430a6e6dc7eee4 (diff)
Use copyright extracted from LICENSE file for printing utility version
Diffstat (limited to 'cli')
-rw-r--r--cli/buildfile10
-rw-r--r--cli/cli.cxx2
2 files changed, 11 insertions, 1 deletions
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 "