[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Mon Jun 12 20:35:33 UTC 2017


The branch master has been updated
       via  964ff301d6b50dabdb9daeb533f337e015f0419f (commit)
      from  2234212c3dde887e0b7fa08277d035cd132e2cce (commit)


- Log -----------------------------------------------------------------
commit 964ff301d6b50dabdb9daeb533f337e015f0419f
Author: Richard Levitte <levitte at openssl.org>
Date:   Mon Jun 12 20:06:56 2017 +0200

    Add -module option to util/mkerr.pl
    
    Sometimes, one might only want to rework a subset of all the internal
    error codes.  -module allows the caller to specify exactly which
    library modules to rewrite.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3662)

-----------------------------------------------------------------------

Summary of changes:
 util/mkerr.pl | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/util/mkerr.pl b/util/mkerr.pl
index 64a01a3..28e180a 100755
--- a/util/mkerr.pl
+++ b/util/mkerr.pl
@@ -17,6 +17,7 @@ my $rebuild      = 0;
 my $reindex      = 0;
 my $static       = 0;
 my $unref        = 0;
+my %modules         = ();
 
 my $errors       = 0;
 my @t            = localtime();
@@ -42,6 +43,13 @@ Options:
     -internal   Generate code that is to be built as part of OpenSSL itself.
                 Also scans internal list of files.
 
+    -module M   Only useful with -internal!
+                Only write files for library module M.  Whether files are
+                actually written or not depends on other options, such as
+                -rebuild.
+                Note: this option is cumulative.  If not given at all, all
+                internal modules will be considered.
+
     -nowrite    Do not write the header/source files, even if changed.
 
     -rebuild    Rebuild all header and C source files, even if there
@@ -86,6 +94,9 @@ while ( @ARGV ) {
     } elsif ( $arg eq "-unref" ) {
         $unref = 1;
         $nowrite = 1;
+    } elsif ( $arg eq "-module" ) {
+        shift @ARGV;
+        $modules{uc $ARGV[0]} = 1;
     } elsif ( $arg =~ /-*h(elp)?/ ) {
         &help();
         exit;
@@ -102,6 +113,7 @@ if ( $internal ) {
     @source = ( glob('crypto/*.c'), glob('crypto/*/*.c'),
                 glob('ssl/*.c'), glob('ssl/*/*.c') );
 } else {
+    die "-module isn't useful without -internal\n" if scalar keys %modules > 0;
     @source = @ARGV;
 }
 
@@ -409,6 +421,7 @@ foreach my $lib ( keys %errorfile ) {
     if ( ! $fnew{$lib} && ! $rnew{$lib} ) {
         next unless $rebuild;
     }
+    next if scalar keys %modules > 0 && !$modules{$lib};
     next if $nowrite;
     print STDERR "$lib: $fnew{$lib} new functions\n" if $fnew{$lib};
     print STDERR "$lib: $rnew{$lib} new reasons\n" if $rnew{$lib};


More information about the openssl-commits mailing list