From 1adb588f84b1a9340beac2719c0890a05e2dfaad Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Tue, 12 Feb 2019 18:33:04 +0100 Subject: Fix install phase in build system - Install of (mainly) documentation caused rebuild and modification of the source tree even when the source previously had been built. Also otp_patch_apply modified the source tree when updating documentation. This messed up the installation if installation was performed by another user than the user that originally built the system which not is an uncommon scenario. - Some documentation was installed by copying files instead of installing the files which caused faulty access rights on files. - The documentation was not properly updated when applying a patch using otp_patch_apply. --- Makefile.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index 5c96c789dc..3b545f08ce 100644 --- a/Makefile.in +++ b/Makefile.in @@ -423,11 +423,13 @@ endif PATH=$(BOOT_PREFIX)"$${PATH}" \ ERL_TOP=$(ERL_TOP) $(MAKE) TESTROOT="$(RELEASE_ROOT)" DOCGEN=$(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen $@ ifneq ($(OTP_SMALL_BUILD),true) - echo "OTP doc built" > $(ERL_TOP)/make/otp_doc_built + test -f $(ERL_TOP)/make/otp_doc_built || echo "OTP doc built" > $(ERL_TOP)/make/otp_doc_built endif -mod2app: +mod2app: $(ERL_TOP)/make/$(TARGET)/mod2app.xml + +$(ERL_TOP)/make/$(TARGET)/mod2app.xml: erts/doc/src/Makefile lib/*/doc/src/Makefile PATH=$(BOOT_PREFIX)"$${PATH}" escript $(BOOTSTRAP_ROOT)/bootstrap/lib/erl_docgen/priv/bin/xref_mod_app.escript -topdir $(ERL_TOP) -outfile $(ERL_TOP)/make/$(TARGET)/mod2app.xml # ---------------------------------------------------------------------- @@ -451,7 +453,7 @@ else $(make_verbose)cd lib && \ ERL_TOP=$(ERL_TOP) PATH=$(BOOT_PREFIX)"$${PATH}" \ $(MAKE) opt BUILD_ALL=true - $(V_at)echo "OTP built" > $(ERL_TOP)/make/otp_built + $(V_at)test -f $(ERL_TOP)/make/otp_built || echo "OTP built" > $(ERL_TOP)/make/otp_built endif kernel: $(make_verbose)cd lib/kernel && \ -- cgit v1.2.3