From 199095e7a49b57b7660fdd695139791d73fcf7c6 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 11 Jun 2018 11:12:35 +0200 Subject: otp: Allow applications to opt out of github edit links This is to be used by application like orber that live outside the main repository but still use the OTP build system to generate documentation. --- make/otp_release_targets.mk | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'make/otp_release_targets.mk') diff --git a/make/otp_release_targets.mk b/make/otp_release_targets.mk index 779aaa1a1e..ae4190808b 100644 --- a/make/otp_release_targets.mk +++ b/make/otp_release_targets.mk @@ -39,6 +39,8 @@ endif _create_xml_dirs := $(shell mkdir -p $(XMLDIR)) XML_GEN_FILES+=$(patsubst %.xml,$(XMLDIR)/%.xml,$(XML_FILES)) + +ifeq ($(strip $(NO_GITHUB_DOC_LINKS)),) $(XMLDIR)/%.xml: %.xml $(gen_verbose)escript $(DOCGEN)/priv/bin/github_link.escript $< \ "$(subst $(ERL_TOP)/,,$(CURDIR)/$^)" "NA" $@ @@ -46,6 +48,13 @@ $(XMLDIR)/%.xml: %.xml $(XMLDIR)/%.xmlsrc: %.xmlsrc $(gen_verbose)escript $(DOCGEN)/priv/bin/github_link.escript $< \ "$(subst $(ERL_TOP)/,,$(CURDIR)/$^)" "NA" $@ +else +## Just copy the files if the application does not want github edit links +$(XMLDIR)/%.xml: %.xml + $(gen_verbose)$(CP) $< $@ +$(XMLDIR)/%.xmlsrc: %.xmlsrc + $(gen_verbose)$(CP) $< $@ +endif ifeq ($(TOPDOC),) -- cgit v1.2.3