Commit 6a74806e authored by Richard Levitte's avatar Richard Levitte
Browse files

Build apps/progs.h dynamically

Because apps/progs.h isn't configuration agnostic, it's not at all
suited for 'make update' or being versioned, so change it to be
dynamically generated.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3688)
parent c537e74b
Loading
Loading
Loading
Loading
+3
Changes for Configurations/descrip.mms.tmpl: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -146,6 +146,9 @@ BIN_SCRIPTS=[.tools]c_rehash.pl
MISC_SCRIPTS=[.apps]CA.pl, [.apps]tsget.pl
{- output_on() if $disabled{apps}; "" -}

APPS_OPENSSL={- use File::Spec::Functions;
                catfile("apps","openssl") -}

# DESTDIR is for package builders so that they can configure for, say,
# SYS$COMMON:[OPENSSL] and yet have everything installed in STAGING:[USER].
# In that case, configure with --prefix=SYS$COMMON:[OPENSSL] and then run
+3 −10
Changes for Configurations/unix-Makefile.tmpl: 3 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -119,6 +119,9 @@ BIN_SCRIPTS=$(BLDDIR)/tools/c_rehash
MISC_SCRIPTS=$(BLDDIR)/apps/CA.pl $(BLDDIR)/apps/tsget
{- output_on() if $disabled{apps}; "" -}

APPS_OPENSSL={- use File::Spec::Functions;
                catfile("apps","openssl") -}

# DESTDIR is for package builders so that they can configure for, say,
# /usr/ and yet have everything installed to /tmp/somedir/usr/.
# Normally it is left empty.
@@ -612,19 +615,9 @@ doc-nits:
lint:
	lint -DLINT $(INCLUDES) $(SRCS)

{- # because the program apps/openssl has object files as sources, and
   # they then have the corresponding C files as source, we need to chain
   # the lookups in %unified_info
   my $apps_openssl = catfile("apps","openssl");
   our @openssl_source = map { @{$unified_info{sources}->{$_}} }
                         @{$unified_info{sources}->{$apps_openssl}};
   ""; -}
generate_apps:
	( cd $(SRCDIR); $(PERL) VMS/VMSify-conf.pl \
				< apps/openssl.cnf > apps/openssl-vms.cnf )
	( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b apps/progs.pl \
					{- join(" ", @openssl_source) -} \
					> apps/progs.h )

generate_crypto_bn:
	( cd $(SRCDIR); $(PERL) crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
+3
Changes for Configurations/windows-makefile.tmpl: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -106,6 +106,9 @@ BIN_SCRIPTS=$(BLDDIR)\tools\c_rehash.pl
MISC_SCRIPTS=$(BLDDIR)\apps\CA.pl $(BLDDIR)\apps\tsget.pl
{- output_on() if $disabled{apps}; "" -}

APPS_OPENSSL={- use File::Spec::Functions;
                catfile("apps","openssl") -}

# Do not edit these manually. Use Configure with --prefix or --openssldir
# to change this!  Short explanation in the top comment in Configure
INSTALLTOP_dev={- # $prefix is used in the OPENSSLDIR perl snippet
+17 −11
Changes for apps/build.info: 17 added lines, 11 removed lines.
Original line number Diff line number Diff line
{- our $tsget_name = $config{target} =~ /^(VC|vms)-/ ? "tsget.pl" : "tsget";
   our @apps_openssl_src =
       ( qw(openssl.c
            asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c dhparam.c
            dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c errstr.c gendsa.c
            genpkey.c genrsa.c nseq.c ocsp.c passwd.c pkcs12.c pkcs7.c pkcs8.c
            pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c rsa.c rsautl.c
            s_client.c s_server.c s_time.c sess_id.c smime.c speed.c spkac.c
            srp.c ts.c verify.c version.c x509.c rehash.c
            apps.c opt.c s_cb.c s_socket.c
            app_rand.c),
          split(/\s+/, $target{apps_aux_src}) );
   "" -}
IF[{- !$disabled{apps} -}]
  PROGRAMS=openssl
  SOURCE[openssl]=\
          openssl.c \
          asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c dhparam.c \
          dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c errstr.c gendsa.c \
          genpkey.c genrsa.c nseq.c ocsp.c passwd.c pkcs12.c pkcs7.c pkcs8.c \
          pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c rsa.c rsautl.c \
          s_client.c s_server.c s_time.c sess_id.c smime.c speed.c spkac.c \
          srp.c ts.c verify.c version.c x509.c rehash.c \
          apps.c opt.c s_cb.c s_socket.c \
          app_rand.c \
          {- $target{apps_aux_src} -}
  SOURCE[openssl]={- join(" ", @apps_openssl_src) -}
  INCLUDE[openssl]=.. ../include
  DEPEND[openssl]=../libssl

  {- join("\n  ", map { (my $x = $_) =~ s|\.c$|.o|; "DEPEND[$x]=progs.h" }
                  @apps_openssl_src) -}
  GENERATE[progs.h]=progs.pl $(APPS_OPENSSL)
  DEPEND[progs.h]=../configdata.pm

  SCRIPTS=CA.pl {- $tsget_name -}
  SOURCE[CA.pl]=CA.pl.in
  SOURCE[{- $tsget_name -}]=tsget.in
−418

File deleted.

Loading