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@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11185)
This commit is contained in:
Richard Levitte 2020-02-26 14:39:16 +01:00
parent e429217902
commit a3f1fc2501
4 changed files with 17 additions and 16 deletions

View File

@ -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].

View File

@ -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 )

View File

@ -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

View File

@ -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