summaryrefslogtreecommitdiff
path: root/lib/build_OID_registry
diff options
context:
space:
mode:
Diffstat (limited to 'lib/build_OID_registry')
-rwxr-xr-xlib/build_OID_registry13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/build_OID_registry b/lib/build_OID_registry
index 5d9827217360..8267e8d71338 100755
--- a/lib/build_OID_registry
+++ b/lib/build_OID_registry
@@ -1,17 +1,14 @@
#!/usr/bin/perl -w
+# SPDX-License-Identifier: GPL-2.0-or-later
#
# Build a static ASN.1 Object Identified (OID) registry
#
# Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
# Written by David Howells (dhowells@redhat.com)
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public Licence
-# as published by the Free Software Foundation; either version
-# 2 of the Licence, or (at your option) any later version.
-#
use strict;
+use Cwd qw(abs_path);
my @names = ();
my @oids = ();
@@ -21,6 +18,8 @@ if ($#ARGV != 1) {
exit(2);
}
+my $abs_srctree = abs_path($ENV{'srctree'});
+
#
# Open the file to read from
#
@@ -39,7 +38,9 @@ close IN_FILE || die;
#
open C_FILE, ">$ARGV[1]" or die;
print C_FILE "/*\n";
-print C_FILE " * Automatically generated by ", $0, ". Do not edit\n";
+my $scriptname = $0;
+$scriptname =~ s#^\Q$abs_srctree/\E##;
+print C_FILE " * Automatically generated by ", $scriptname, ". Do not edit\n";
print C_FILE " */\n";
#