Makefile: Only update doc/build.info when there's an actual change

Fixes #14307

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14309)
This commit is contained in:
Richard Levitte 2021-02-25 00:06:46 +01:00
parent 32ab57cbb4
commit 5a6a6d59a6

View File

@ -1096,7 +1096,16 @@ generate_fuzz_oids:
generate_doc_buildinfo:
( $(PERL) -I$(BLDDIR) -Mconfigdata \
$(SRCDIR)/util/dofile.pl -o Makefile \
$(SRCDIR)/doc/build.info.in > $(SRCDIR)/doc/build.info )
$(SRCDIR)/doc/build.info.in \
> $(SRCDIR)/doc/build.info.new; \
if ( test -e $(SRCDIR)/doc/build.info \
&& cmp $(SRCDIR)/doc/build.info.new $(SRCDIR)/doc/build.info \
> /dev/null ); \
then \
rm $(SRCDIR)/doc/build.info.new; \
else \
mv $(SRCDIR)/doc/build.info.new $(SRCDIR)/doc/build.info; \
fi )
# Set to -force to force a rebuild
ERROR_REBUILD=