From fe72aa9de64384b0f1465d4862f09caa3bc12f20 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 12 Feb 2020 21:05:38 +0300 Subject: Use copyright extracted from COPYRIGHT file for printing utility version --- openssl/agent/pkcs11/agent.cxx | 2 +- openssl/buildfile | 11 +++++++++++ openssl/client/client.cxx | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/openssl/agent/pkcs11/agent.cxx b/openssl/agent/pkcs11/agent.cxx index 78e8547..b43b625 100644 --- a/openssl/agent/pkcs11/agent.cxx +++ b/openssl/agent/pkcs11/agent.cxx @@ -62,7 +62,7 @@ namespace openssl { cout << "openssl-agent-pkcs11 " << OPENSSL_AGENT_VERSION_ID << endl << "libbutl " << LIBBUTL_VERSION_ID << endl - << "Copyright (c) 2014-2019 Code Synthesis Ltd" << endl + << "Copyright (c) " << OPENSSL_AGENT_COPYRIGHT << "." << endl << "This is free software released under the MIT license." << endl; diff --git a/openssl/buildfile b/openssl/buildfile index 2d0e680..ab25be9 100644 --- a/openssl/buildfile +++ b/openssl/buildfile @@ -49,6 +49,17 @@ for t: cxx{**.test...} $d/exe{$n}: $d/libue{openssl}: bin.whole = false } +# Build options. +# +# Pass the copyright notice extracted from the COPYRIGHT file. +# +copyright = $process.run_regex(cat $src_root/COPYRIGHT, \ + 'Copyright \(c\) (.+)\.', \ + '\1') + +obj{agent/pkcs11/agent client/client}: \ + cxx.poptions += -DOPENSSL_AGENT_COPYRIGHT=\"$copyright\" + # Generated options parser. # if $cli.configured diff --git a/openssl/client/client.cxx b/openssl/client/client.cxx index 0c623c0..4c655aa 100644 --- a/openssl/client/client.cxx +++ b/openssl/client/client.cxx @@ -40,7 +40,7 @@ namespace openssl { cout << "openssl-client " << OPENSSL_AGENT_VERSION_ID << endl << "libbutl " << LIBBUTL_VERSION_ID << endl - << "Copyright (c) 2014-2019 Code Synthesis Ltd" << endl + << "Copyright (c) " << OPENSSL_AGENT_COPYRIGHT << "." << endl << "This is free software released under the MIT license." << endl; -- cgit v1.1