Make generated copyright year be "now"
[openssl.git] / crypto / objects / objxref.pl
index 7ebd74cdcc0b3f35fa7d0f8434950bde7dc7c9e4..01ecf438f0b6b38416ffa55277d54a4772d03d5d 100644 (file)
@@ -1,4 +1,11 @@
-#!/usr/local/bin/perl
+#! /usr/bin/env perl
+# Copyright 1998-2019 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the Apache License 2.0 (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
+# https://www.openssl.org/source/license.html
+
 
 use strict;
 
@@ -7,6 +14,9 @@ my %oid_tbl;
 
 my ($mac_file, $xref_file) = @ARGV;
 
+# The year the output file is generated.
+my $YEAR = [localtime()]->[5] + 1900;
+
 open(IN, $mac_file) || die "Can't open $mac_file, $!\n";
 
 # Read in OID nid values for a lookup table.
@@ -60,7 +70,18 @@ my $pname = $0;
 $pname =~ s|.*/||;
 
 print <<EOF;
-/* AUTOGENERATED BY $pname, DO NOT EDIT */
+/*
+ * WARNING: do not edit!
+ * Generated by $pname
+ *
+ * Copyright 1998-$YEAR The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (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
+ * https://www.openssl.org/source/license.html
+ */
+
 
 typedef struct {
     int sign_id;