diff options
author | Rich Salz <rsalz@openssl.org> | 2018-02-13 13:09:02 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2018-02-13 13:22:30 -0500 |
commit | 97d37b85d4e1a218fdc61dbe0dff3e7c8ff36121 (patch) | |
tree | b7af9616b57456e5606683507bab2d81e44aa1f6 /crypto/objects/obj_dat.pl | |
parent | d7c402c4f2d9c311a91616fd75c24a15afabe2e5 (diff) |
Generate copyright year properly
Output copyright year depends on any input file(s) and the script.
This is not perfect, but better than what we had.
Also run 'make update'
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5350)
Diffstat (limited to 'crypto/objects/obj_dat.pl')
-rw-r--r-- | crypto/objects/obj_dat.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crypto/objects/obj_dat.pl b/crypto/objects/obj_dat.pl index 947cceed1d..19137b1413 100644 --- a/crypto/objects/obj_dat.pl +++ b/crypto/objects/obj_dat.pl @@ -36,6 +36,10 @@ sub der_it return $ret; } +# Output year depends on the year of the script and the input file. +my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900; +my $iYEAR = [localtime([stat($ARGV[0])]->[9])]->[5] + 1900; +$YEAR = $iYEAR if $iYEAR > $YEAR; # Read input, parse all #define's into OID name and value. # Populate %ln and %sn with long and short names (%dupln and %dupsn) @@ -149,12 +153,12 @@ for (my $i = 0; $i < $n; $i++) { # Finally ready to generate the output. open(OUT, ">$ARGV[1]") || die "Can't open output file $ARGV[1], $!"; -print OUT <<'EOF'; +print OUT <<"EOF"; /* * WARNING: do not edit! * Generated by crypto/objects/obj_dat.pl * - * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-$YEAR The OpenSSL Project Authors. All Rights Reserved. * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at |