[openssl] master update

Richard Levitte levitte at openssl.org
Mon Mar 2 02:37:00 UTC 2020


The branch master has been updated
       via  97ace6c2dae451ce8e3b099cf242968ecff128af (commit)
       via  fe909ee4aeb6eb64f6f31a1544c5d3c81c5fe1f1 (commit)
       via  19cf4404d5174a41d46a781155ad513a3502c609 (commit)
       via  a3f1fc25017ef768a956b88edee4aaf851a58db2 (commit)
       via  e42921790267d54054cde1596711219b72a184ad (commit)
       via  ad5be194c6b08e89f9a6e2a78b85ff19a3c40d40 (commit)
      from  2888fc1590ad31633be7a99e7288dcecd35e800c (commit)


- Log -----------------------------------------------------------------
commit 97ace6c2dae451ce8e3b099cf242968ecff128af
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Feb 27 02:07:50 2020 +0100

    .travis.yml: Remove NOUPDATE support
    
    It was a temporary measure to deal with the fact that util/progs.pl
    didn't work right at all times, but that has now been fixed.
    
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/11185)

commit fe909ee4aeb6eb64f6f31a1544c5d3c81c5fe1f1
Author: Richard Levitte <levitte at openssl.org>
Date:   Wed Feb 26 14:52:04 2020 +0100

    Remove apps/progs.c and apps/progs.h
    
    Since they are generated in build time, there's not need to keep them
    in the source tree.
    
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/11185)

commit 19cf4404d5174a41d46a781155ad513a3502c609
Author: Richard Levitte <levitte at openssl.org>
Date:   Wed Feb 26 14:42:10 2020 +0100

    Configure: Diverse cleanups
    
    There were some remaining old code and comments that don't serve a
    purpose any longer.
    
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/11185)

commit a3f1fc25017ef768a956b88edee4aaf851a58db2
Author: Richard Levitte <levitte at openssl.org>
Date:   Wed Feb 26 14:39:16 2020 +0100

    Build: Generate apps/progs.c and apps/progs.h in build time
    
    util/progs.pl depends on the build tree (on configdata.pm,
    specifically), so it needs to be run from the build tree.  But why
    stop there?  We might as well generate apps/progs.c and apps/progs.h
    when building.
    
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/11185)

commit e42921790267d54054cde1596711219b72a184ad
Author: Richard Levitte <levitte at openssl.org>
Date:   Wed Feb 26 14:35:17 2020 +0100

    build.info: Implement simply substitutions in variable values
    
    Use case: having a variable with multiple source files in its value,
    and wanting to refer to the corresponding object file.
    
        $SRCS=foo.c bar.c
        SOURCE[program]=$SRCS
        DEPEND[${SRCS/.c/.o}]=prog.h
    
        GENERATE[prog.h]=...
    
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/11185)

commit ad5be194c6b08e89f9a6e2a78b85ff19a3c40d40
Author: Richard Levitte <levitte at openssl.org>
Date:   Wed Feb 26 14:30:38 2020 +0100

    build.info: Make it possible to have more than one item in KEYWORD[]
    
    So far, the "index" part of KEYWORD[whatever] could only handle one
    item.  There are cases, however, where we want to add the exact same
    value to multiple items.  This is especially helpful if a variable
    that may have multi-item values are used in the "index" part.
    
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/11185)

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

Summary of changes:
 .travis.yml                          |   4 +-
 Configurations/descrip.mms.tmpl      |   4 +-
 Configurations/unix-Makefile.tmpl    |  10 +-
 Configurations/windows-makefile.tmpl |   4 +-
 Configure                            | 228 +++++++++++---------
 apps/build.info                      |  15 +-
 apps/progs.c                         | 402 -----------------------------------
 apps/progs.h                         | 123 -----------
 doc/internal/man7/build.info.pod     |  56 +++--
 9 files changed, 187 insertions(+), 659 deletions(-)
 delete mode 100644 apps/progs.c
 delete mode 100644 apps/progs.h

diff --git a/.travis.yml b/.travis.yml
index b6d698ae76..a015eb4053 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -65,7 +65,7 @@ matrix:
         - os: linux
           arch: arm64
           compiler: gcc
-          env: CONFIG_OPTS="no-asm no-deprecated enable-buildtest-c++ --strict-warnings -D_DEFAULT_SOURCE" BUILDONLY="yes" NOUPDATE="yes" CHECKDOCS="yes" CPPFLAGS="-ansi"
+          env: CONFIG_OPTS="no-asm no-deprecated enable-buildtest-c++ --strict-warnings -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" CPPFLAGS="-ansi"
         - os: linux
           arch: s390x
           compiler: gcc
@@ -212,7 +212,7 @@ script:
     - if [ -n "$DESTDIR" ]; then
           cd _build;
       fi
-    - if [ -z "$NOUPDATE" ] && ! $make update; then
+    - if ! $make update; then
           echo -e '\052\052 FAILED -- MAKE UPDATE';
           travis_terminate 1;
       fi
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl
index bf22e40dc4..8ce6e78999 100644
--- a/Configurations/descrip.mms.tmpl
+++ b/Configurations/descrip.mms.tmpl
@@ -140,8 +140,8 @@ HTMLDOCS3={- join(", ", map { "-\n\t".$_ } @{$unified_info{htmldocs}->{man3}}) -
 HTMLDOCS5={- join(", ", map { "-\n\t".$_ } @{$unified_info{htmldocs}->{man5}}) -}
 HTMLDOCS7={- join(", ", map { "-\n\t".$_ } @{$unified_info{htmldocs}->{man7}}) -}
 
-APPS_OPENSSL={- use File::Spec::Functions;
-                catfile("apps","openssl") -}
+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].
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index ac24687609..a019779993 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -195,8 +195,8 @@ MANDOCS7={-
              fill_lines(" ", $COLUMNS - 9, map { platform->bin($_) }
                         @{$unified_info{mandocs}->{man7}})) -}
 
-APPS_OPENSSL={- use File::Spec::Functions;
-                catfile("apps","openssl") -}
+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/.
@@ -962,12 +962,6 @@ lint:
 generate_apps:
 	( cd $(SRCDIR); $(PERL) VMS/VMSify-conf.pl \
 				< apps/openssl.cnf > apps/openssl-vms.cnf )
-	@ : {- output_off() if $disabled{apps}; "" -}
-	( b=`pwd`; cd $(SRCDIR); \
-	  $(PERL) -I$$b apps/progs.pl -H $(APPS_OPENSSL) > apps/progs.h )
-	( b=`pwd`; cd $(SRCDIR); \
-	  $(PERL) -I$$b apps/progs.pl -C $(APPS_OPENSSL) > apps/progs.c )
-	@ : {- output_on() if $disabled{apps}; "" -}
 
 generate_crypto_bn:
 	( cd $(SRCDIR); $(PERL) crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index 859d3a6324..c49b32f0e1 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -130,8 +130,8 @@ HTMLDOCS5_BLDDIRS={- my %dirs = map { dirname($_) => 1 } @HTMLDOCS5;
 HTMLDOCS7_BLDDIRS={- my %dirs = map { dirname($_) => 1 } @HTMLDOCS7;
                      join(' ', sort keys %dirs) -}
 
-APPS_OPENSSL={- use File::Spec::Functions;
-                "\"".catfile("apps","openssl")."\"" -}
+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
diff --git a/Configure b/Configure
index 7b3e6ccbd3..19b57d90b8 100755
--- a/Configure
+++ b/Configure
@@ -1807,23 +1807,62 @@ if ($builder eq "unified") {
         # contains a dollar sign, it had better be escaped, or it will be
         # taken for a variable name prefix.
         my %variables = ();
-        my $variable_re = qr/\$(?P<VARIABLE>[[:alpha:]][[:alnum:]_]*)/;
+        # Variable name syntax
+        my $variable_name_re = qr/(?P<VARIABLE>[[:alpha:]][[:alnum:]_]*)/;
+        # Value modifier syntaxes
+        my $variable_subst_re = qr/\/(?P<RE>(?:\\\/|.)*?)\/(?P<SUBST>.*?)/;
+        # Put it all together
+        my $variable_re = qr/\$
+                             (?|
+                                 # Simple case, just the name
+                                 ${variable_name_re}
+                             |
+                                 # Expressive case, with braces and possible
+                                 # modifier expressions
+                                 \{
+                                 ${variable_name_re}
+                                 (?:
+                                     # Pile on modifier expressions,
+                                     # separated by |
+                                     ${variable_subst_re}
+                                 )
+                                 \}
+                             )/x;
         my $expand_variables = sub {
             my $value = '';
             my $value_rest = shift;
 
             if ($ENV{CONFIGURE_DEBUG_VARIABLE_EXPAND}) {
                 print STDERR
-                    "DEBUG[\$expand_variables] Parsed '$value_rest' into:\n"
+                    "DEBUG[\$expand_variables] Parsed '$value_rest' ...\n"
             }
             while ($value_rest =~ /(?<!\\)${variable_re}/) {
-                $value .= $`;
-                $value .= $variables{$+{VARIABLE}};
                 $value_rest = $';
+                $value .= $`;
+
+                my $variable_value = $variables{$+{VARIABLE}};
+
+                # Process modifier expressions, if present
+                if (defined $+{RE}) {
+                    # We must save important %+ values, because the s///
+                    # below clears them
+                    my $re = $+{RE};
+                    my $subst = $+{SUBST};
+
+                    $variable_value =~ s/\Q$re\E/$subst/g;
+
+                    if ($ENV{CONFIGURE_DEBUG_VARIABLE_EXPAND}) {
+                        print STDERR
+                            "DEBUG[\$expand_variables] ... and substituted ",
+                            "'$re' with '$subst'\n";
+                    }
+                }
+
+                $value .= $variable_value;
             }
             if ($ENV{CONFIGURE_DEBUG_VARIABLE_EXPAND}) {
                 print STDERR
-                    "DEBUG[\$expand_variables] ... '$value$value_rest'\n";
+                    "DEBUG[\$expand_variables] ... into: '$value$value_rest'\n";
             }
             return $value . $value_rest;
         };
@@ -1857,6 +1896,34 @@ if ($builder eq "unified") {
             }
         };
 
+        # Support for pushing values on multiple indexes of a given hash
+        # array.
+        my $push_to = sub {
+            my $valueref = shift;
+            my $index_str = shift; # May be undef or empty
+            my $attrref = shift;   # May be undef
+            my $attr_str = shift;
+            my @values = @_;
+
+            if (defined $index_str) {
+                my @indexes = ( '' );
+                if ($index_str !~ m|^\s*$|) {
+                    @indexes = tokenize($index_str);
+                }
+                foreach (@indexes) {
+                    push @{$valueref->{$_}}, @values;
+                    if (defined $attrref) {
+                        $handle_attributes->($attr_str, \$$attrref->{$_},
+                                             @values);
+                    }
+                }
+            } else {
+                push @$valueref, @values;
+                $handle_attributes->($attr_str, $attrref, @values)
+                    if defined $attrref;
+            }
+        };
+
         # We want to detect configdata.pm in the source tree, so we
         # don't use it if the build tree is different.
         my $src_configdata = cleanfile($srcdir, "configdata.pm", $blddir);
@@ -1937,88 +2004,64 @@ if ($builder eq "unified") {
                 }
             },
             qr/^\s* PROGRAMS ${attribs_re} \s* =  ${value_re} $/x
-            => sub {
-                if (!@skip || $skip[$#skip] > 0) {
-                    my @p = tokenize($expand_variables->($+{VALUE}));
-                    push @programs, @p;
-                    $handle_attributes->($+{ATTRIBS},
-                                         \$attributes{programs},
-                                         @p);
-                }
-            },
+            => sub { $push_to->(\@programs, undef,
+                                \$attributes{programs}, $+{ATTRIBS},
+                                tokenize($expand_variables->($+{VALUE})))
+                         if !@skip || $skip[$#skip] > 0; },
             qr/^\s* LIBS ${attribs_re} \s* =  ${value_re} $/x
-            => sub {
-                if (!@skip || $skip[$#skip] > 0) {
-                    my @l = tokenize($expand_variables->($+{VALUE}));
-                    push @libraries, @l;
-                    $handle_attributes->($+{ATTRIBS},
-                                         \$attributes{libraries},
-                                         @l);
-                }
-            },
+            => sub { $push_to->(\@libraries, undef,
+                                \$attributes{libraries}, $+{ATTRIBS},
+                                tokenize($expand_variables->($+{VALUE})))
+                         if !@skip || $skip[$#skip] > 0; },
             qr/^\s* MODULES ${attribs_re} \s* =  ${value_re} $/x
-            => sub {
-                if (!@skip || $skip[$#skip] > 0) {
-                    my @m = tokenize($expand_variables->($+{VALUE}));
-                    push @modules, @m;
-                    $handle_attributes->($+{ATTRIBS},
-                                         \$attributes{modules},
-                                         @m);
-                }
-            },
+            => sub { $push_to->(\@modules, undef,
+                                \$attributes{modules}, $+{ATTRIBS},
+                                tokenize($expand_variables->($+{VALUE})))
+                         if !@skip || $skip[$#skip] > 0; },
             qr/^\s* SCRIPTS ${attribs_re} \s* =  ${value_re} $/x
-            => sub {
-                if (!@skip || $skip[$#skip] > 0) {
-                    my @s = tokenize($expand_variables->($+{VALUE}));
-                    push @scripts, @s;
-                    $handle_attributes->($+{ATTRIBS},
-                                         \$attributes{scripts},
-                                         @s);
-                }
-            },
+            => sub { $push_to->(\@scripts, undef,
+                                \$attributes{scripts}, $+{ATTRIBS},
+                                tokenize($expand_variables->($+{VALUE})))
+                         if !@skip || $skip[$#skip] > 0; },
             qr/^\s* HTMLDOCS ${index_re} = ${value_re} $/x
-            => sub { push @{$htmldocs{$expand_variables->($+{INDEX})}},
-                         tokenize($expand_variables->($+{VALUE}))
-                         if !@skip || $skip[$#skip] > 0 },
+            => sub { $push_to->(\%htmldocs, $expand_variables->($+{INDEX}),
+                                undef, undef,
+                                tokenize($expand_variables->($+{VALUE})))
+                         if !@skip || $skip[$#skip] > 0; },
             qr/^\s* MANDOCS ${index_re} = ${value_re} $/x
-            => sub { push @{$mandocs{$expand_variables->($+{INDEX})}},
-                         tokenize($expand_variables->($+{VALUE}))
-                         if !@skip || $skip[$#skip] > 0 },
-            qr/^\s* ORDINALS ${index_re} = ${value_re} $/x
-            => sub { push @{$ordinals{$expand_variables->($+{INDEX})}},
-                         tokenize($expand_variables->($+{VALUE}))
-                         if !@skip || $skip[$#skip] > 0 },
+            => sub { $push_to->(\%mandocs, $expand_variables->($+{INDEX}),
+                                undef, undef,
+                                tokenize($expand_variables->($+{VALUE})))
+                         if !@skip || $skip[$#skip] > 0; },
             qr/^\s* SOURCE ${index_re} = ${value_re} $/x
-            => sub { push @{$sources{$expand_variables->($+{INDEX})}},
-                         tokenize($expand_variables->($+{VALUE}))
-                         if !@skip || $skip[$#skip] > 0 },
+            => sub { $push_to->(\%sources, $expand_variables->($+{INDEX}),
+                                undef, undef,
+                                tokenize($expand_variables->($+{VALUE})))
+                         if !@skip || $skip[$#skip] > 0; },
             qr/^\s* SHARED_SOURCE ${index_re} = ${value_re} $/x
-            => sub { push @{$shared_sources{$expand_variables->($+{INDEX})}},
-                         tokenize($expand_variables->($+{VALUE}))
-                         if !@skip || $skip[$#skip] > 0 },
+            => sub { $push_to->(\%shared_sources, $expand_variables->($+{INDEX}),
+                                undef, undef,
+                                tokenize($expand_variables->($+{VALUE})))
+                         if !@skip || $skip[$#skip] > 0; },
             qr/^\s* INCLUDE ${index_re} = ${value_re} $/x
-            => sub { push @{$includes{$expand_variables->($+{INDEX})}},
-                         tokenize($expand_variables->($+{VALUE}))
-                         if !@skip || $skip[$#skip] > 0 },
+            => sub { $push_to->(\%includes, $expand_variables->($+{INDEX}),
+                                undef, undef,
+                                tokenize($expand_variables->($+{VALUE})))
+                         if !@skip || $skip[$#skip] > 0; },
             qr/^\s* DEFINE ${index_re} = ${value_re} $/x
-            => sub { push @{$defines{$expand_variables->($+{INDEX})}},
-                         tokenize($expand_variables->($+{VALUE}))
-                         if !@skip || $skip[$#skip] > 0 },
+            => sub { $push_to->(\%defines, $expand_variables->($+{INDEX}),
+                                undef, undef,
+                                tokenize($expand_variables->($+{VALUE})))
+                         if !@skip || $skip[$#skip] > 0; },
             qr/^\s* DEPEND ${index_re} ${attribs_re} = ${value_re} $/x
-            => sub {
-                if (!@skip || $skip[$#skip] > 0) {
-                    my $i = $expand_variables->($+{INDEX});
-                    my @d = tokenize($expand_variables->($+{VALUE}));
-                    push @{$depends{$i}}, @d;
-                    $handle_attributes->($+{ATTRIBS},
-                                         \$attributes{depends}->{$i},
-                                         @d);
-                }
-            },
+            => sub { $push_to->(\%depends, $expand_variables->($+{INDEX}),
+                                \$attributes{depends}, $+{ATTRIBS},
+                                tokenize($expand_variables->($+{VALUE})))
+                         if !@skip || $skip[$#skip] > 0; },
             qr/^\s* GENERATE ${index_re} = ${value_re} $/x
-            => sub { push @{$generate{$expand_variables->($+{INDEX})}},
-                         $+{VALUE}
-                         if !@skip || $skip[$#skip] > 0 },
+            => sub { $push_to->(\%generate, $expand_variables->($+{INDEX}),
+                                undef, undef, $+{VALUE})
+                         if !@skip || $skip[$#skip] > 0; },
             qr/^\s* (?:\#.*)? $/x => sub { },
             "OTHERWISE" => sub { die "Something wrong with this line:\n$_\nat $sourced/$f" },
             "BEFORE" => sub {
@@ -2078,9 +2121,9 @@ EOF
             foreach (@{$sources{$dest}}) {
                 my $s = cleanfile($sourced, $_, $blddir);
 
-                # If it isn't in the source tree, we assume it's generated
-                # in the build tree
-                if ($s eq $src_configdata || ! -f $s || $generate{$_}) {
+                # If it's generated or we simply don't find it in the source
+                # tree, we assume it's in the build tree.
+                if ($s eq $src_configdata || $generate{$_} || ! -f $s) {
                     $s = cleanfile($buildd, $_, $blddir);
                 }
                 # We recognise C++, C and asm files
@@ -2110,9 +2153,9 @@ EOF
             foreach (@{$shared_sources{$dest}}) {
                 my $s = cleanfile($sourced, $_, $blddir);
 
-                # If it isn't in the source tree, we assume it's generated
-                # in the build tree
-                if ($s eq $src_configdata || ! -f $s || $generate{$_}) {
+                # If it's generated or we simply don't find it in the source
+                # tree, we assume it's in the build tree.
+                if ($s eq $src_configdata || $generate{$_} || ! -f $s) {
                     $s = cleanfile($buildd, $_, $blddir);
                 }
 
@@ -2152,8 +2195,7 @@ EOF
             my $gen = $generator[0];
             $generator[0] = cleanfile($sourced, $gen, $blddir);
 
-            # If the generator isn't in the source tree, we assume it's
-            # generated in the build tree
+            # If the generator is itself generated, it's in the build tree
             if ($generate{$gen}) {
                 $generator[0] = cleanfile($buildd, $gen, $blddir);
             }
@@ -2175,23 +2217,14 @@ EOF
 
                 # If we know it's generated, or assume it is because we can't
                 # find it in the source tree, we set file we depend on to be
-                # in the build tree rather than the source tree, and assume
-                # and that there are lines to build it in a BEGINRAW..ENDRAW
-                # section or in the Makefile template.
+                # in the build tree rather than the source tree.
                 if ($d eq $src_configdata
-                    || ! -f $d
                     || (grep { $d eq $_ }
                         map { cleanfile($srcdir, $_, $blddir) }
-                        grep { /\.h$/ } keys %{$unified_info{generate}})) {
+                        grep { /\.h$/ } keys %{$unified_info{generate}})
+                    || ! -f $d) {
                     $d = cleanfile($buildd, $_, $blddir);
                 }
-                # Take note if the file to depend on is being renamed
-                # Take extra care with files ending with .a, they should
-                # be treated without that extension, and the extension
-                # should be added back after treatment.
-                $d =~ /(\.a)?$/;
-                my $e = $1 // "";
-                $d = $`.$e;
                 $unified_info{depends}->{$ddest}->{$d} = 1;
 
                 # Fix up associated attributes
@@ -2230,9 +2263,6 @@ EOF
                 # be a generated file in the build tree.
                 if (! -f $ddest) {
                     $ddest = cleanfile($buildd, $dest, $blddir);
-                    if ($unified_info{rename}->{$ddest}) {
-                        $ddest = $unified_info{rename}->{$ddest};
-                    }
                 }
             }
             foreach my $v (@{$defines{$dest}}) {
diff --git a/apps/build.info b/apps/build.info
index 1b931c8ac1..495e56065e 100644
--- a/apps/build.info
+++ b/apps/build.info
@@ -19,6 +19,10 @@ $OPENSSLSRC=\
         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 storeutl.c \
         list.c info.c provider.c fipsinstall.c
+IF[{- !$disabled{'deprecated-3.0'} -}]
+  $OPENSSLSRC=$OPENSSLSRC \
+        dhparam.c dsa.c dsaparam.c gendsa.c rsa.c rsautl.c genrsa.c
+ENDIF
 
 IF[{- !$disabled{apps} -}]
   PROGRAMS=openssl
@@ -26,15 +30,18 @@ IF[{- !$disabled{apps} -}]
   INCLUDE[openssl]=.. ../include include
   DEPEND[openssl]=libapps.a ../libssl
 
+  DEPEND[${OPENSSLSRC/.c/.o}]=progs.h
+  GENERATE[progs.c]=progs.pl -C $(APPS_OPENSSL)
+  GENERATE[progs.h]=progs.pl -H $(APPS_OPENSSL)
+  # progs.pl tries to read all 'openssl' sources, including progs.c, so we make
+  # sure things are generated in the correct order.
+  DEPEND[progs.h]=progs.c
+
   IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}]
     GENERATE[openssl.rc]=../util/mkrc.pl openssl
     SOURCE[openssl]=openssl.rc
   ENDIF
 
-  IF[{- !$disabled{'deprecated-3.0'} -}]
-    SOURCE[openssl]=dhparam.c dsa.c dsaparam.c gendsa.c rsa.c rsautl.c genrsa.c
-  ENDIF
-
   SCRIPTS{misc}=CA.pl
   SOURCE[CA.pl]=CA.pl.in
   # linkname tells build files that a symbolic link or copy of this script
diff --git a/apps/progs.c b/apps/progs.c
deleted file mode 100644
index 3492c93e25..0000000000
--- a/apps/progs.c
+++ /dev/null
@@ -1,402 +0,0 @@
-/*
- * WARNING: do not edit!
- * Generated by apps/progs.pl
- *
- * Copyright 1995-2020 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
- */
-
-#include "progs.h"
-
-FUNCTION functions[] = {
-    {FT_general, "asn1parse", asn1parse_main, asn1parse_options, NULL},
-    {FT_general, "ca", ca_main, ca_options, NULL},
-#ifndef OPENSSL_NO_SOCK
-    {FT_general, "ciphers", ciphers_main, ciphers_options, NULL},
-#endif
-#ifndef OPENSSL_NO_CMS
-    {FT_general, "cms", cms_main, cms_options, NULL},
-#endif
-    {FT_general, "crl", crl_main, crl_options, NULL},
-    {FT_general, "crl2pkcs7", crl2pkcs7_main, crl2pkcs7_options, NULL},
-    {FT_general, "dgst", dgst_main, dgst_options, NULL},
-#if !defined(OPENSSL_NO_DH) && !defined(OPENSSL_NO_DEPRECATED_3_0)
-    {FT_general, "dhparam", dhparam_main, dhparam_options, "pkeyparam"},
-#endif
-#if !defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)
-    {FT_general, "dsa", dsa_main, dsa_options, "pkey"},
-#endif
-#if !defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)
-    {FT_general, "dsaparam", dsaparam_main, dsaparam_options, "pkeyparam"},
-#endif
-#if !defined(OPENSSL_NO_EC) && !defined(OPENSSL_NO_DEPRECATED_3_0)
-    {FT_general, "ec", ec_main, ec_options, "pkey"},
-#endif
-#if !defined(OPENSSL_NO_EC) && !defined(OPENSSL_NO_DEPRECATED_3_0)
-    {FT_general, "ecparam", ecparam_main, ecparam_options, "pkeyparam"},
-#endif
-    {FT_general, "enc", enc_main, enc_options, NULL},
-#ifndef OPENSSL_NO_ENGINE
-    {FT_general, "engine", engine_main, engine_options, NULL},
-#endif
-    {FT_general, "errstr", errstr_main, errstr_options, NULL},
-    {FT_general, "fipsinstall", fipsinstall_main, fipsinstall_options, NULL},
-#if !defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)
-    {FT_general, "gendsa", gendsa_main, gendsa_options, "genpkey"},
-#endif
-    {FT_general, "genpkey", genpkey_main, genpkey_options, NULL},
-#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)
-    {FT_general, "genrsa", genrsa_main, genrsa_options, "genpkey"},
-#endif
-    {FT_general, "help", help_main, help_options, NULL},
-    {FT_general, "info", info_main, info_options, NULL},
-    {FT_general, "kdf", kdf_main, kdf_options, NULL},
-    {FT_general, "list", list_main, list_options, NULL},
-    {FT_general, "mac", mac_main, mac_options, NULL},
-    {FT_general, "nseq", nseq_main, nseq_options, NULL},
-#ifndef OPENSSL_NO_OCSP
-    {FT_general, "ocsp", ocsp_main, ocsp_options, NULL},
-#endif
-    {FT_general, "passwd", passwd_main, passwd_options, NULL},
-#ifndef OPENSSL_NO_DES
-    {FT_general, "pkcs12", pkcs12_main, pkcs12_options, NULL},
-#endif
-    {FT_general, "pkcs7", pkcs7_main, pkcs7_options, NULL},
-    {FT_general, "pkcs8", pkcs8_main, pkcs8_options, NULL},
-    {FT_general, "pkey", pkey_main, pkey_options, NULL},
-    {FT_general, "pkeyparam", pkeyparam_main, pkeyparam_options, NULL},
-    {FT_general, "pkeyutl", pkeyutl_main, pkeyutl_options, NULL},
-    {FT_general, "prime", prime_main, prime_options, NULL},
-    {FT_general, "provider", provider_main, provider_options, NULL},
-    {FT_general, "rand", rand_main, rand_options, NULL},
-    {FT_general, "rehash", rehash_main, rehash_options, NULL},
-    {FT_general, "req", req_main, req_options, NULL},
-#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)
-    {FT_general, "rsa", rsa_main, rsa_options, "pkey"},
-#endif
-#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DEPRECATED_3_0)
-    {FT_general, "rsautl", rsautl_main, rsautl_options, "pkeyutl"},
-#endif
-#ifndef OPENSSL_NO_SOCK
-    {FT_general, "s_client", s_client_main, s_client_options, NULL},
-#endif
-#ifndef OPENSSL_NO_SOCK
-    {FT_general, "s_server", s_server_main, s_server_options, NULL},
-#endif
-#ifndef OPENSSL_NO_SOCK
-    {FT_general, "s_time", s_time_main, s_time_options, NULL},
-#endif
-    {FT_general, "sess_id", sess_id_main, sess_id_options, NULL},
-    {FT_general, "smime", smime_main, smime_options, NULL},
-    {FT_general, "speed", speed_main, speed_options, NULL},
-    {FT_general, "spkac", spkac_main, spkac_options, NULL},
-#ifndef OPENSSL_NO_SRP
-    {FT_general, "srp", srp_main, srp_options, NULL},
-#endif
-    {FT_general, "storeutl", storeutl_main, storeutl_options, NULL},
-#ifndef OPENSSL_NO_TS
-    {FT_general, "ts", ts_main, ts_options, NULL},
-#endif
-    {FT_general, "verify", verify_main, verify_options, NULL},
-    {FT_general, "version", version_main, version_options, NULL},
-    {FT_general, "x509", x509_main, x509_options, NULL},
-#ifndef OPENSSL_NO_MD2
-    {FT_md, "md2", dgst_main, NULL, NULL},
-#endif
-#ifndef OPENSSL_NO_MD4
-    {FT_md, "md4", dgst_main, NULL, NULL},
-#endif
-    {FT_md, "md5", dgst_main, NULL, NULL},
-#ifndef OPENSSL_NO_GOST
-    {FT_md, "gost", dgst_main, NULL, NULL},
-#endif
-    {FT_md, "sha1", dgst_main, NULL, NULL},
-    {FT_md, "sha224", dgst_main, NULL, NULL},
-    {FT_md, "sha256", dgst_main, NULL, NULL},
-    {FT_md, "sha384", dgst_main, NULL, NULL},
-    {FT_md, "sha512", dgst_main, NULL, NULL},
-    {FT_md, "sha512-224", dgst_main, NULL, NULL},
-    {FT_md, "sha512-256", dgst_main, NULL, NULL},
-    {FT_md, "sha3-224", dgst_main, NULL, NULL},
-    {FT_md, "sha3-256", dgst_main, NULL, NULL},
-    {FT_md, "sha3-384", dgst_main, NULL, NULL},
-    {FT_md, "sha3-512", dgst_main, NULL, NULL},
-    {FT_md, "shake128", dgst_main, NULL, NULL},
-    {FT_md, "shake256", dgst_main, NULL, NULL},
-#ifndef OPENSSL_NO_MDC2
-    {FT_md, "mdc2", dgst_main, NULL, NULL},
-#endif
-#ifndef OPENSSL_NO_RMD160
-    {FT_md, "rmd160", dgst_main, NULL, NULL},
-#endif
-#ifndef OPENSSL_NO_BLAKE2
-    {FT_md, "blake2b512", dgst_main, NULL, NULL},
-#endif
-#ifndef OPENSSL_NO_BLAKE2
-    {FT_md, "blake2s256", dgst_main, NULL, NULL},
-#endif
-#ifndef OPENSSL_NO_SM3
-    {FT_md, "sm3", dgst_main, NULL, NULL},
-#endif
-    {FT_cipher, "aes-128-cbc", enc_main, enc_options, NULL},
-    {FT_cipher, "aes-128-ecb", enc_main, enc_options, NULL},
-    {FT_cipher, "aes-192-cbc", enc_main, enc_options, NULL},
-    {FT_cipher, "aes-192-ecb", enc_main, enc_options, NULL},
-    {FT_cipher, "aes-256-cbc", enc_main, enc_options, NULL},
-    {FT_cipher, "aes-256-ecb", enc_main, enc_options, NULL},
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-128-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-128-cfb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-128-ctr", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-128-ecb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-128-ofb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-128-cfb1", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-128-cfb8", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-192-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-192-cfb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-192-ctr", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-192-ecb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-192-ofb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-192-cfb1", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-192-cfb8", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-256-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-256-cfb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-256-ctr", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-256-ecb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-256-ofb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-256-cfb1", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_ARIA
-    {FT_cipher, "aria-256-cfb8", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_CAMELLIA
-    {FT_cipher, "camellia-128-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_CAMELLIA
-    {FT_cipher, "camellia-128-ecb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_CAMELLIA
-    {FT_cipher, "camellia-192-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_CAMELLIA
-    {FT_cipher, "camellia-192-ecb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_CAMELLIA
-    {FT_cipher, "camellia-256-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_CAMELLIA
-    {FT_cipher, "camellia-256-ecb", enc_main, enc_options, NULL},
-#endif
-    {FT_cipher, "base64", enc_main, enc_options, NULL},
-#ifdef ZLIB
-    {FT_cipher, "zlib", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "des", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "des3", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "desx", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_IDEA
-    {FT_cipher, "idea", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_SEED
-    {FT_cipher, "seed", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_RC4
-    {FT_cipher, "rc4", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_RC4
-    {FT_cipher, "rc4-40", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_RC2
-    {FT_cipher, "rc2", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_BF
-    {FT_cipher, "bf", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_CAST
-    {FT_cipher, "cast", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_RC5
-    {FT_cipher, "rc5", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "des-ecb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "des-ede", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "des-ede3", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "des-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "des-ede-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "des-ede3-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "des-cfb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "des-ede-cfb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "des-ede3-cfb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "des-ofb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "des-ede-ofb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_DES
-    {FT_cipher, "des-ede3-ofb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_IDEA
-    {FT_cipher, "idea-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_IDEA
-    {FT_cipher, "idea-ecb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_IDEA
-    {FT_cipher, "idea-cfb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_IDEA
-    {FT_cipher, "idea-ofb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_SEED
-    {FT_cipher, "seed-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_SEED
-    {FT_cipher, "seed-ecb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_SEED
-    {FT_cipher, "seed-cfb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_SEED
-    {FT_cipher, "seed-ofb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_RC2
-    {FT_cipher, "rc2-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_RC2
-    {FT_cipher, "rc2-ecb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_RC2
-    {FT_cipher, "rc2-cfb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_RC2
-    {FT_cipher, "rc2-ofb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_RC2
-    {FT_cipher, "rc2-64-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_RC2
-    {FT_cipher, "rc2-40-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_BF
-    {FT_cipher, "bf-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_BF
-    {FT_cipher, "bf-ecb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_BF
-    {FT_cipher, "bf-cfb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_BF
-    {FT_cipher, "bf-ofb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_CAST
-    {FT_cipher, "cast5-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_CAST
-    {FT_cipher, "cast5-ecb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_CAST
-    {FT_cipher, "cast5-cfb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_CAST
-    {FT_cipher, "cast5-ofb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_CAST
-    {FT_cipher, "cast-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_RC5
-    {FT_cipher, "rc5-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_RC5
-    {FT_cipher, "rc5-ecb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_RC5
-    {FT_cipher, "rc5-cfb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_RC5
-    {FT_cipher, "rc5-ofb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_SM4
-    {FT_cipher, "sm4-cbc", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_SM4
-    {FT_cipher, "sm4-ecb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_SM4
-    {FT_cipher, "sm4-cfb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_SM4
-    {FT_cipher, "sm4-ofb", enc_main, enc_options, NULL},
-#endif
-#ifndef OPENSSL_NO_SM4
-    {FT_cipher, "sm4-ctr", enc_main, enc_options, NULL},
-#endif
-    {0, NULL, NULL, NULL, NULL}
-};
diff --git a/apps/progs.h b/apps/progs.h
deleted file mode 100644
index 04e9c4e922..0000000000
--- a/apps/progs.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * WARNING: do not edit!
- * Generated by apps/progs.pl
- *
- * Copyright 1995-2020 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
- */
-
-#include "function.h"
-
-extern int asn1parse_main(int argc, char *argv[]);
-extern int ca_main(int argc, char *argv[]);
-extern int ciphers_main(int argc, char *argv[]);
-extern int cms_main(int argc, char *argv[]);
-extern int crl_main(int argc, char *argv[]);
-extern int crl2pkcs7_main(int argc, char *argv[]);
-extern int dgst_main(int argc, char *argv[]);
-extern int dhparam_main(int argc, char *argv[]);
-extern int dsa_main(int argc, char *argv[]);
-extern int dsaparam_main(int argc, char *argv[]);
-extern int ec_main(int argc, char *argv[]);
-extern int ecparam_main(int argc, char *argv[]);
-extern int enc_main(int argc, char *argv[]);
-extern int engine_main(int argc, char *argv[]);
-extern int errstr_main(int argc, char *argv[]);
-extern int fipsinstall_main(int argc, char *argv[]);
-extern int gendsa_main(int argc, char *argv[]);
-extern int genpkey_main(int argc, char *argv[]);
-extern int genrsa_main(int argc, char *argv[]);
-extern int help_main(int argc, char *argv[]);
-extern int info_main(int argc, char *argv[]);
-extern int kdf_main(int argc, char *argv[]);
-extern int list_main(int argc, char *argv[]);
-extern int mac_main(int argc, char *argv[]);
-extern int nseq_main(int argc, char *argv[]);
-extern int ocsp_main(int argc, char *argv[]);
-extern int passwd_main(int argc, char *argv[]);
-extern int pkcs12_main(int argc, char *argv[]);
-extern int pkcs7_main(int argc, char *argv[]);
-extern int pkcs8_main(int argc, char *argv[]);
-extern int pkey_main(int argc, char *argv[]);
-extern int pkeyparam_main(int argc, char *argv[]);
-extern int pkeyutl_main(int argc, char *argv[]);
-extern int prime_main(int argc, char *argv[]);
-extern int provider_main(int argc, char *argv[]);
-extern int rand_main(int argc, char *argv[]);
-extern int rehash_main(int argc, char *argv[]);
-extern int req_main(int argc, char *argv[]);
-extern int rsa_main(int argc, char *argv[]);
-extern int rsautl_main(int argc, char *argv[]);
-extern int s_client_main(int argc, char *argv[]);
-extern int s_server_main(int argc, char *argv[]);
-extern int s_time_main(int argc, char *argv[]);
-extern int sess_id_main(int argc, char *argv[]);
-extern int smime_main(int argc, char *argv[]);
-extern int speed_main(int argc, char *argv[]);
-extern int spkac_main(int argc, char *argv[]);
-extern int srp_main(int argc, char *argv[]);
-extern int storeutl_main(int argc, char *argv[]);
-extern int ts_main(int argc, char *argv[]);
-extern int verify_main(int argc, char *argv[]);
-extern int version_main(int argc, char *argv[]);
-extern int x509_main(int argc, char *argv[]);
-
-extern const OPTIONS asn1parse_options[];
-extern const OPTIONS ca_options[];
-extern const OPTIONS ciphers_options[];
-extern const OPTIONS cms_options[];
-extern const OPTIONS crl_options[];
-extern const OPTIONS crl2pkcs7_options[];
-extern const OPTIONS dgst_options[];
-extern const OPTIONS dhparam_options[];
-extern const OPTIONS dsa_options[];
-extern const OPTIONS dsaparam_options[];
-extern const OPTIONS ec_options[];
-extern const OPTIONS ecparam_options[];
-extern const OPTIONS enc_options[];
-extern const OPTIONS engine_options[];
-extern const OPTIONS errstr_options[];
-extern const OPTIONS fipsinstall_options[];
-extern const OPTIONS gendsa_options[];
-extern const OPTIONS genpkey_options[];
-extern const OPTIONS genrsa_options[];
-extern const OPTIONS help_options[];
-extern const OPTIONS info_options[];
-extern const OPTIONS kdf_options[];
-extern const OPTIONS list_options[];
-extern const OPTIONS mac_options[];
-extern const OPTIONS nseq_options[];
-extern const OPTIONS ocsp_options[];
-extern const OPTIONS passwd_options[];
-extern const OPTIONS pkcs12_options[];
-extern const OPTIONS pkcs7_options[];
-extern const OPTIONS pkcs8_options[];
-extern const OPTIONS pkey_options[];
-extern const OPTIONS pkeyparam_options[];
-extern const OPTIONS pkeyutl_options[];
-extern const OPTIONS prime_options[];
-extern const OPTIONS provider_options[];
-extern const OPTIONS rand_options[];
-extern const OPTIONS rehash_options[];
-extern const OPTIONS req_options[];
-extern const OPTIONS rsa_options[];
-extern const OPTIONS rsautl_options[];
-extern const OPTIONS s_client_options[];
-extern const OPTIONS s_server_options[];
-extern const OPTIONS s_time_options[];
-extern const OPTIONS sess_id_options[];
-extern const OPTIONS smime_options[];
-extern const OPTIONS speed_options[];
-extern const OPTIONS spkac_options[];
-extern const OPTIONS srp_options[];
-extern const OPTIONS storeutl_options[];
-extern const OPTIONS ts_options[];
-extern const OPTIONS verify_options[];
-extern const OPTIONS version_options[];
-extern const OPTIONS x509_options[];
-
-extern FUNCTION functions[];
diff --git a/doc/internal/man7/build.info.pod b/doc/internal/man7/build.info.pod
index 2be709f770..f6ca49067d 100644
--- a/doc/internal/man7/build.info.pod
+++ b/doc/internal/man7/build.info.pod
@@ -24,7 +24,7 @@ B<MODULES=> I<name> ...
 
 B<SCRIPTS=> I<name> ...
 
-B<DEPEND[>I<item>B<]=> I<otheritem> ...
+B<DEPEND[>I<items>B<]=> I<otheritem> ...
 
 B<GENERATE[>I<item>B<]=> I<generator> I<generator-args> ...
 
@@ -32,9 +32,9 @@ B<SOURCE[>I<item>B<]=> I<file> ...
 
 B<SHARED_SOURCE[>I<item>B<]=> I<file> ...
 
-B<DEFINE[>I<item>B<]=> I<name>[B<=>I<value>] ...
+B<DEFINE[>I<items>B<]=> I<name>[B<=>I<value>] ...
 
-B<INCLUDE[>I<item>B<]=> I<dir> ...
+B<INCLUDE[>I<items>B<]=> I<dir> ...
 
 B<$>I<VARIABLE>B<=>I<value>
 
@@ -122,7 +122,7 @@ syntax is one of:
 
 =item B<I<KEYWORD>> B<=> I<value> ...
 
-=item B<I<KEYWORD>[>I<item>B<]> B<=> I<value> ...
+=item B<I<KEYWORD>[>I<items>B<]> B<=> I<value> ...
 
 =back
 
@@ -154,8 +154,14 @@ F<foo.c> and F<details.c>, and that it depends on the library
 C<libcookie> (in other words, the library will be included when
 linking that program together).
 
-For any indexed statement for which the item hasn't been specified
-through any plain statement, or where the item exists but the indexed
+Multiple space separated items are allowed too:
+
+    SOURCE[foo]=foo.c
+    SOURCE[details]=details.c
+    DEPEND[foo details]=libcookie
+
+For any indexed statement for which the items haven't been specified
+through any plain statement, or where the items exists but the indexed
 statement does not apply, the value is simply ignored by the build
 file generators.
 
@@ -169,7 +175,7 @@ variations on how they are treated.
 =item B<I<KEYWORD>{> I<attrib> | I<attrib>B<=>I<attrib-value> [,...]B<}>
 B<=> I<value> ...
 
-=item B<I<KEYWORD>[>I<item>B<]{> I<attrib> | I<attrib>B<=>I<attrib-value>
+=item B<I<KEYWORD>[>I<items>B<]{> I<attrib> | I<attrib>B<=>I<attrib-value>
 [,...]B<}> B<=> I<value> ...
 
 =back
@@ -264,6 +270,22 @@ part of is tokenized>.
 
 I<Variable assignment values are not tokenized.>
 
+Variable references can be one of:
+
+=over 4
+
+=item B<$>I<NAME> or B<${>I<NAME>B<}>
+
+Simple reference; the variable reference is replaced with its value,
+verbatim.
+
+=item B<${>I<NAME>B</>I<str>B</>I<subst>B<}>
+
+Substitution reference; the variable reference is replaced with its
+value, modified by replacing all occurences of I<str> with I<subst>.
+
+=back
+
 =head2 Scope
 
 Most of the statement values are accumulated globally from all the
@@ -411,15 +433,15 @@ C<noinst>, while the script C<bar> will.
 
 =over 4
 
-=item B<DEPEND[>I<item>B<]> B<=> I<file> ...
+=item B<DEPEND[>I<items>B<]> B<=> I<file> ...
 
-Collects dependencies, where I<item> depends on the given I<file>s.
+Collects dependencies, where I<items> depend on the given I<file>s.
 
-As a special case, the I<item> may be empty, for which the build file
+As a special case, the I<items> may be empty, for which the build file
 generators should make the whole build depend on the given I<file>s,
-rather than some specific I<item>.
+rather than the specific I<items>.
 
-The I<item> may be any program, library, module, script, or any
+The I<items> may be any program, library, module, script, or any
 filename used as a value anywhere.
 
 B<DEPEND> statements may have attributes, which apply to each
@@ -473,19 +495,19 @@ given with B<LIBS> or B<MODULES>.  For libraries, the given filenames
 are only used for their shared form, so if the item is a library name
 ending with C<.a>, the filenames will be ignored.
 
-=item B<DEFINE[>I<item>B<]> B<=> I<name>[B<=>I<value>] ...
+=item B<DEFINE[>I<items>B<]> B<=> I<name>[B<=>I<value>] ...
 
 Collects I<name> / I<value> pairs (or just I<name> with no defined
-value if no I<value> is given) associated with I<item>.
+value if no I<value> is given) associated with I<items>.
 
 The build file generators will decide what to do with them.  For
 example, these pairs should become C macro definitions whenever a
 C<.c> file is built into an object file.
 
-=item B<INCLUDE[>I<item>B<]> B<=> I<dir> ...
+=item B<INCLUDE[>I<items>B<]> B<=> I<dir> ...
 
 Collects inclusion directories that will be used when building the
-I<item> components (object files and whatever else).  This is used at
+I<items> components (object files and whatever else).  This is used at
 the discretion of the build file generators.
 
 =back
@@ -568,7 +590,7 @@ the exception of conditional statements and variable assignments.
 
 =item "indexed statement"
 
-Any F<build.info> statement of the form B<I<KEYWORD>[>I<item>B<]=>I<values>,
+Any F<build.info> statement of the form B<I<KEYWORD>[>I<items>B<]=>I<values>,
 with the exception of conditional statements.
 
 =item "intermediate file"


More information about the openssl-commits mailing list