]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Generate doc/build.info with 'make update' rather than on the fly
authorRichard Levitte <levitte@openssl.org>
Mon, 22 Feb 2021 05:49:24 +0000 (06:49 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 23 Feb 2021 17:24:28 +0000 (18:24 +0100)
doc/build.info was essentially generated on the fly while running
Configure, something that takes a huge amount of time on slower file
systems (such as Windows).

Instead, we generate it with 'make update', saving the user from
having to wait for too long, at the small price for developers to have
to run 'make update' whenever they write a new manual file.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14269)

Configurations/unix-Makefile.tmpl
doc/build.info.in [moved from doc/build.info with 97% similarity]

index 16d4337dabdf6fcc6f135cb075a186825e0794ed..b0aff03ad10a172cebb8b46a613c7ba1f6369cc9 100644 (file)
@@ -1022,11 +1022,15 @@ uninstall_html_docs:
 
 # Developer targets (note: these are only available on Unix) #########
 
-update: generate errors ordinals
+# It's important that generate_buildinfo comes after ordinals, as ordinals
+# is sensitive to build.info changes.
+update: generate errors ordinals generate_buildinfo
 
 generate: generate_apps generate_crypto_bn generate_crypto_objects \
           generate_crypto_conf generate_crypto_asn1 generate_fuzz_oids
 
+generate_buildinfo: generate_doc_buildinfo
+
 .PHONY: doc-nits cmd-nits md-nits
 doc-nits: build_generated_pods
        $(PERL) $(SRCDIR)/util/find-doc-nits -n -l -e
@@ -1089,6 +1093,11 @@ generate_fuzz_oids:
                                crypto/objects/obj_dat.h \
                                > fuzz/oids.txt )
 
+generate_doc_buildinfo:
+       ( $(PERL) -I$(BLDDIR) -Mconfigdata \
+                $(SRCDIR)/util/dofile.pl -o Makefile \
+                        $(SRCDIR)/doc/build.info.in > $(SRCDIR)/doc/build.info )
+
 # Set to -force to force a rebuild
 ERROR_REBUILD=
 errors:
similarity index 97%
rename from doc/build.info
rename to doc/build.info.in
index 267629040dafa1522002ed3f56032e82a562dc33..408c1688184804be41b1a4a5dfca2d7c8f8414ce 100644 (file)
@@ -4,6 +4,8 @@ SUBDIRS = man1
  use File::Spec::Functions qw(:DEFAULT abs2rel rel2abs);
  use File::Basename;
 
+ my $sourcedir = catdir($config{sourcedir}, 'doc');
+
  foreach my $section ((1, 3, 5, 7)) {
      my @htmlfiles = ();
      my @manfiles = ();