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)
This commit is contained in:
parent
d7c402c4f2
commit
97d37b85d4
13 changed files with 43 additions and 14 deletions
|
@ -2,7 +2,7 @@
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
* Generated by crypto/asn1/charmap.pl
|
* Generated by crypto/asn1/charmap.pl
|
||||||
*
|
*
|
||||||
* Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
|
|
|
@ -82,12 +82,14 @@ $arr[ord("?")] |= $PSTRING_CHAR;
|
||||||
|
|
||||||
# Now generate the C code
|
# Now generate the C code
|
||||||
|
|
||||||
|
# Output year depends on the year of the script.
|
||||||
|
my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
/*
|
/*
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
* Generated by crypto/asn1/charmap.pl
|
* Generated by crypto/asn1/charmap.pl
|
||||||
*
|
*
|
||||||
* Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 2000-$YEAR The OpenSSL Project Authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
* Generated by crypto/bn/bn_prime.pl
|
* Generated by crypto/bn/bn_prime.pl
|
||||||
*
|
*
|
||||||
* Copyright 1998-2016 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 1998-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
|
|
|
@ -6,12 +6,14 @@
|
||||||
# in the file LICENSE in the source distribution or at
|
# in the file LICENSE in the source distribution or at
|
||||||
# https://www.openssl.org/source/license.html
|
# https://www.openssl.org/source/license.html
|
||||||
|
|
||||||
|
# Output year depends on the year of the script.
|
||||||
|
my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
|
||||||
print <<"EOF";
|
print <<"EOF";
|
||||||
/*
|
/*
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
* Generated by crypto/bn/bn_prime.pl
|
* Generated by crypto/bn/bn_prime.pl
|
||||||
*
|
*
|
||||||
* Copyright 1998-2016 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 1998-$YEAR The OpenSSL Project Authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
* Generated by crypto/conf/keysets.pl
|
* Generated by crypto/conf/keysets.pl
|
||||||
*
|
*
|
||||||
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
* in the file LICENSE in the source distribution or at
|
* in the file LICENSE in the source distribution or at
|
||||||
|
|
|
@ -57,12 +57,14 @@ foreach (0 .. 255)
|
||||||
push(@V_w32,$v);
|
push(@V_w32,$v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Output year depends on the year of the script.
|
||||||
|
my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
|
||||||
print <<"EOF";
|
print <<"EOF";
|
||||||
/*
|
/*
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
* Generated by crypto/conf/keysets.pl
|
* Generated by crypto/conf/keysets.pl
|
||||||
*
|
*
|
||||||
* Copyright 1995-2016 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
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
* in the file LICENSE in the source distribution or at
|
* in the file LICENSE in the source distribution or at
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
* Generated by crypto/objects/obj_dat.pl
|
* Generated by crypto/objects/obj_dat.pl
|
||||||
*
|
*
|
||||||
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
* in the file LICENSE in the source distribution or at
|
* in the file LICENSE in the source distribution or at
|
||||||
|
|
|
@ -36,6 +36,10 @@ sub der_it
|
||||||
return $ret;
|
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.
|
# Read input, parse all #define's into OID name and value.
|
||||||
# Populate %ln and %sn with long and short names (%dupln and %dupsn)
|
# 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.
|
# Finally ready to generate the output.
|
||||||
open(OUT, ">$ARGV[1]") || die "Can't open output file $ARGV[1], $!";
|
open(OUT, ">$ARGV[1]") || die "Can't open output file $ARGV[1], $!";
|
||||||
print OUT <<'EOF';
|
print OUT <<"EOF";
|
||||||
/*
|
/*
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
* Generated by crypto/objects/obj_dat.pl
|
* 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
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
* in the file LICENSE in the source distribution or at
|
* in the file LICENSE in the source distribution or at
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
* Generated by objxref.pl
|
* Generated by objxref.pl
|
||||||
*
|
*
|
||||||
* Copyright 1998-2016 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 1998-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
|
|
|
@ -6,6 +6,13 @@
|
||||||
# in the file LICENSE in the source distribution or at
|
# in the file LICENSE in the source distribution or at
|
||||||
# https://www.openssl.org/source/license.html
|
# https://www.openssl.org/source/license.html
|
||||||
|
|
||||||
|
# Output year depends on the year of the script and the input files.
|
||||||
|
my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
|
||||||
|
my $iYEAR = [localtime([stat($ARGV[0])]->[9])]->[5] + 1900;
|
||||||
|
$YEAR = $iYEAR if $iYEAR > $YEAR;
|
||||||
|
$iYEAR = [localtime([stat($ARGV[1])]->[9])]->[5] + 1900;
|
||||||
|
$YEAR = $iYEAR if $iYEAR > $YEAR;
|
||||||
|
|
||||||
open (NUMIN,"$ARGV[1]") || die "Can't open number file $ARGV[1]";
|
open (NUMIN,"$ARGV[1]") || die "Can't open number file $ARGV[1]";
|
||||||
$max_nid=0;
|
$max_nid=0;
|
||||||
$o=0;
|
$o=0;
|
||||||
|
@ -124,12 +131,12 @@ foreach (sort { $a <=> $b } keys %nidn)
|
||||||
close NUMOUT;
|
close NUMOUT;
|
||||||
|
|
||||||
open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]";
|
open (OUT,">$ARGV[2]") || die "Can't open output file $ARGV[2]";
|
||||||
print OUT <<'EOF';
|
print OUT <<"EOF";
|
||||||
/*
|
/*
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
* Generated by crypto/objects/objects.pl
|
* Generated by crypto/objects/objects.pl
|
||||||
*
|
*
|
||||||
* Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 2000-$YEAR The OpenSSL Project Authors. All Rights Reserved.
|
||||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
* in the file LICENSE in the source distribution or at
|
* in the file LICENSE in the source distribution or at
|
||||||
|
|
|
@ -14,6 +14,13 @@ my %oid_tbl;
|
||||||
|
|
||||||
my ($mac_file, $xref_file) = @ARGV;
|
my ($mac_file, $xref_file) = @ARGV;
|
||||||
|
|
||||||
|
# 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($mac_file)]->[9])]->[5] + 1900;
|
||||||
|
$YEAR = $iYEAR if $iYEAR > $YEAR;
|
||||||
|
$iYEAR = [localtime([stat($xref_file)]->[9])]->[5] + 1900;
|
||||||
|
$YEAR = $iYEAR if $iYEAR > $YEAR;
|
||||||
|
|
||||||
open(IN, $mac_file) || die "Can't open $mac_file, $!\n";
|
open(IN, $mac_file) || die "Can't open $mac_file, $!\n";
|
||||||
|
|
||||||
# Read in OID nid values for a lookup table.
|
# Read in OID nid values for a lookup table.
|
||||||
|
@ -71,7 +78,7 @@ print <<EOF;
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
* Generated by $pname
|
* Generated by $pname
|
||||||
*
|
*
|
||||||
* Copyright 1998-2016 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 1998-$YEAR The OpenSSL Project Authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
|
|
|
@ -8,6 +8,11 @@
|
||||||
|
|
||||||
my $obj_dat_h = $ARGV[0];
|
my $obj_dat_h = $ARGV[0];
|
||||||
|
|
||||||
|
# Output year depends on the date on the input file and the script.
|
||||||
|
my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
|
||||||
|
my $iYEAR = [localtime([stat($obj_dat_h)]->[9])]->[5] + 1900;
|
||||||
|
$YEAR = $iYEAR if $iYEAR > $YEAR;
|
||||||
|
|
||||||
open IN, '<', $obj_dat_h
|
open IN, '<', $obj_dat_h
|
||||||
|| die "Couldn't open $obj_dat_h : $!\n";
|
|| die "Couldn't open $obj_dat_h : $!\n";
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
* Generated by crypto/objects/objects.pl
|
* Generated by crypto/objects/objects.pl
|
||||||
*
|
*
|
||||||
* Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
* in the file LICENSE in the source distribution or at
|
* in the file LICENSE in the source distribution or at
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue