diff options
author | Richard Levitte <levitte@openssl.org> | 2021-05-18 18:22:57 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-05-19 19:04:06 +0200 |
commit | da750b15c0e69f809243d56eceb37d56a8fc9cfd (patch) | |
tree | eacfec3ef27dcd988c4c82a399bbb980901fe2de | |
parent | build.info: Make it possible to set attributes on SOURCE / SHARED_SOURCE stmts (diff) | |
download | openssl-da750b15c0e69f809243d56eceb37d56a8fc9cfd.tar.xz openssl-da750b15c0e69f809243d56eceb37d56a8fc9cfd.zip |
Make apps/progs.pl not look at apps/progs.c
apps/progs.pl will have apps/progs.c as output, and on some systems,
the output file of a program is locked against reading.
Unfortunately, apps/progs.c is also part of the sources that make up
apps/openssl, so it's necessary to mark that file in a way that makes
progs.pl skip over it.
Fortunately, this is easily done with a special attribute in
apps/build.info and a simple adaptation of apps/progs.pl.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15332)
-rw-r--r-- | apps/build.info | 9 | ||||
-rw-r--r-- | apps/progs.pl | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/apps/build.info b/apps/build.info index 50a85be18f..308f4d94f8 100644 --- a/apps/build.info +++ b/apps/build.info @@ -11,7 +11,7 @@ ENDIF # Source for the 'openssl' program $OPENSSLSRC=\ - openssl.c progs.c \ + openssl.c \ asn1parse.c ca.c ciphers.c crl.c crl2pkcs7.c dgst.c \ enc.c errstr.c \ genpkey.c kdf.c mac.c nseq.c passwd.c pkcs7.c \ @@ -61,7 +61,12 @@ IF[{- !$disabled{apps} -}] INCLUDE[openssl]=.. ../include include DEPEND[openssl]=libapps.a ../libssl - DEPEND[${OPENSSLSRC/.c/.o}]=progs.h + # The nocheck attribute is picked up by progs.pl as a signal not to look + # at that file; some systems may have locked it as the output file, and + # therefore don't allow it to be read at the same time, making progs.pl + # fail. + SOURCE[openssl]{nocheck}=progs.c + DEPEND[${OPENSSLSRC/.c/.o} progs.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 diff --git a/apps/progs.pl b/apps/progs.pl index ff39f85325..8a5759a961 100644 --- a/apps/progs.pl +++ b/apps/progs.pl @@ -28,7 +28,8 @@ my $YEAR = [localtime()]->[5] + 1900; # the lookups in %unified_info my @openssl_source = map { @{$unified_info{sources}->{$_}} } - grep { /\.o$/ } + grep { /\.o$/ + && !$unified_info{attributes}->{sources}->{$apps_openssl}->{$_}->{nocheck} } @{$unified_info{sources}->{$apps_openssl}}; foreach my $filename (@openssl_source) { |