Commit 30699aa1 authored by Richard Levitte's avatar Richard Levitte
Browse files

Refactor util/mknum.pl for clearer separation of functionality



Rewrite util/mknum.pl to become cleaner, and to use the separate
generic C header parsing module, as well as the separate ordinals
manipulation module.
Adapt the build files.

Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7191)
parent 15ba1096
Loading
Loading
Loading
Loading
+40 −2
Original line number Diff line number Diff line
@@ -809,9 +809,47 @@ errors:
                -conf $$E `basename $$E .ec`.c ; \
          done )

{- use File::Basename;

   our @sslheaders =
       qw( include/openssl/ssl.h
           include/openssl/ssl2.h
           include/openssl/ssl3.h
           include/openssl/sslerr.h
           include/openssl/tls1.h
           include/openssl/dtls1.h
           include/openssl/srtp.h );
   our @cryptoheaders =
       qw( include/internal/dso.h
           include/internal/o_dir.h
           include/internal/o_str.h
           include/internal/err.h
           include/internal/sslconf.h );
   our @cryptoskipheaders = ( @sslheaders, 
       qw( include/openssl/conf_api.h
           include/openssl/ebcdic.h
           include/openssl/opensslconf.h
           include/openssl/symhacks.h ) );
   foreach my $f ( glob(catfile($config{sourcedir},
                                'include','openssl','*.h')) ) {
       my $fn = "include/openssl/" . basename($f);
       push @cryptoheaders, $fn unless grep { $_ eq $fn } @cryptoskipheaders;
   }
   "";
-}
CRYPTOHEADERS={- join(" \\\n\t", sort @cryptoheaders) -}
SSLHEADERS={- join(" \\\n\t", sort @sslheaders) -}
ordinals:
	( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b util/mknum.pl crypto update )
	( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b util/mknum.pl ssl update )
	( cd $(SRCDIR); \
          $(PERL) util/mknum.pl --version $(VERSION) --no-warnings \
                  --ordinals util/libcrypto.num \
                  --symhacks include/openssl/symhacks.h \
                  $(CRYPTOHEADERS) )
	( cd $(SRCDIR); \
          $(PERL) util/mknum.pl --version $(VERSION) --no-warnings \
                  --ordinals util/libssl.num \
                  --symhacks include/openssl/symhacks.h \
                  $(SSLHEADERS))

test_ordinals:
	( cd test; \

util/mknum.pl

100755 → 100644
+111 −1345

File changed.File mode changed from 100755 to 100644.

Preview size limit exceeded, changes collapsed.