From 7622c55b856c94d88f405ec199efa08fdd05704a Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Mon, 22 Oct 2018 10:02:54 +0200 Subject: [PATCH] Fix out-of-tree build of docs, fix #29757. --- doc/make.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/make.jl b/doc/make.jl index 6b99bb030fcb0..a5275553fbd21 100644 --- a/doc/make.jl +++ b/doc/make.jl @@ -147,8 +147,9 @@ for stdlib in STDLIB_DOCS end const render_pdf = "pdf" in ARGS +const buildroot = get(ENV, "BUILDROOT", joinpath(@__DIR__, "..")) makedocs( - build = joinpath(@__DIR__, "_build", (render_pdf ? "pdf" : "html"), "en"), + build = joinpath(buildroot, "doc", "_build", (render_pdf ? "pdf" : "html"), "en"), modules = [Base, Core, BuildSysImg, [Base.root_module(Base, stdlib.stdlib) for stdlib in STDLIB_DOCS]...], clean = true, doctest = ("doctest=fix" in ARGS) ? (:fix) : ("doctest=true" in ARGS) ? true : false, @@ -171,7 +172,7 @@ makedocs( if "deploy" in ARGS && Sys.ARCH === :x86_64 && Sys.KERNEL === :Linux deploydocs( repo = "github.com/JuliaLang/julia.git", - target = "_build/html/en", + target = joinpath(buildroot, "doc", "_build", "html", "en"), dirname = "en", devurl = "v1.1-dev", versions = ["v#.#", "v1.1-dev" => "v1.1-dev"]